Search code examples
javascriptamchartsamcharts4

How to handle the Amchart 4 cursor height?


How to make the Amchart 4 cursor height dynamic based on the series shape?

It is working on Amchart 3

v3: Stopped on the selected value or on the bullets (That is what I need) property name "limitToGraph"

enter image description here

V4: Height 100% and overflow the bullets

enter image description here

So any Idea how to handle that?


Solution

  • You must specify series to which cursor must be snapped:

    chart.cursor.snapToSeries = series;
    

    https://www.amcharts.com/demos/date-based-data/