Home Forums Report Bugs IndexLabel total displays NaN.undefined if total is zero

IndexLabel total displays NaN.undefined if total is zero

Viewing 4 posts - 1 through 4 (of 4 total)
  • #9272

    Hi Team!

    I would like to report another minor bug. Based on #2 in the latest release notes, the indexLabel has been fixed if percent is zero. However, the same bug affects the dataSeries’s ‘#total’ indexLabel if the total is zero. Please take a look at http://jsfiddle.net/y2301jm1/1/

    I think the bug is caused by line 13116 of the source code. Here is the excerpt:
    total = percentAndTotal.total ? percentAndTotal.total : total;

    Since 0 is a falsey value, the original string in the variable total enters line 13136 and causes the NaN.undefined error.
    str = str.replace("#total", numberFormat(total, ds.yValueFormatString ? ds.yValueFormatString : "#,##0.########"));

    I modified my own copy like so to check for a number, but I am not sure if doing so might break other functionalities I have not yet used. Hopefully this gets fixed too! Thanks!
    total = isNaN(percentAndTotal.total) ? total : percentAndTotal.total;

    #9282

    Reggie,

    Thanks for reporting the issue. We have just fixed the bug. Here is an internal build with the issue fixed.


    Sunil

    #10420

    why is it that datapoints cannot accept variables that have data i got from the database?
    i tried to alert the values and it got the data i need.. but when i transfer it to the datapoints it always says NaN.undefined

    #10421

    Hi,

    Sorry, we are unable to reproduce this issue. There might be type mismatch so, just confirm by consoling type of your data value. If still the problem persists please create a jsfiddle, so that we can look into it.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.