Highcharts series中name颜色的设置

来源:互联网 发布:java ini文件 编辑:程序博客网 时间:2024/05/21 17:26

直接贴代码,方便以后查看:

var chart1;            chart1 = new Highcharts.Chart({                chart: {                 backgroundColor: '#3C3C3C',                    renderTo: 'container1',                    type: 'line'                },                title: {                    text: title, //对应上面的title                    style: {                     color:'#FFFFFF'                    }                },                xAxis: {                    categories: x_value, //对应上面的x_value                    labels:{                     rotation: -45,                                             align: 'right',                                             style: {font: 'normal 10px 宋体',                     color:'#FFFFFF'                     }                    }                },                yAxis: {                    title: {                        text: y_title,  //对应上面的y_title                     style: {                      color:'#FFFFFF'                     }                    },                    labels:{                                         style: {                     font: 'normal 10px 宋体',                     color:'#FFFFFF'                     }                    }                },                tooltip: {                    enabled: false,                    formatter: function() {                        return '<b>'+ this.series.name +'</b><br/>'+                            this.x +': '+ this.y;                    }                },                plotOptions: {                    line: {                     color:'#EA7500',                        dataLabels: {                            enabled: false                        },                        enableMouseTracking: false                    }                },                series: [{                    name: '<b style="color:#FFFFFF;">'+kpi_name+'</b>', //对应参数kpi_name                    data: y_value //对应上面的y_value                }]            });