2015-12-14 112 views
0

我想改变我的jqchart工具提示的颜色,但没有任何成功。更改jqchart工具提示颜色

我只是改变成功的线的颜色。

下面我的代码来构建jqchart:

$('#jqChartMes').jqChart({ 
    title: { text: 'Mensal' }, 
    border: { lineWidth: 0 }, 
    legend: { location: 'bottom' }, 
    animation: { duration: 1 }, 
    dataSource: porMes, 
    axes: [ 
     { 
      type: 'line', 
      location: 'left', 
      minimum: -5, 
      maximum: 110, 
      interval: 50 
     } 
    ], 
    series: [ 
     { 
      type: 'line', 
      title: 'Disponibilidade na Falha', 
      strokeStyle: '#00F', 
      lineWidth: 1, 
      xValuesField: { 
       name: 'MES', 
       type: 'string' // string, numeric, dateTime 
      }, 
      yValuesField: 'DISP_FALHA' 
     }, 
     { 
      type: 'line', 
      title: 'Disponibilidade Geral', 
      strokeStyle: '#FCB441', 
      lineWidth: 1, 
      xValuesField: { 
       name: 'MES', 
       type: 'string' // string, numeric, dateTime 
      }, 
      yValuesField: 'DISP_GERAL' 
     }, 
     { 
      type: 'line', 
      title: 'Efetividade', 
      strokeStyle: '#00A65A', 
      lineWidth: 1, 
      xValuesField: { 
       name: 'MES', 
       type: 'string' // string, numeric, dateTime 
      }, 
      yValuesField: 'EFETIV', 
     } 
    ] 
}); 

我搜索了很多在现场jqchart来试图解决我的问题,但没有成功。请他们帮助我。

回答

0

如果要更改工具提示的颜色,你必须去设置有jquery.jqChart.css文件时,你会下载

在那里,你会发现这个代码段:

.ui-jqchart .ui-jqchart-tooltip { position: absolute; white-space: nowrap; padding: .2em .4em; z-index: 9999; border: 1px solid #dddddd; color: #333333; background: white; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; -o-box-shadow: 0 0 5px #aaa; -moz-box-shadow: 0 0 5px #aaa; -webkit-box-shadow: 0 0 5px #aaa; box-shadow: 0 0 5px #aaa; } 

这里的颜色:#333333是你可以改变任何你想要的颜色。我希望这有助于:)