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

Waterfall with negative values

1 Answer 7 Views
This is a migrated thread and some comments may be shown as answers.
Holger
Top achievements
Rank 1
Holger asked on 05 Jul 2018, 04:22 PM

     The Waterfall series does not seem to handle negative values always correctly.

Sometimes the waterfall does not go lower than 0. But sometimes it does.

Maybe the documentation on how , whether and why to add SumPoints and TotalPoints is somewhat incomplete.

var ws = new WaterfallSeries();
ws.DataPoints.Add(new Telerik.Charting.WaterfallDataPoint(1.0, false, false));
ws.DataPoints.Add(new Telerik.Charting.WaterfallDataPoint(2.0, false, false));
ws.DataPoints.Add(new Telerik.Charting.WaterfallDataPoint(3.0, true, false));
ws.DataPoints.Add(new Telerik.Charting.WaterfallDataPoint(-10.0, false, false));

if I have just this, it comes out like in picture "withoutEnd".

It does not end up with -7, as I would expect. Ist just ends with 0.

When I add a Total Point at the end

ws.DataPoints.Add(new Telerik.Charting.WaterfallDataPoint(-10.0, false, true))

The display changes, but the total is not display, and it's still all wrong.

When I add a Summary Point at then end

ws.DataPoints.Add(new Telerik.Charting.WaterfallDataPoint(-10.0, true, false))

The result becomes correct. (The left axis is starting at -8)

 

So I can find a solution that works for me.
But I'm not sure, do I missread the (rare) documentation,

or may be there is a bug in the display algorhithms.

 

 

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 06 Jul 2018, 07:54 AM
Hi Holger,

This is indeed an issue in our implementation. I have logged this issue on our Feedback Portal. You can track its progress, subscribe to status changes and add your comment to it here. I have also updated your Telerik Points.

To workaround this you can manually set the minimum of the axis:
var verticalAxis = radChartView1.Axes[1] as LinearAxis;
verticalAxis.Minimum = -10;

Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
Holger
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or