ztsv
ztsv

Reputation: 880

minPadding doesn't work

I have the chart

Now if data is equal 1 then the line is hard to see below image

enter image description here

I write:

minPadding: 0.08,
maxPadding: 0.08, 

but this doesn't work

How to shift the graph down?

Upvotes: 1

Views: 1456

Answers (2)

Ricardo Lohmann
Ricardo Lohmann

Reputation: 26320

The problem is that when you you set minPadding to 0.08 you get the padding, but using tickPositioner starting on 1 it looks like not, because you need more space to show the padding.
So change it's start point from 1 to 0.

tickPositioner: function(min, max) {
    return [0,10,20,30,40];
}

demo

Update - According to the comment:

So set startOnTick to false and min to 0, this will force to show the padding because the min is 0.

demo1 demo2

Upvotes: 3

Mark
Mark

Reputation: 108512

It should be false by default but it seems that if you explicitly set

startOnTick: false

Then you get the desired spacing:

enter image description here

Updated fiddle here.

Upvotes: 0

Related Questions