【发布时间】:2014-02-07 12:19:06
【问题描述】:
我正在使用 jqplot 1.0.8 并遇到CategoryAxisRenderer 的问题。 y 轴显示数值,x 轴显示数值或字符串值。这就是我选择CategoryAxisRenderer 的原因。基本上,除了highlighter 之外,一切都正确呈现。如果我将鼠标悬停在一个点上,我不会得到 x 轴的值,而是只会得到值的 index。
初始化
PLOT = $.jqplot(that.getId() + '-CONTENT', [array], {
width: $('#' + elemId).width() - 30,
height: 500,
axesDefaults: {
tickRenderer: $.jqplot.CanvasAxisTickRenderer ,
},
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
tickOptions: {
angle: -90,
fontSize: '8pt'
}
},
yaxis:{
min:1
}
},
highlighter: {
show: true,
tooltipLocation: 'ne',
sizeAdjust: 7.5,
useAxesFormatters: false,
formatString: '%s, %d'
},
cursor: {
show: false
}
});
输出
预期结果
1) 1978, 1
2) 卢布尔雅那大学,37
【问题讨论】:
标签: jqplot diagram axes renderer jqplot-highlighter