Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Open
jan-pintr opened this Issue · 4 comments

3 participants

Jan Pintr Aleksey Shmigelski David Schnur
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/

Aleksey Shmigelski

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/

Aleksey Shmigelski

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.

David Schnur dnschnur added the bug label
David Schnur dnschnur added this to the Release 0.8.3 milestone
David Schnur dnschnur self-assigned this
David Schnur dnschnur modified the milestone: Release 0.8.4, Release 0.8.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.