Problem: hAxis.format

19 views
Skip to first unread message

Aleksandras Maliuginas

unread,
Oct 21, 2018, 3:19:50 PM10/21/18
to Google Visualization API
Hi,
I wanted to remove negative number symbol from hAxis labels.
Screenshot.png







I found a couple of solutions:

However, they use old google charts library (as I've understood, because these resources could not be loaded), in which it works, but source code I use doesn't.

Problem

hAxis: {
  format: ';'
}

does not work for negative values.
If format string is for example "prefix#suffix;prefix#suffix" 
    format: 'prefix#suffix;prefix#suffix'
it displays labels in this way:
  negative: -prefix[SomeInteger]suffix,
  positive: prefix[SomeInteger]suffix
'-' character continues to occur

google.visualization.NumberFormat(), however, works perfectly and numbers are displayed correctly in other parts of the chart, e.g. when hovering over a bar.

Thanks for Your time. 
Reply all
Reply to author
Forward
0 new messages