I have a chart with multiple line series, dynamically bound from WCF services. The chart has Y-axis zoom and scroll, and I already set the MinZoomRange. The problem is even with the MinZoomRange set to 0.05, I still can move the zooming bar all the way down where the two ends of the bar touch each other and thus zoomrange is now 0, this crashes the application.
I read somewhere on this forum that zooming has some issues with multiple line series? Please find a solution for this problem soon, it is critical to our business partners.
The telerik version we are using is RadControls for Silverlight Q2 2011 SP1
I read somewhere on this forum that zooming has some issues with multiple line series? Please find a solution for this problem soon, it is critical to our business partners.
The telerik version we are using is RadControls for Silverlight Q2 2011 SP1
<
telerik:RadChart
HorizontalAlignment
=
"Left"
Margin
=
"12,98,0,7"
Name
=
"radChart1"
Width
=
"913"
Grid.ColumnSpan
=
"3"
>
<
telerik:RadChart.DefaultView
>
<
telerik:ChartDefaultView
>
<
telerik:ChartDefaultView.ChartArea
>
<
telerik:ChartArea
LegendName
=
"chartLegend"
>
<
telerik:ChartArea.ZoomScrollSettingsY
>
<
telerik:ZoomScrollSettings
ScrollMode
=
"ScrollAndZoom"
MinZoomRange
=
"0.05"
/>
</
telerik:ChartArea.ZoomScrollSettingsY
>
<
telerik:ChartArea.AxisY
>
<
telerik:AxisY
AutoRange
=
"True"
/>
</
telerik:ChartArea.AxisY
>
<
telerik:ChartArea.AxisX
>
<
telerik:AxisX
AutoRange
=
"True"
/>
</
telerik:ChartArea.AxisX
>
<
telerik:ChartArea.DataSeries
>
<
telerik:DataSeries
>
</
telerik:DataSeries
>
</
telerik:ChartArea.DataSeries
>
</
telerik:ChartArea
>
</
telerik:ChartDefaultView.ChartArea
>
<
telerik:ChartDefaultView.ChartLegend
>
<
telerik:ChartLegend
x:Name
=
"chartLegend"
UseAutoGeneratedItems
=
"True"
/>
</
telerik:ChartDefaultView.ChartLegend
>
</
telerik:ChartDefaultView
>
</
telerik:RadChart.DefaultView
>
</
telerik:RadChart
>
private
SeriesMapping AddSeriesMapping(ISeriesDefinition seriesDefinition,
string
legendLabel,
string
fieldName, Color color)
{
// add mapping for the series
SeriesMapping mapping =
new
SeriesMapping()
{
SeriesDefinition = seriesDefinition,
LegendLabel = legendLabel,
};
if
(color != Colors.Transparent)
mapping.SeriesDefinition.Appearance.Stroke =
new
SolidColorBrush(color);
InteractivitySettings interactive =
new
InteractivitySettings();
interactive.HoverScope = InteractivityScope.Series;
interactive.SelectionScope = InteractivityScope.Series;
mapping.SeriesDefinition.InteractivitySettings = interactive;
// add item mapping for each property in the item
mapping.ItemMappings.Add(
new
ItemMapping()
{
DataPointMember = DataPointMember.LegendLabel,
});
mapping.ItemMappings.Add(
new
ItemMapping()
{
DataPointMember = DataPointMember.YValue,
FieldName = fieldName
});
return
mapping;
}
void
MetricService_GetAllConsolidatedMetricsCompleted(
object
sender, GetAllConsolidatedMetricsCompletedEventArgs e)
{
radChart1.SeriesMappings.Clear();
//setting up chart default values
//radChart1.DefaultView.ChartArea.AxisY.Step = 100000.00;
//radChart1.DefaultView.ChartLegend.UseAutoGeneratedItems = false;
//radChart1.DefaultView.ChartArea.ZoomScrollSettingsY.MinZoomRange = 5000.00;
List<Stat> stats = (List<Stat>)e.Result;
radChart1.DefaultView.ChartTitle.Content =
"Consolidated Metrics"
;
radChart1.ItemsSource = stats;
radChart1.DefaultView.ChartLegend.Header =
"Metrics Legend"
;
radChart1.SeriesMappings.Add(AddSeriesMapping(
new
SplineSeriesDefinition(),
"One"
,
"One"
, Colors.Red));
radChart1.SeriesMappings.Add(AddSeriesMapping(
new
SplineSeriesDefinition(),
"Two"
,
"Two"
, Colors.Blue));
radChart1.SeriesMappings.Add(AddSeriesMapping(
new
SplineSeriesDefinition(),
"Three"
,
"Three"
, Colors.Green));
radChart1.SeriesMappings.Add(AddSeriesMapping(
new
SplineSeriesDefinition(),
"Total"
,
"Total"
, Colors.Orange));
this
.radChart1.CreateItemStyleDelegate = CreateAllConsolidatedCustomColors;
CreateXAxisLabels(stats);
busyIndicator.IsBusy =
false
;
}