最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - drawing custom lines on highchart graph - Stack Overflow

programmeradmin2浏览0评论

I have recently been working with the highchart api to plot some data on a website, and I have need to be able to add a custom vertical "line" to symbolise something happening for example a press release.

I have thought about adding a column element to the chart as a seperate series but this is less than ideal.

if anyone has any ideas that would be awesome

thanks

I have recently been working with the highchart api to plot some data on a website, and I have need to be able to add a custom vertical "line" to symbolise something happening for example a press release.

I have thought about adding a column element to the chart as a seperate series but this is less than ideal.

if anyone has any ideas that would be awesome

thanks

Share Improve this question asked Oct 11, 2011 at 14:38 VadeVade 2,0296 gold badges24 silver badges33 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 10

Can you use the the renderer to draw the line?

Here is the API doc for renderer. Look at the path function.

Also check the Try it for jsfiddle for path function.

You can also check the addPlotLine or addPlotBand methods (http://api.highcharts.com/highcharts#Axis.addPlotLine and http://api.highcharts.com/highcharts#Axis.addPlotBand).

It may be easier and quicker to use than drawing a SVG path, unless your line isn't straight.

发布评论

评论列表(0)

  1. 暂无评论