stream-charts
    Preparing search index...

    Function axesZoomHandler

    • Higher-order function that generates a handler for zoom events, given the distinct series IDs that cover all the axes in the chart, the margin, range update function, and the current state of the x- or y-axes. This function returns a handler function. And this handler function adjusts the time-range when the plot is zoomed. After calling the handler function, the plot needs to be updated as well, and this is left for the caller.

      Please note that the function generated by this function has side effects -- it updates the axes ranges.

      Parameters

      • xAxesForSeries: string[]

        The distinct x-axes that cover all the series

      • yAxesForSeries: string[]

        The distinct y-axes that cover all the series

      • margin: Margin

        The plot margin

      • setRangeFor: (axisId: string, range: AxisInterval) => void

        Function for setting the new time-range for a specific axis

      • xAxesState: AxesState<ContinuousNumericAxis>

        The current state of the x-axes

      • yAxesState: AxesState<ContinuousNumericAxis>

        The current state of the y-axes

      • scaleExtent: [min: number, max: number]

        The smallest and largest scale factors allowed

      Returns (
          transform: ZoomTransform,
          mousePosition: [x: number, y: number],
          plotDimensions: Dimensions,
          xRanges: Map<string, ContinuousAxisRange>,
          yRanges: Map<string, ContinuousAxisRange>,
      ) => void

      A handler function for pan events