Hi All,
I'm new to both Silver light and Telerik, i was trying to evaluate the multiple Y-axis support in Rad controls.
I found success in displaying multiple Y axis,but I'm not able to get how to define the X-Axis labels, by default it is coming as 1,2 and 3.
For Example, i have different Sales Represntatives and want to see the sales made by them in last 3 months as a series respectively, so i have created three series as below:
chtAct.DefaultView.ChartArea.DataSeries.Add(GenerateSeries("Jan", string.Empty, new BarSeriesDefinition(), SelectedKPIS)); |
chtAct.DefaultView.ChartArea.DataSeries.Add(GenerateSeries("Feb", "Secondary", new BarSeriesDefinition(), SelectedKPIS)); |
chtAct.DefaultView.ChartArea.DataSeries.Add(GenerateSeries("Mar", "Secondary", new BarSeriesDefinition(), SelectedKPIS)); |
} |
private DataSeries GenerateSeries(string legendLabel, string axisName, ISeriesDefinition definition, List<String> SelectedKPIS) |
{ |
DataSeries series = new DataSeries(); |
series.Definition = definition; |
series.LegendLabel = legendLabel; |
series.Definition.AxisName = axisName; |
IEnumerable<double> ChartSeriesData = null; |
switch (legendLabel) |
{ |
case "Jan": |
ChartSeriesData = from KPIData in KPIBowlerData |
where SelectedKPIS.Contains(KPIData.KPI) |
select KPIData.JanActual; |
break; |
case "Feb": |
ChartSeriesData = from KPIData in KPIBowlerData |
where SelectedKPIS.Contains(KPIData.KPI) |
select KPIData.FebActual; |
break; |
case "Mar": |
ChartSeriesData = from KPIData in KPIBowlerData |
where SelectedKPIS.Contains(KPIData.KPI) |
select KPIData.MarActual; |
break; |
default: |
break; |
} |
foreach (double Plotpoint in ChartSeriesData) |
{ |
series.Add(new DataPoint(Plotpoint)); |
} |
return series; |
} |
Now when i select single Sales Rep all the three series are displayed, however the X-Axis label is displayed as "1", how can i display the "Sales Representative name" instead of "1", because when i add the second Rep all the series are displayed with X-axis displayed as "2" which makes it difficult for reading the chart.
Let me know if i need to provide additional information