jqplot去除不可见线的高亮
我有一个带有以下选项的 jQplot:
options= {
title:"Results",
legend:{
renderer: $.jqplot.EnhancedLegendRenderer,
show:true,
labels:result,
rendererOptions:{
numberRows:null,
numberColumns:4,
seriesToggle:"fast",
disableIEFading:true
},
placement: 'outsideGrid',
location: 's'
},
axes:{xaxis:{renderer:$.jqplot.DateAxisRenderer, tickOptions:{formatString:'%Y-%m-%d %H:%M'}},
highlighter: {
sizeAdjust: 10,
tooltipLocation: 'n',
useAxesFormatters: false,
formatString: 'Hello %s dayglow %d'
}
},
cursor:{
show: true,
zoom:true,
showTooltip:false
} };
我希望在隐藏线条时禁用突出显示。目前,如果您将鼠标悬停在不可见的数据点上,荧光笔仍然会显示。有办法做到这一点吗?
I have a jQplot with the following options:
options= {
title:"Results",
legend:{
renderer: $.jqplot.EnhancedLegendRenderer,
show:true,
labels:result,
rendererOptions:{
numberRows:null,
numberColumns:4,
seriesToggle:"fast",
disableIEFading:true
},
placement: 'outsideGrid',
location: 's'
},
axes:{xaxis:{renderer:$.jqplot.DateAxisRenderer, tickOptions:{formatString:'%Y-%m-%d %H:%M'}},
highlighter: {
sizeAdjust: 10,
tooltipLocation: 'n',
useAxesFormatters: false,
formatString: 'Hello %s dayglow %d'
}
},
cursor:{
show: true,
zoom:true,
showTooltip:false
} };
I would like the highlight to disable when a line is hidden. Currently, if you hover over a datapoint that is invisible the highlighter still shows up. Is there a way to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我已经设法找到解决方案。我目前使用 jqplot 版本 1.0.0b2_r1012。
转到enhancedLegendRenderer.js(注意是否包含该文件或.min.js)并修复handleToggle函数(第219行),如下所示:
我添加了行:
和
警告: 此修复不是长期解决方案!下次更新 jqplot 时,还必须更新这些行。在更新这些行之前,请检查该 bug 是否已在该 jqplot 版本中修复。
I've managed to find a solution. I'm curently using jqplot version 1.0.0b2_r1012.
Go to enhancedLegendRenderer.js(take care whether you included that file or .min.js) and fix handleToggle function(line 219) to look like this:
I've added lines:
and
Caution: This fix is not a long term solution! Next time you update the jqplot, you must also update these lines. Before updating these lines, check weather this bug has been fixed in that jqplot version.
在重绘之前,您应该尝试使系列的“showHighlight”属性与其“show”属性保持同步
You should try to keep in sync the 'showHighlight' attribute of the series with its 'show' attribute before redrawing
重要!
该问题已在最新的 jqplot 版本中修复。
IMPORTANT!
This issue has been fixed in the latest jqplot version.