I use Apache Echarts that plots timeline chart like below. I have a table below the chart, each row of which has details about a particular datapoint in the graph. The default zoom level of the chart is 20%.
Whenenver I select a row in the table, I want to highlight the selected datapoint in the chart and also want to zoom to that datapoint. I use select and datazoom dispatch actions for this, but I am unable to find the start and end of datazoom using the selected dataIndex.
How to programmatically calculate the zoom start and index using the dataIndex?
https://echarts.apache.org/examples/en/editor.html?c=custom-profile
Just use the
startValueandendValueproperties of the dataZoom action.Example: