Home Forums Chart Support Negative value

Negative value

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

    Hello,

    Is it possible to format negative value in order to have absolute value ?

    And is it possible for indexLabel and label ?

    #6127

    Is it possible to format negative value in order to have absolute value ?

    Am afraid this is not possible.

    And is it possible for indexLabel and label ?

    Though you can use xValueFormatString & yValueFormatString to format values inside labels, you can format them to show absolute values.

    Format string for x values in chart

    —-
    Sunil Urs
    Team CanvasJS

    #6130

    I don’t see how i can use the format string in order to draw absolute value of the axis :/

    To explain a little bit, i want to do a population chart, something like this :
    Population chart

    So what i’ve done, i have 2 series (Male and Female) one with negative value and i stack the two. I put the option minimum and maximum of my Y axis of the bigest value of any serie .

    axisY : {
    minimum : -maxValue(),
    maximum : maxValue()
    }

    Here is what i have for the moment :
    watiwant

    I didn’t prettify it, …
    In circle the element i want to change.

    • This reply was modified 10 years ago by Meuhmeuh.
    #6133

    @meuhmeuh,

    Sorry, that was a typo. I meant to say “you can’t format them to show absolute values”. As a workaround, you can set indexLabel property of each dataPoint to its absolute value and it should work fine as shown in this JSFiddle. But labels on the axis would remain the same.

    Displaying Absolute value in index Label

    —-
    Sunil Urs
    Team CanvasJS

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

You must be logged in to reply to this topic.