Y Axis Icon Does Not Display Large Numbers - Multi Subscription Chart

In my Multi-Bar Chart, I need to show large numbers on the labels of the Y axis. Currently it does not show more than seven characters:

enter image description here

How can i do this?

+4
source share
1 answer

Set chart.margin (). left = 120 This will give you enough space to display 10,000,000.

nv.addGraph(function() { var chart = nv.models.discreteBarChart() .x(function(d) { return d.label }) .y(function(d) { return d.value }) .staggerLabels(true) .tooltips(false) .showValues(true) chart.forceY([10000000]); chart.margin().left = 120 d3.select('#chart svg') .datum(data) .transition().duration(500) .call(chart); nv.utils.windowResize(chart.update); return chart; }); 

JSFiddle: http://jsfiddle.net/marrok/Ev3UN/1/

+7
source

Source: https://habr.com/ru/post/1488065/


All Articles