显示Y轴JQPlot中的最小刻度

时间:2013-04-30 04:02:12

标签: jquery jqplot

无论如何设置Y轴的最小刻度?我试过这个:

plot1 = $.jqplot('graphCanvas', [<?php echo $line1; ?>], {
                animate: true,
                series:[{renderer:$.jqplot.BarRenderer}],
                axesDefaults: {
                    tickRenderer: $.jqplot.CanvasAxisTickRenderer ,
                    tickOptions: {
                        angle: -30,
                        fontSize: '10pt'
                    },
                    showMinorTicks:true
                },
                axes: {
                    xaxis: {
                        renderer: $.jqplot.CategoryAxisRenderer,
                    }, 
                    yaxis:{

                    }
                }
            });

即使我的showMinor刻度设置为true,Y轴总是显示最大值的3倍,例如:如果12是我的最大值,最大值是36,我怎么能将它限制为14或12?

1 个答案:

答案 0 :(得分:0)

在y轴选项中,我们可以设置

yaxis : {
        min : 0,
        tickInterval : 1                
        }

yaxis : {
        min : 0,
        tickInterval : 1,
            max:14              
        }

Example