无法让jqplot荧光笔进入

问题描述:

我一直在使用JQPlot一个星期左右的时间,现在我正在用头撞墙试图突出显示工作。我加载了下面的CSS和.js文件...无法让jqplot荧光笔进入

jquery.jqplot.min.css
jQueryCombined.css
......一对夫妇别人不涉及...

的jQuery -1.4.2.min.js
的jquery-UI-1.8rc3.custom.min.js
jquery.tree.js
的fancybox/jquery.fancybox-1.3.1.js
functions.js
jquery的.calendar-widget.js
个jquery.validate.min.js
验证-附加methods.js
jquery.form.js
thickbox.js
jquery.jqplot.min.js
插件/ jqplot.canvasTextRenderer.min.js
插件/ jqplot.canvasAxisLabelRenderer.min.js
插件/ jqplot.dateAxisRenderer.min.js
插件/ jqplot.canvasAxisTickRenderer.min.js
插件/ jqplot.highlighter.min.js
插件/ jqplot.cursor .min.js
jquery.pstrength-min.1.2.js
jquery.qtip-1.0.0-rc3.min.js
fileuploader.js

这里是产生图的JS:

function plotGraph628() { var line1 = [[1, 1.366556], [2, 1.317904], [3, 1.406245], [4, 1.590483], [5, 1.716111], [6, 1.815133], [7, 1.92456]]; var line2 = [[1, 1.36964213], [2, 1.35712154], [3, 1.36646157], [4, 1.35650663], [5, 1.54406956], [6, 1.78211369], [7, 1.86560989], [8, 1.94269674], [9, 1.81608062], [10, 2.03318191], [11, 1.58755349], [12, 1.42688531]]; var line3 = [[1, 1.4628504486138], [2, 1.602621125026], [3, 1.7262261361072], [4, 1.942346002723], [5, 2.060941295693], [6, 2.4290269175071], [7, 2.3278644684844], [8, 2.2806395719139], [9, 2.1383304036506], [10, 2.2496371015956], [11, 1.8309307748663], [12, 1.7967678025669]]; var lineM = [[1, -0.065826584463948], [2, -0.17765716461611], [3, -0.18536455300624], [4, -0.18115361641526], [5, -0.1673168936998], [6, -0.25273244733621], [7, -0.1732508373853]];<br /> 
$.jqplot('flot628', [ line1, line2, line3, lineM], {<br /> 
title: '',<br /> 
legend:{show:true},<br /> 
highlighter: {sizeAdjust: 10, tooltipAxes: 'y', showTooltip: true},<br /> 
cursor: {show: false},<br /> 
series: [<br /> 
{ label: 'FY-10', showLine: true, showMarker: true, markerOptions: {style: 'circle'}},<br /> 
{ label: 'FY-09', showLine: true, showMarker: true, markerOptions: {style: 'diamond'}},<br /> 
{ label: 'Plan-10', showLine: true, showMarker: true, markerOptions: {style: 'square'}},<br /> 
{ label: 'Revenue: Total Monthly', yaxis: 'y2axis', showLine: true, showMarker: true, markerOptions: {style: 'filledDiamond'}}],<br /> 
axes: <br /> 
    {xaxis: {<br /> 
    ticks: [[1, "Jan"], [2, "Feb"], [3, "Mar"], [4, "Apr"], [5, "May"], [6, "Jun"], [7, "Jul"], [8, "Aug"], [9, "Sep"], [10, "Oct"], [11, "Nov"], [12, "Dec"]],<br /> 
    renderer:$.jqplot.CategoryAxisRenderer,<br /> 
rendererOptions:{tickRenderer:$.jqplot.CanvasAxisTickRenderer},<br /> 
               tickOptions:{<br /> 
            formatString:"%s", <br /> 
            fontSize:"10pt", <br /> 
            fontFamily:"Georgia", <br /> 
            angle:-30<br /> 
            },<br /> 
               labelOptions: {<br /> 
              enableFontSupport: true,<br /> 
              fontFamily: "Georgia",<br /> 
              fontSize: "12pt"<br /> 
             }},<br /> 
           yaxis: {labelRenderer: $.jqplot.CanvasAxisLabelRenderer,<br /> 
               label: "Millions",<br /> 
               tickOptions:{formatString:"%.2f"},<br /> 
               labelOptions: {<br /> 
              enableFontSupport: true,<br /> 
              fontFamily: "Georgia",<br /> 
              fontSize: "12pt"<br /> 
              }},<br /> 
           y2axis: {labelRenderer: $.jqplot.CanvasAxisLabelRenderer,<br /> 
               label: "%",<br /> 
               labelOptions: {<br /> 
              enableFontSupport: true,<br /> 
              fontFamily: "Georgia",<br /> 
              fontSize: "12pt"<br /> 
              }}<br /> 
          }}<br /> 
       )};<br /> 
<br /> 
<br /> 

一切除了荧光笔的作品绝对完美。任何人都可以告诉我,我做错了什么让这个功能启动和运行?

我看到的唯一可能是一个明显的问题是您没有启用插件。您$ .jqplot线之前,您需要:

$.jqplot.config.enablePlugins = true; 

见的documentation page for the highlighter for more details

对我来说最顶端,如果我定义系列或seriesColors选项荧光笔不起作用。其实,但只适用于随机(可能是第一个)系列。

+0

我的妈呀。这为我做了。任何人都知道为什么会这样?如果你想选择颜色会发生什么? – 2014-06-07 11:21:03

+0

我必须将我的系列颜色更改为其十六进制表示。我不能只使用“红色”,“蓝色”和“绿色”等名称。希望在未来帮助别人。 – 2014-06-07 11:25:18

我知道这是一个古老的线程,但任何人都看着呢,他应该有过

highlighter:{ 
show: true} 

代替

highligher :{ 
showTooltip: true} 
+0

尾随逗号?我不这么认为。这将打破IE。 – ThiefMaster 2012-06-28 11:15:41

+0

“叹”你的权利,但你可以花一整天的时间来修复IE的东西。我想这是一个急急回答的问题,但所有的部分都在那里。我也错过了我的第二个荧光笔,制止每一个浏览器的胜利。 – 2012-06-28 13:59:27