Home › Forums › Chart Support › Issue With Chart Zoom

Issue With Chart Zoom

Viewing 5 posts - 1 through 5 (of 5 total)
  • #60063

    arj

    I currently have line chart with time on the x-axis. Upon zooming the chart I am passing the viewPortMin & viewPortMax to make the new network request. Until the request is getting fulfilled I am trying to render a custom loading spinner instead of the chart component. Below is the issue I am getting –

    Uncaught TypeError: Cannot read properties of null (reading ‘style’)
    at t._plotAreaMouseUp
    at t._mouseEventHandler
    at HTMLCanvasElement.<anonymous>

    • This topic was modified 1 year, 10 months ago by arj.
    #60068

    @arj,

    We are unable to reproduce the issue. Can you kindly create a JSFiddle (or a sample project) reproducing the issue and share it with us so that we can run it locally at our end, understand the scenario better and help you out?

    —
    Ananya Deka
    Team CanvasJS

    #60164

    arj

    Try showing a custom button once chart is zoomed instead of the canvas chart. Getting error in this function _plotAreaMouseUp. The below checks throws error –

    if (reRender && this.zoomEnabled && this._zoomButton.style.display === “none”) {
    show(this._zoomButton, this._resetButton);
    setButtonState(this, this._zoomButton, “pan”);
    setButtonState(this, this._resetButton, “reset”);
    }

    #60171

    arj

    I have called chart.destroy in unmount method thats why this._zoomButton was setting up as null.

    #60186

    @arj,

    Can you kindly create a sample project reproducing the issue and share it with us over Google-Drive or Onedrive so that we can run it locally at our end to understand scenario better, and help you out?

    —
    Ananya Deka
    Team CanvasJS

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.