Home Forums Chart Support Formatting Negative Currency Y Values

Formatting Negative Currency Y Values

Viewing 3 posts - 1 through 3 (of 3 total)
  • #9899

    Please can you let me know how I would go about showing a Y Value (e.g. on a column chart) with a slightly different format, specifically currency.

    I am using yValueFormat “£#,###,###” to correctly show my values on the charts (e.g. £212,717) however when the result is negative, it is showing is as £-212,717. How can I change this so that the minus sign precedes the currency (i.e. -£212,717)?

    I have worked out how to do this (using labelFormatter) for the Y: axis but not for the actual values on the bars themselves.

    Thank you very much for your help,

    Tony

    #9902

    In this case you can use formatNumber along with labelFormatter or indexLabelFormatter function as shown in this JSFiddle.

    #9903

    Thank you Sanjoy, that works perfectly. Great solution!

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

You must be logged in to reply to this topic.