Hi all,
In a chart displayed on the page, there are normally 2 sets of axis labels, One that goes up and down on the left hand side (Y axis), and one at the bottom going from left to right (X axis).
Is it possible to have these labels displayed on both sides (Left and right AND/OR top and bottom) ?
Thanks
In a chart displayed on the page, there are normally 2 sets of axis labels, One that goes up and down on the left hand side (Y axis), and one at the bottom going from left to right (X axis).
Is it possible to have these labels displayed on both sides (Left and right AND/OR top and bottom) ?
Thanks
5 Answers, 1 is accepted
0

Karl
Top achievements
Rank 1
answered on 20 Jun 2011, 05:10 PM
Anyone?
0
Hello Karl,
Yes it is possible to be done for the YAxis. You can set multiple YAxis using the ChartSeries YAxisType property and set it to "Secondary".
For instance:
<telerik:ChartSeries Name="Series 2" Type="Bar" YAxisType="Secondary">
Unfortunately we don't support multiple XAxis and you cannot do the same for the XAxis.
Best wishes,
Peshito
the Telerik team
Yes it is possible to be done for the YAxis. You can set multiple YAxis using the ChartSeries YAxisType property and set it to "Secondary".
For instance:
<telerik:ChartSeries Name="Series 2" Type="Bar" YAxisType="Secondary">
Unfortunately we don't support multiple XAxis and you cannot do the same for the XAxis.
Best wishes,
Peshito
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0

Karl
Top achievements
Rank 1
answered on 27 Jun 2011, 09:40 AM
Hi Peshito,
Thanks for your answer which works well if I have multiple series in the chart.
However, suppose I only have one series, and only one value in my data is being charted? Can I then show the yaxis labels on both sides? My chart spans all the way across my page (currently 960 pixels wide) and isn't very high, so by the time the users eyes have scanned across the page, they may lose sight of the true value of the point on the chart.
Supposing my chart spanned the entire width of my screen (large screen in a call centre for example), then reading the correct value would become even more difficult.
I think this feature would be would be welcomed by great many developers if it doesn't currently exist.
Thanks for your answer which works well if I have multiple series in the chart.
However, suppose I only have one series, and only one value in my data is being charted? Can I then show the yaxis labels on both sides? My chart spans all the way across my page (currently 960 pixels wide) and isn't very high, so by the time the users eyes have scanned across the page, they may lose sight of the true value of the point on the chart.
Supposing my chart spanned the entire width of my screen (large screen in a call centre for example), then reading the correct value would become even more difficult.
I think this feature would be would be welcomed by great many developers if it doesn't currently exist.
0
Accepted
Hello Karl,
You can show the secondary Y axis in a single-series chart too. You will have to set its Visible property to ChartAxisVisibility.True. Now, you will need to configure it to mirror the primary one. If the primary Y axis is manually configured, then you know the min, max and step values. However, if the primary Y axis is auto-scaled, you will need to wire the BeforeLayout event of RadChart. At the time it is triggered, the automatic calculation is done and the MinValue, MaxValue and Step properties are already set. You can get them and configure the secondary Y axis:
Hope that helps.
Kind regards,
Peshito
the Telerik team
You can show the secondary Y axis in a single-series chart too. You will have to set its Visible property to ChartAxisVisibility.True. Now, you will need to configure it to mirror the primary one. If the primary Y axis is manually configured, then you know the min, max and step values. However, if the primary Y axis is auto-scaled, you will need to wire the BeforeLayout event of RadChart. At the time it is triggered, the automatic calculation is done and the MinValue, MaxValue and Step properties are already set. You can get them and configure the secondary Y axis:
void
RadChart1_BeforeLayout(
object
sender, EventArgs e)
{
double
min = RadChart1.PlotArea.YAxis.MinValue;
double
max = RadChart1.PlotArea.YAxis.MaxValue;
double
step = RadChart1.PlotArea.YAxis.Step;
RadChart1.PlotArea.YAxis2.Visible = Telerik.Charting.Styles.ChartAxisVisibility.True;
RadChart1.PlotArea.YAxis2.AutoScale =
false
;
RadChart1.PlotArea.YAxis2.AddRange(min, max, step);
}
Hope that helps.
Kind regards,
Peshito
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0

Karl
Top achievements
Rank 1
answered on 30 Jun 2011, 10:46 AM
Excellent.
Thanks Peshito.
Thanks Peshito.