This is a migrated thread and some comments may be shown as answers.

Horizontal Zoom and Weird lines

1 Answer 83 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 24 Apr 2012, 07:58 PM
Hi there!

I have just started using the RadCartesianChart control for visualization of time stamped data points.

Here is my XAML for the chart.  The category and value bindings for the series are PropertyNameDataPointBinding resources defined in the user control:

<telerik:RadCartesianChart Grid.RowSpan="2" Grid.Row="2" DataContext="{Binding CurrentDataChart}">
    <telerik:RadCartesianChart.Behaviors>
        <telerik:ChartPanAndZoomBehavior ZoomMode="Horizontal" PanMode="Horizontal" />
        <telerik:ChartTrackBallBehavior ShowIntersectionPoints="True" SnapMode="ClosestPoint" />
    </telerik:RadCartesianChart.Behaviors>
     
    <telerik:RadCartesianChart.HorizontalAxis>
        <telerik:DateTimeCategoricalAxis LabelFitMode="Rotate" LabelRotationAngle="-60.0" PlotMode="OnTicks" />
    </telerik:RadCartesianChart.HorizontalAxis>
     
    <telerik:RadCartesianChart.VerticalAxis>
        <telerik:LinearAxis  />
    </telerik:RadCartesianChart.VerticalAxis>
     
    <telerik:RadCartesianChart.Series>
        <telerik:LineSeries ItemsSource="{Binding SearchResults}" CategoryBinding="{StaticResource TimeStampBinding}" ValueBinding="{StaticResource ValueBinding}">
            <telerik:LineSeries.PointTemplate>
                <DataTemplate>
                    <Grid>
                        <Ellipse Stroke="AliceBlue" />
                        <Ellipse Stroke="White" Margin="1" />
                    </Grid>
                </DataTemplate>
            </telerik:LineSeries.PointTemplate>
        </telerik:LineSeries>
    </telerik:RadCartesianChart.Series>
</telerik:RadCartesianChart>


Everything is binding and showing up correctly.  However, I am running into an issue when I zoom in all the way.  There is a line that appears through the middle of the data points that correllates to maybe an average value of the visible data points, and it really gets in the way of reading the data.  Is this a bug, or is it a feature that can be turned off?

Also, there appear to be times when, though I only have one defined series, it shows a "phantom" series, probably from a different part of the series, that does not interact with the track ball, but still appears on the chart. 

When I zoom out a little bit, however, the "phantom" series and the average line disappear and the chart looks ok again. 

Attached is a couple screenshots: "PhantomLine.png" shows the phantom series and the average line, "NoPhantomLine.png" shows it zoomed out a little bit (pulled the scrollbar wider to the left) with both of them having disappeared.  Any thoughts on how I can fix this?

Also, if I zoom in several times, it will automatically place me at the end of the data series, even if I was trying to zoom in on the middle of the series.

Finally, there appears to be an error that my co-worker is getting when using my chart.  We have the same version of Telerik, but he is running into an issue where he is getting an ArgumentException: Value does not fall within expected range when he zooms in twice.

Thanks!

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 27 Apr 2012, 09:01 AM
Hi Mika,

The issue you've encountered is a generic silverlight problem, when trying to display items larger than 30 000 pixels, which happens when zooming in all the way. In order to address this framework limitation our developers have planned to virtualize the chart series, so that the issue is avoided. Unfortunately we are unable to commit to a concrete timeframe for the implementation of this feature.

As a work around, what you could do is reducing the slider's range, so that it wouldn't zoom in too much and go over the 30 000 pixel threshold. You can do this in the following manner :
<Grid.Resources
            <Style TargetType="telerik:PanZoomBar"
                <Setter Property="MinimumRangeSpan" Value="0.10" /> 
            </Style
</Grid.Resources>

Please, note that the Value could be adjusted depending on the amount of data in the chart.

As for the ArgumentException, in case the issue persists after reducing the slider's range, it would be very helpful for us if you're able to provide more details on the specific scenario, exact controls version, etc. A zipped test application, which reproduces the issue would be greatly appreciated.

Kind regards,
Nikolay
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
ChartView
Asked by
Mike
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or