How to add arrow to end of line while using type scatter

前端 未结 1 622
一向
一向 2021-01-28 02:02

How do I add arrow to every end of line properly where y is not equal to zero, and series type is scatter with linewidth 2, here I can see arrow is added but its not properly ad

1条回答
  •  再見小時候
    2021-01-28 02:49

    It's not the scatter that's messing you up; it's the fact that your data is not properly sorted. Highcharts expects input data to be sorted by x value:

    data: [
        [0, 0],
        [(-3.969 +0), -1.001]
    ].sort() // this is wrong order, I added sort...
    

    Also, you'll need to apply the fix to my orginal code from here.

    Putting this together, here's an updated fiddle.

    0 讨论(0)
提交回复
热议问题