0

This is not a coding-related issue. I'm fine using R + rCharts to create interactive visualisations. My question is about I cannot find documentation or forums that explain how to change nvd3 settings.

I have these charts: http://www.fundacionsol.cl/2015/09/desposesion-salarial-chile/

My issue is about style. In Europe '.' is used for thousands and ',' for decimals (e.g 1 million = 1.000.000,00)

The plots are working perfect and I'd like to use the correct format (which is a minor thing). I've been looking on different forums and documents and I cannot make the proper change.

After some experiments, if I modify nv.d3.min-new.js I can change the 'grouped' and 'stacked' visualisation options. For example: {var F=[{key:"Grouped",disabled:t.stacked()},{key:"Stacked",disabled:!t.stacked()} for {var F=[{key:"Agrupado",disabled:t.stacked()},{key:"Aplilado",disabled:!t.stacked()} Displays the chart options in spanish. But I cannot change the decimals settings. enter image description here

Any ideas?

pachadotdev
  • 3,345
  • 6
  • 33
  • 60

1 Answers1

0

You can use the tickFormat function to change the way ticks are formatted (this is plain D3).

Howto set custom ticks and labels on Y axis in nvd3

valueFormatter might be what you're looking for in the case of tooltips.

https://github.com/novus/nvd3/blob/master/src/tooltip.js

Community
  • 1
  • 1
Lucas
  • 1,359
  • 7
  • 16