5

I am utilizing jqPlot to create a linear chart with a Y axis from 0% to 100%. The problem I am having is that one of the values falls on the X axis (is 0%) or 100% it is getting cut-off by the axis or the border of the chart.

How can I ensure this does not happen, while keeping the Y axis minimum at 0% and the max at 100%?

Boro
  • 7,913
  • 4
  • 43
  • 85
GeorgeU
  • 7,819
  • 8
  • 26
  • 38
  • 1
    I think the "pad" attribute is supposed to give the margin you need to prevent point cut-off (seen at http://www.jqplot.com/docs/files/jqPlotOptions-txt.html), but setting that attribute is not working for me, either. :/ – Sean Ahrens Aug 22 '11 at 03:07
  • Has anyone got a fix to this? Please help..!! – Anish Nair Nov 28 '12 at 05:33
  • no one has answered it anywhere... still struggling with the bad aesthetics of it – GeorgeU Jan 29 '13 at 14:38

1 Answers1

0

there is a pad factor that can be set for axesDefaults like this

axesDefaults: {
    pad: 1.1,
}

or it can be set for individual axes like this

axes:{
    xaxis:{
        label: 'X-Axis Label',
        pad: 2,
    },
    yaxis:{
        label: 'Y-Asix Label',
        pad: 1.1,
    }
},

where the value is a factor multiplied by the data range on the axis to give the axis range so that data points don't fall on the edges of the axis.

as described here: http://www.jqplot.com/docs/files/jqPlotOptions-txt.html

caitriona
  • 8,569
  • 4
  • 32
  • 36