本文介绍了jquery.flot.dashes.js支持plothover和plotclick吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

通过使用plothover事件,我可以使用正常的图形选项(不使用破折号)来设置可用的工具提示系统,但当切换到黑白模式(使用破折号)时,绘图不会发生恶化。使用破折号时,是否有任何方法可以保持图形的可移动性和可点击性?或者一种方式来制作一个没有破折号的黑色和白色体面的情节?



示例系列: {data:data,dashes:{show: true,dashLength:2},color:black,label:Series 1}



我目前的图表选项:

  options = {
yaxis:{max:maxValue,min:minValue},
grid:{hoverable:true ,clickable:true},
legend:{show:false},
xaxis:{tickFormatter:null}
};

我为这样的工具提示使用plothover事件:

$(this).bind(plotclick,function(event,pos,item){
// tooltip code here
}





请参阅填充 jQuery.flot.dashes 插件。

我同意海报,第二个解决方案是一个更好的主意。我也尝试过。


I have a workable tooltip system set-up with my normal graphing options (not using dashes) by using the plothover event, but the plot is not hoverable when I switch to my "black and white" mode (using dashes). Is there any way to keep the graph hoverable and clickable when using dashes? Or a way to make a decent looking plot in black and white without dashes?

Example series: {data: data, dashes:{show: true, dashLength: 2}, color: "black", label: "Series 1"}

My current graphing options:

options = {
      yaxis: {max: maxValue, min: minValue},
      grid: {hoverable: true, clickable: true},
      legend: {show: false},
      xaxis: {tickFormatter: null}
  };

I use plothover event for tooltips like this:

$(this).bind("plotclick", function (event, pos, item){ //tooltip code here}

解决方案

See this issue filled against the jQuery.flot.dashes plugin.

I agree with the poster that the second solution is a better idea. I've also tried it out in this fiddle and is works well.

这篇关于jquery.flot.dashes.js支持plothover和plotclick吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 18:31