Unable to set zero offset when flot has data set. #1252

Open
jan-pintr opened this Issue Feb 19, 2014 · 4 comments

3 participants

@jan-pintr

Needed to show only chart without any axis, tick captions. Graph should fill placeholder div. This is true only when plot has no data.

I've set:

grid: { 
   margin: {
            left: 0,
            right: 0,
            top: 0,
            bottom: 0
   }
}

There is link describing behavior. http://jsfiddle.net/PQPAU/

@ashmigelski

Addiing following options helped me in same situation

grid: {borderWidth:0, labelMargin:0, axisMargin:0, minBorderMargin:0}

check updated link http://jsfiddle.net/PQPAU/1/

@jan-pintr

Oh, nice workaround. Thank you. But problem still happens when borderWidth has not zero value.
http://jsfiddle.net/PQPAU/2/

@ashmigelski

One more try)
Left margin seems to be reserved for yaxis, set show: false for it

    yaxis: {
        ticks: 0,
        show: false
    }

http://jsfiddle.net/PQPAU/3/

@jan-pintr

Very well. This pointed me to went thought code where plotOffset.left is coming from. So I found at line 1448 tickLength is added to padding. I have no idea why offset is dependent on tickLenght and I think this should not happen.

I've solve it by turning yaxis off for now. But I still feel this is bad behavior which should be fixed at some point. Thank you for colaboration.

@dnschnur dnschnur added the bug label Feb 22, 2014
@dnschnur dnschnur added this to the Release 0.8.3 milestone Feb 22, 2014
@dnschnur dnschnur self-assigned this Feb 22, 2014
@dnschnur dnschnur modified the milestone: Release 0.8.4, Release 0.8.3 Apr 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment