Waterfall with negative values

2 posts, 0 answers
  1. Holger
    Holger avatar
    39 posts
    Member since:
    Jan 2015

    Posted 05 Jul 2018 Link to this post

         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.








  2. Dimitar
    Dimitar avatar
    2960 posts

    Posted 06 Jul 2018 Link to this post

    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.

    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.
Back to Top