Highcharts JQuery - Changing the Colour of each Dot Point

前端 未结 2 914
我在风中等你
我在风中等你 2021-01-29 13:50

I have a line graph that is displaying variable information (% figure each month for the last 12 months)

I would like to change the dot colour of each plot based on the

2条回答
  •  灰色年华
    2021-01-29 14:44

    
    
    
    $(function () { var chart = new Highcharts.Chart({ chart: { renderTo: 'container' }, xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, plotOptions: { series: { allowPointSelect: true, marker: { states: { select: { fillColor: 'red', lineWidth: 0 } } } } }, series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }] }); });

    see above as an example of how to change the selected marker colour as demonstrated in this fiddle. you can customise the colours by following these instructions. Good luck!

    Hope this helps, Rachel :)

提交回复
热议问题