amcharts / amcharts5

The newest, fastest, and most advanced amCharts charting library for JavaScript and TypeScript apps.
Other
337 stars 91 forks source link

Remove click event in the series #1599

Closed workingbuddy10 closed 1 month ago

workingbuddy10 commented 2 months ago

I don't want user to scroll or pan in the left side ( start < 0). I have added events in the panel but even if I click then too event gets fire. I don't want that. If I click it should react.

      fundamentalPanel.events.on("wheel", () => {
      start = fundamentalDateAxis.get("start");
      console.log(start);

      if (start <= 0) {
       console.log("Scroll on main chart to load more data")
        fundamentalDateAxis.set("maxDeviation", 0);
      }
    })

    fundamentalPanel.events.on("panended", () => {
      start = fundamentalDateAxis.get("start");
      console.log(start);

      if (start <= 0) {
       console.log("Scroll on main chart to load more data")
        fundamentalDateAxis.set("maxDeviation", 0);
      }
    })

I tried adding the event on series but it didn't worked.

codepen (try click on panel, after adding APPLE series) : https://codepen.io/Ansh-m-the-reactor/pen/YzbvxbV?editors=1111

martynasma commented 2 months ago

I'm sorry, I'm not sure what to suggest.

workingbuddy10 commented 2 months ago

@martynasma You can see when I click on the series, it automatically moves only by clicking :

https://github.com/amcharts/amcharts5/assets/137867461/a8e1ec0e-f2a5-4acd-8ef7-31bb54cdde17

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. It will be closed in 5 days unless a new comment is added.