简体   繁体   中英

Highcharts Grid Line Width (or Color) - Single Line

I have the following Highcharts ( http://www.highcharts.com ) scatter chart. Note that the axes start at -10 and stop at 10, with 0 in the middle. I want each 0 line to be a different width or color from all the others. Should be easy but I can't find in the API documentation how to do. All I can find is how to change properties for all lines. Has anyone done this or have suggestions?

Outside of the API I looked into using Javascript (specifically jQuery) to update the element's style but the only specific part ( d ) I could easily use to find which line to update isn't always the same. The element looks like.....

<path stroke-width="10" opacity="1" stroke="#D8D8D8" d="M 293.5 72 L 293.5 502" fill="none"></path>

Thanks.

散点图

You can implement plotLines . Check this out.

In yAxis , I have set a green line at value of 70.

In xAxis , I have set a blue line at value of 170.

You may play around with the color and width as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM