Search code examples
dygraphs

Better number display for dygraphs


How can I display numbers via a separator, such as: 1000000 becomes 1,000,000 and such? Interested in something that will work for both the axis and the legend.


Solution

  • Your best bet is to use the per-axis option axisLabelFormatter, and valueFormatter. See per-axis options here

    You could use the function provided by Kanji here to do what you want.