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%?

4

1 回答 1

0

有一个pad可以axesDefaults像这样设置的因素

axesDefaults: {
    pad: 1.1,
}

或者可以像这样为单个轴设置

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

其中值是一个因子乘以轴上的数据范围以给出轴范围,以便数据点不会落在轴的边缘。

如此处所述: http ://www.jqplot.com/docs/files/jqPlotOptions-txt.html

于 2013-08-30T14:20:37.647 回答