jQplot

1.调整柱状图上方文字,距离柱状图顶部的距离

2.文字倾斜显示

 tickOptions: {
   fontSize: '13pt',
   angle:40
}

 3.保留1位小数

 axes: {
            // Use a category axis on the x axis and use our custom ticks.
            xaxis: {
              renderer: $.jqplot.CategoryAxisRenderer,
              ticks: ticks
            },
            // Pad the y axis just a little so bars can get close to, but
            // not touch, the grid boundaries.  1.2 is the default padding.
            yaxis: {
              pad: 1.5,
              min:0,
               tickOptions: {formatString: '%.1f}
            }
          }

 4.横坐标文字倾斜显示

axesDefaults: { //轴的刻度值,字体大小,字体类型,字体角度
            tickRenderer: $.jqplot.CanvasAxisTickRenderer,
            // labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
            tickOptions: {
                // fontSize: '9pt',   
                // angle: -20 //刻度倾斜角度
            }
        },

 

posted on 2017-11-01 17:50  立志大灰郎  阅读(145)  评论(0编辑  收藏  举报

导航