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

Line series preventing interpolation to produce a Manhattan bar effect

1 Answer 44 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Edward Wilde
Top achievements
Rank 1
Edward Wilde asked on 14 Dec 2012, 04:20 PM
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

i.e.:
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?

1 Answer, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 19 Dec 2012, 11:25 AM
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.  

Greetings,
Petar Marchev
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ChartView
Asked by
Edward Wilde
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or