Is there a way to draw logarithmic line charts with nvd3
I'm not a nvd3/d3 expert, but I've made something which seems to work like this for the nv.models.lineChart
:
chart.yScale(d3.scale.log());
chart.yAxis.tickValues([1,10,100,1000,10000,1000000]);
chart.forceY([1,1000000]);
Notes:
yScale
function may be slightly different between models (chart.lines.yScale
& cart.lines2.yScale
on nv.models.lineWithFocusChart
for example)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With