2010-10-27 66 views
0

我一直在使用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 /> 

一切除了熒光筆的作品絕對完美。任何人都可以告訴我,我做錯了什麼讓這個功能啓動和運行?

回答

1

對我來說最頂端,如果我定義系列或seriesColors選項熒光筆不起作用。其實,但只適用於隨機(可能是第一個)系列。

+0

我的媽呀。這爲我做了。任何人都知道爲什麼會這樣?如果你想選擇顏色會發生什麼? – 2014-06-07 11:21:03

+0

我必須將我的系列顏色更改爲其十六進制表示。我不能只使用「紅色」,「藍色」和「綠色」等名稱。希望在未來幫助別人。 – 2014-06-07 11:25:18

4

我知道這是一個古老的線程,但任何人都看着呢,他應該有過

highlighter:{ 
show: true} 

代替

highligher :{ 
showTooltip: true} 
+0

尾隨逗號?我不這麼認爲。這將打破IE。 – ThiefMaster 2012-06-28 11:15:41

+0

「嘆」你的權利,但你可以花一整天的時間來修復IE的東西。我想這是一個急急回答的問題,但所有的部分都在那裏。我也錯過了我的第二個熒光筆,制止每一個瀏覽器的勝利。 – 2012-06-28 13:59:27