【问题标题】:Show the minimum ticks in Y axis JQPlot在 Y 轴 JQPlot 中显示最小刻度
【发布时间】:2013-04-30 04:02:12
【问题描述】:

是否可以设置 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 ticks 设置为 true,Y 轴总是显示 3 倍的最大值,例如:如果 12 是我的最大值,最大厚度是 36,我如何将其限制为 14 或 12?

【问题讨论】:

    标签: jquery jqplot


    【解决方案1】:

    在y轴选项我们可以设置

    yaxis : {
            min : 0,
            tickInterval : 1                
            }
    

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

    Example

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多