ChartView Performance

7 posts, 0 answers
  1. Joe
    Joe avatar
    6 posts
    Member since:
    Dec 2012

    Posted 06 Dec 2012 Link to this post

    Hi,

    I'm looking at buying a productivity package for .Net. I've been using Infragistics but I came across Telerik and it the UI performance seems smoother, and I prefer the styles.

    Currently I've only trialed Infragistics and it works well. I can't install the demo of Telerik at the moment becuase of IT issues (complex admin rights on my work machine).

    My requirement is centered arround displaying large ammounts of data in a line/area chart. I'd like to stay away from some of the chart-orientated packages as Telrik has such a complete suite of components I can make a good case to purchase it.

    Anyway, my question is how well does the ChartView handle large data? I have Infragistics displaying a couple of days (about 8) of data, with each day consisting of about 17,000 datapoints and having 4 area serieses, so a total of half a million points. I am not insterested in the inital binding performance, but with this ammount of data I can pan and zoom with reasonable performance, with only a bit of lag when looking at the whole dataset.

    Does ChartView now support multiple axis? This isn't very important, but would be a nice-to-have.

    Can I add annotations, such as a vertical marker or text marker?

    Thanks
  2. Joe
    Joe avatar
    6 posts
    Member since:
    Dec 2012

    Posted 06 Dec 2012 Link to this post

    I managed to get everything installed and have built a ChartView and given it some data. It looks brilliant, but it isn't performing well, It has just one series for one day (17k data points) as an area series. Is there anything I should do to speed things up?

    The zooming/panning behavior is fine, but I've noticed the navigation bar is buggy and work properly - I think I might need a continuous date time axis instead of a category axis, but when I change it nothing displays.

    Currently my xaml looks like this:

    <telerik:RadCartesianChart HorizontalAlignment="Stretch" Margin="5" Name="GridChart1" VerticalAlignment="Stretch" >
        <telerik:RadCartesianChart.Behaviors>
            <telerik:ChartPanAndZoomBehavior />
        </telerik:RadCartesianChart.Behaviors>
        <telerik:RadCartesianChart.HorizontalAxis>
            <telerik:DateTimeCategoricalAxis />
        </telerik:RadCartesianChart.HorizontalAxis>
        <telerik:RadCartesianChart.VerticalAxis>
            <telerik:LinearAxis />
        </telerik:RadCartesianChart.VerticalAxis>
    </telerik:RadCartesianChart>

    and my C# looks like this:

    GridData = new GridDynamicDataCollection(GridDataTable);
    Telerik.Windows.Controls.ChartView.AreaSeries series = new Telerik.Windows.Controls.ChartView.AreaSeries();
    series.ItemsSource = GridData;
    series.CategoryBinding = new PropertyNameDataPointBinding()
    {
        PropertyName =
            "Date"
    };
    series.ValueBinding =  new PropertyNameDataPointBinding()
    {
        PropertyName =
            "TotalLoad"
    };
    this.GridChart1.Series.Add(series);

    The GridDynamicDataCollection extends ObservableCollection
  3. UI for WPF is Visual Studio 2017 Ready
  4. Joe
    Joe avatar
    6 posts
    Member since:
    Dec 2012

    Posted 06 Dec 2012 Link to this post

    Ok, I suspect the performance issue is because it is drawing ticks for every single value with the CategoryDateTimeAxis, clearly I need a ContinusousDateTimeAxis.

    I can't seem to get anything to display using it though, the y axis shows the range (0-20) and I can zoom and pan, but there is no displayed series.
  5. Joe
    Joe avatar
    6 posts
    Member since:
    Dec 2012

    Posted 07 Dec 2012 Link to this post

    Ok, this is getting infurating! I cannot for the life of me work outw what is wrong with this, I've pretty much boiled it down to the copied and pasted examples.

    I am getting an xaml parse exceptino when adding a line series:

    <telerik:RadCartesianChart HorizontalAlignment="Stretch" Margin="5" Name="GridChart1" VerticalAlignment="Stretch" >
        <telerik:RadCartesianChart.Behaviors>
            <telerik:ChartPanAndZoomBehavior />
        </telerik:RadCartesianChart.Behaviors>
        <telerik:RadCartesianChart.HorizontalAxis>
            <telerik:LinearAxis />
        </telerik:RadCartesianChart.HorizontalAxis>
        <telerik:RadCartesianChart.VerticalAxis>
        <telerik:LinearAxis/>
        </telerik:RadCartesianChart.VerticalAxis>
        <telerik:LineSeries/>
    </telerik:RadCartesianChart>

    It works fine without the<telerik:LineSeries/>. I also cannot access the LineSeries properties such as RenderMode, that comes up with a compile error, eg <telerik:LineSeries RenderMode="Light"/> has a:

    Error 1 The property 'RenderMode' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'. Line 391 Position 57. D:\Visual Studio Projects\TelerikTest\WpfApplication2\MainWindow.xaml 391 57 TelerikTest

  6. Joe
    Joe avatar
    6 posts
    Member since:
    Dec 2012

    Posted 07 Dec 2012 Link to this post

    The problem seems to stem from there being two Lineseries, one in Telerik.Windows.Controls.ChartView and one in Telerik.Windows.Controls.Charting...
  7. Joe
    Joe avatar
    6 posts
    Member since:
    Dec 2012

    Posted 07 Dec 2012 Link to this post

    Solved it, It was something to do with the project setup and references, I figure you don't add charting as a reference? In the end I made a new project and copied things over and built up the references again and it works now.

    The performance is good with a single day, but with multiple days it gets very laggy, Is there anything I should be switching on or off in order to get the performance up?

    Interestingly, a line-series with light rendering option performs worse than the area-series.

    I do really like the Telerik controls though, I'm impressed with the package, but I may have to go for Netadvantage, or a dedicated graphing library alongside Telerik.
  8. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 11 Dec 2012 Link to this post

    Hi Joe,

    I am glad you have it up and running. But frankly, I am surprised you have experienced performance issues with LineSeries in light render mode. Please, make sure you have configured the horizontal axis with appropriate step setting (MajorTickInterval or MajorStep/MajorStepUnit). I have attached a small example, which shows 500 000 items and it works pretty well on my end.

    Best regards,
    Ves
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready