Nick
Nick

Reputation: 14283

nvd3 - how to set y axis to default values

I tho this was a pretty common requirement for a chart library, but I couldn't figure out how to achieve this.

I have a multichart(bars,area and lines) which displays time on the x-axis and temperature on the y-axis.

My max temperature across all the data series I've got is 22, and so my y-axis goes from 0 to 22. Can I make it to be ALWAYS from 0 to 100?

I tried with:

forceY = [0,100]
yAxis1.domain([0,100])

But all I get is from 0 to my max.

Suggestions? thanks

Upvotes: 1

Views: 378

Answers (1)

Cyril Cherian
Cyril Cherian

Reputation: 32327

Give yDomain1:[0,100]

working plunk here

Upvotes: 1

Related Questions