Hi,
I'm evaluating the RadChart control and I have some questions about scale breaks:
- Is it possible to set the height of the different segments? For example: I'm using four segments. When I display the four segments the area for each segment is the same (height for each segment is about total height/4), but when I display three or two segments the height of one segment is bigger than the rest. I would like the height segments to be the same in all the cases.
(I've attached some screenshots for this example).
- Is it possible to set the Y-Axis labels for each segment with a different appearance (for example text color)?
- Is it possible to set a different background color for each segment?
Thanks in advance.
John.
I'm evaluating the RadChart control and I have some questions about scale breaks:
- Is it possible to set the height of the different segments? For example: I'm using four segments. When I display the four segments the area for each segment is the same (height for each segment is about total height/4), but when I display three or two segments the height of one segment is bigger than the rest. I would like the height segments to be the same in all the cases.
(I've attached some screenshots for this example).
- Is it possible to set the Y-Axis labels for each segment with a different appearance (for example text color)?
- Is it possible to set a different background color for each segment?
Thanks in advance.
John.
4 Answers, 1 is accepted
0
Hello john,
Onto your questions:
Hope this helps.
Greetings,
Giuseppe
the Telerik team
Onto your questions:
- You can manually define the axis segments if you want precise control over the different ranges:
ChartSeries series =
new
ChartSeries();
series.Type = ChartSeriesType.Line;
series.AddItem(0.25);
series.AddItem(1);
series.AddItem(0.75);
RadChart1.Series.Add(series);
ChartSeries series2 =
new
ChartSeries();
series2.Type = ChartSeriesType.Line;
series2.AddItem(4);
series2.AddItem(18);
series2.AddItem(11);
RadChart1.Series.Add(series2);
ChartSeries series3 =
new
ChartSeries();
series3.Type = ChartSeriesType.Line;
series3.AddItem(61);
series3.AddItem(67);
series3.AddItem(65);
RadChart1.Series.Add(series3);
ChartSeries series4 =
new
ChartSeries();
series4.Type = ChartSeriesType.Line;
series4.AddItem(217);
series4.AddItem(228);
series4.AddItem(220);
RadChart1.Series.Add(series4);
RadChart1.PlotArea.YAxis.AutoScale =
false
;
RadChart1.PlotArea.YAxis.ScaleBreaks.Enabled =
true
;
RadChart1.PlotArea.YAxis.ScaleBreaks.Segments.Add(
new
AxisSegment() { MinValue = 0, MaxValue = 1, Step = 0.25 });
RadChart1.PlotArea.YAxis.ScaleBreaks.Segments.Add(
new
AxisSegment() { MinValue = 4, MaxValue = 18, Step = 3.5 });
RadChart1.PlotArea.YAxis.ScaleBreaks.Segments.Add(
new
AxisSegment() { MinValue = 61, MaxValue = 70, Step = 2.25 });
RadChart1.PlotArea.YAxis.ScaleBreaks.Segments.Add(
new
AxisSegment() { MinValue = 217, MaxValue = 228, Step = 2.75 });
- Unfortunately it is not possible to set different styling for the axis segments.
- You can use the marked zones functionality to define different background for each axis segment:
var markedZone =
new
ChartMarkedZone() { ValueStartY = 0, ValueEndY = 1 };
markedZone.Appearance.FillStyle.MainColor = Color.Salmon;
var markedZone2 =
new
ChartMarkedZone() { ValueStartY = 4, ValueEndY = 18 };
markedZone2.Appearance.FillStyle.MainColor = Color.Red;
var markedZone3 =
new
ChartMarkedZone() { ValueStartY = 61, ValueEndY = 70 };
markedZone3.Appearance.FillStyle.MainColor = Color.Yellow;
var markedZone4 =
new
ChartMarkedZone() { ValueStartY = 217, ValueEndY = 228 };
markedZone4.Appearance.FillStyle.MainColor = Color.Green;
RadChart1.PlotArea.MarkedZones.Add(markedZone);
RadChart1.PlotArea.MarkedZones.Add(markedZone2);
RadChart1.PlotArea.MarkedZones.Add(markedZone3);
RadChart1.PlotArea.MarkedZones.Add(markedZone4);
Hope this helps.
Greetings,
Giuseppe
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
john
Top achievements
Rank 1
answered on 07 Apr 2011, 04:39 PM
Thanks for your response, Giuseppe.
I'm defining the segments manually in a similar way you propose in your response (I'm using the min/max values of the series), but the result is what I show in the attached screenshots. My question is about to set the height in pixels for each segment, so when there are less than 4 segments all of them have the same height (height of each segment in pixels = total height in pixels / number of segments). Is that possible or the height of each segment is calculated automatically?
About the different background color for each segment, I will try using marked zones as you suggest.
Regards,
John.
I'm defining the segments manually in a similar way you propose in your response (I'm using the min/max values of the series), but the result is what I show in the attached screenshots. My question is about to set the height in pixels for each segment, so when there are less than 4 segments all of them have the same height (height of each segment in pixels = total height in pixels / number of segments). Is that possible or the height of each segment is calculated automatically?
About the different background color for each segment, I will try using marked zones as you suggest.
Regards,
John.
0
Accepted
Hello john,
Sorry for the misunderstanding.
Unfortunately RadChart does not provide support for manually setting pixel height for the axis segments so it would not be possible to achieve the desired appearance.
All the best,
Giuseppe
the Telerik team
Sorry for the misunderstanding.
Unfortunately RadChart does not provide support for manually setting pixel height for the axis segments so it would not be possible to achieve the desired appearance.
All the best,
Giuseppe
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
john
Top achievements
Rank 1
answered on 09 Apr 2011, 06:24 AM
Ok, thanks for your help.
John.
John.