我正在尝试更改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网站上搜索了很多次,试图解决我的问题,但没有成功。请大家帮帮我。
发布于 2016-03-12 19:05:02
如果要更改工具提示的颜色,则必须转到下载时提供的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是你可以改变成你想要的任何颜色。
我希望这能有所帮助:)
https://stackoverflow.com/questions/34271382
复制相似问题