Line series preventing interpolation to produce a Manhattan bar effect

2 posts, 0 answers
  1. Edward Wilde
    Edward Wilde avatar
    8 posts
    Member since:
    Jun 2005

    Posted 14 Dec 2012 Link to this post

    I would like to create a line series graph that does not interpolate between points: I've been told by the quants and traders that this is called a Manhattan bar plot.

    I've attached a mock up of such a graph.I can get the current RadChartView to create this effect by inserting a duplicate data points

    DataPoint(Time: 07:00, Price: $101.10) <-- previous price
    DataPoint(Time: 08:00, Price: $101.10) <-- Duplicate inserted to prevent interpolation
    DataPoint(Time: 08:00, Price: $111.10) <-- New price

    The problem with inserting the dummy points is that is doubles the size of the data structure bound to the graph.

    I took a look at the samples but didn't see anything about customizing the behavior of the LineSeries. Note we use the light renderer because we have a very large data set.
    It seems like 
    BitmapLineRenderer.RenderCore()in Telerik.Windows.Controls.ChartView.

    Is where the current interpolation is carried out?
  2. Petar Marchev
    Petar Marchev avatar
    1014 posts

    Posted 19 Dec 2012 Link to this post

    Hi Edward,

    Thank you for the attachment. Indeed the RadChartView does not yet support an out-of-the-box series to present data in such manner. Creating StepLineSeries is on our TODO list. Currently the only way to achieve the desired step-line effect is to insert extra data points, just as you have done.

    The drawing of the Light LineSeries does indeed happen in the RenderCore method. However, the series are not doing any interpolation, the renderer simply connects two adjacent points by drawing a line between them.  

    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top