jqplot y轴文本高度有剪辑

时间:2013-01-22 15:18:38

标签: javascript jquery jqplot

在y轴中,我使用带有“/ n”的2行文本,但我的文字已被剪裁 如何扩展文字行高?

 axesDefaults: {
            tickRenderer: $.jqplot.CanvasAxisTickRenderer,
            tickOptions: {
                angle: 0,
                fontSize: '10pt'
            },
            labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
            labelOptions: {
                //angle: -90,
                fontSize: '10pt'
            }
        },
        axes: {
            yaxis: {
                renderer: $.jqplot.CategoryAxisRenderer,
                label: ' ',
                //Group Category Name
                ticks: groupname,
                tickOptions: { fontSize: '11px', labelPosition:'middle', formatString :'%d'}
            },
            xaxis:
            {
                tickOptions: { angle: 0, fontSize: '11px', formatString :'%d' },
                max: MaxX
            }
        }

谢谢

http://img252.imageshack.us/img252/6821/20130122221030.png

1 个答案:

答案 0 :(得分:0)

使用y轴中的tickSpacing

tickSpacing = 75

图表上的刻度之间的近似像素间距。在自动缩放期间使用。这个数字是一个上限,实际的间距会更小。

参考: http://insar.miami.edu/timeseries/dist/docs/files/jqplot-core-js.html