stream-charts
    Preparing search index...
    • Higher-order function that generates a handler for pan events, given the distinct series IDs that cover all the axes in the chart, the margin, time-range update function, and the current state of the x-axes. This function returns a handler function. And this handler function adjusts the time-range when the plot is dragged to the left or right. 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

      • setAxisRange: (axisId: string, axisRange: 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

      • OptionalconstrainToOriginalRange: boolean = true

        Optional argument, that when set to true, constrains the axis range to remain in the origin axis range; when false the axis range is unconstrained

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

      A handler function for pan events