Showing Wait Cursor or Busy Indicator Whilst Chart Updates

4 posts, 0 answers
  1. Dana
    Dana avatar
    6 posts
    Member since:
    May 2011

    Posted 15 Feb 2012 Link to this post

    Have a particular scenario that has me stumped and am open to suggestions.

    Utilising a TImebar, Sparkline and RadChart [Line chart] to view 3 months of 15 minute data points [so ~8640 points]

    Generally the main chart is set to display a months data, with the timebar being used to select varieous periods to view.

    The Following apply

    1. Cant use sampling all the points nees to be visible [I know, I know.....]
    2. Chart is bound to an observable collection, when the timebar selection changes, the collection is recreated from new by seleting a subset from the larger dataset [in another collection]
    3. Using the simplest view of the chart possible, all animations off, not point marks, no gridlines

    The problem is that there is always an appreciable delay whilst the radchart is re-rendered [1-2 seconds].
    I can accept this performance, the issue is more of making the user aware of the activity rather than a UI freeze.

    Tried setting the cursor in the TimebarSelectionChanged event, tried refreshing the data in a bachgound thread [didn't expect that to help really as the actual data refresh is virtually instant]

    I feel the need for a BeginRender, Rendered pair of events to use.

    Any suggestions much appreciated.
  2. Yavor
    Yavor avatar
    401 posts

    Posted 20 Feb 2012 Link to this post

    Hello Dana,

    We have identified the limitations of RadChart for Silverlight/WPF and we came up with a new charting solution - the RadChartView. It is designed with performance in mind and I am sure you will be pleased with the results. Here are some of the most important highlights: 

    • Performance: exceptional performance, intuitive and easy-to-use model and pixel-perfectness were some of the major tasks we have set for this new control.
      • We have separated the chart into several layers, where the core one is totally platform agnostic and is built on top of our custom logical tree. We call this layer the “View Model” of the chart.
      • We have a custom property store used within the charting logical tree. It is about 5 timesfaster than DependencyObject in look-up time and consumes about 3 times less memory.
      • We have an entirely custom layout and do not rely on the SL layout system to arrange our charting view models.
      • We have a stand-alone visualization layer that presents the chart view model. Every view model is presented by the simplest possible SL visual – e.g. Rectangle, Line, Polyline, etc. Still, every single aspect is fully customizable by specifying Data Templates or Styles.
      • We use Canvas – the only SL panel that does not invalidate measure automatically. When a redraw of some charting part is required, we simply update the Width, Height and Canvas.Left, Canvas.Top properties of the corresponding visual. A simple test proved that calling InvalidateMeasure of the canvas upon a change the in view model degrades performance about 10 times.
    • Architecture: a number of chart controls built for a specific purpose vs one monolith control (provides cleaner, simpler, and relevant API)
      • RadCartesianChart -- hosts Bar, Area, Line, Spline, SplineArea, ScatterPoint, Candlestick, and OHLC series types (and their horizontal & stacked / stacked100 equivalents where applicable).
      • RadPieChart -- hosts Pie series type.
      • RadPolarChart -- hosts PolarLine, PolarArea, PolarPoint, RadarLine, RadarArea, RadarPoint series types.
    • Notable features
      • Financial indicators -- support for about 20 most common financial indicators to complement the data visualization for all cartesian series types.
      • Extended DateTime support built-in in the axes' logic
        • DateTimeCategoricalAxis -- Specialized categorical axis that expects each data point to provide a System.DateTime structure as its value for this axis. The points are grouped by a user-defined date-time component (Year, Month, Day, etc.) and then the groups are sorted chronologically.
        • DateTimeContinuousAxis -- Specialized axis that expects each data point to provide a System.DateTime structure as its value for this axis. May be thought of as a timeline where the coordinate of each data point is calculated depending on the position of its associated DateTime on the timeline. The base unit (or the timeline step) of the axis is calculated depending on the smallest difference between any two dates.
      • Support for linear and logarithmic axes.
      • Built-in data sampling.
      • Behaviors:
        • PanAndZoom Behavior -- with smooth scrolling support.
        • TrackBall Behavior.
        • ToolTip Behavior.

    I have prepared for you a small application that uses RadChartView instead. You can use it to compare the performance of our new charting solution to RadChart.

    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Dana
    Dana avatar
    6 posts
    Member since:
    May 2011

    Posted 20 Feb 2012 Link to this post

    Apologies for being a pain, BUT
    [really should have added this to the original post, sorry]

    I have already taken some time to evaluate the RadChartView, a very promising development.

    However, the data we are dealing with very often has null values. The current RadchartView deal with this by displaying the null value as zero. Unfortunately, due to the nature of the data we are plotting a sudden drop to zero is also a valid possibility.

    see my related post

    [basically we are plotting instrumentation data, here the instrument may stop working [results in nulls], or may simply have a fault [zero's], or just report zero as a valid value]

    Many thanks

    Dana Nurse

    EDIT: I am actually very keen to move to the RadChartVIew, the performance difference is amazing. The lack of the ability to show nulls as a gap is pretty much the only thing stopping me.
  5. Yavor
    Yavor avatar
    401 posts

    Posted 23 Feb 2012 Link to this post

    Hello Dana,

    Thank you for sharing details on your scenario and for your feedback.

    As Peshito said in the other forum thread, this feature is high on our list and our developers are doing their best to complete it for the Q2 release. We will have your scenario in mind when testing this feature, so thanks again for sharing!

    All the best,
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top