krispo / angular-nvd3

AngularJS directive for NVD3 reusable charting library (based on D3). Easily customize your charts via JSON API.
http://krispo.github.io/angular-nvd3
MIT License
1.29k stars 377 forks source link

Showing "0" value on the yAxis even if it is not in the chart data #704

Closed TGNC closed 7 years ago

TGNC commented 7 years ago

There is any way to display a zero value in a multiChart even if the data doesn't contain such a value? (In other words - to have the multiChart always start from 0 to a number of our choosing on the yAxis, no matter of what the chart data is).

(yDomain and yRange did not held any result).

Here is an example of the data on a multiChart on plnkr: http://plnkr.co/edit/i16k6FCZWBpqdSXE8hPQ?p=preview

TGNC commented 7 years ago

With Krispo help, This is the way to do this:

chart: { type: 'multiChart', ..., yDomain1: [0, 1000000]
}