Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

defaultAxesLabelFont

defaultAxesLabelFont: AxesLabelFont = ...

defaultLineStyle

defaultLineStyle: SeriesLineStyle = ...

Functions

addCategoryAxis

addLinearAxis

axesForSeriesGen

  • axesForSeriesGen(series: Series[], axisAssignments: Map<string, AxesAssignment>, xAxesState: AxesState): string[]
  • Accepts the series, the assignment of the series to axes, and the current x-axes state, and returns a an array of the distinct axis IDs that cover all the series in the plot.

    Parameters

    • series: Series[]

      The array of series

    • axisAssignments: Map<string, AxesAssignment>

      A map association a series name with its axis assignments

    • xAxesState: AxesState

      The current axis state

    Returns string[]

    an array of the distinct axes that cover all the series in the plot

calculatePanFor

calculateZoomFor

  • Called when the user uses the scroll wheel (or scroll gesture) to zoom in or out. Zooms in/out at the location of the mouse when the scroll wheel or gesture was applied.

    Parameters

    • transform: ZoomTransform

      The d3 zoom transformation information

    • x: number

      The x-position of the mouse when the scroll wheel or gesture is used

    • plotDimensions: Dimensions

      The current dimensions of the plot

    • axis: ContinuousNumericAxis

      The axis being zoomed

    • range: ContinuousAxisRange

      The current range for the axis being zoomed

    Returns ZoomResult

    The updated range and the new zoom factor

panHandler

  • panHandler(axesForSeries: string[], margin: Margin, setTimeRangeFor: (axisId: string, timeRange: [start: number, end: number]) => void, xAxesState: AxesState): (x: number, plotDimensions: Dimensions, series: string[], ranges: Map<string, ContinuousAxisRange>) => void
  • 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 time-ranges

    Parameters

    • axesForSeries: string[]

      The distinct axes that cover all the series

    • margin: Margin

      The plot margin

    • setTimeRangeFor: (axisId: string, timeRange: [start: number, end: number]) => void

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

        • (axisId: string, timeRange: [start: number, end: number]): void
        • Parameters

          • axisId: string
          • timeRange: [start: number, end: number]

          Returns void

    • xAxesState: AxesState

      The current state of the x-axes

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

    A handler function for pan events

      • 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 time-ranges

        Parameters

        Returns void

        A handler function for pan events

timeIntervals

  • Calculates the time-intervals (start, end) for each of the x-axis

    Parameters

    Returns Map<string, [start: number, end: number]>

    A map associating each x-axis with a (start, end) interval

timeRanges

  • Calculates the time-ranges for each of the axes in the map

    Parameters

    Returns Map<string, ContinuousAxisRange>

    a map associating the axis IDs to their time-range

zoomHandler

  • zoomHandler(axesForSeries: string[], margin: Margin, setTimeRangeFor: (axisId: string, timeRange: [start: number, end: number]) => void, xAxesState: AxesState): (transform: ZoomTransform, x: number, plotDimensions: Dimensions, series: string[], ranges: Map<string, ContinuousAxisRange>) => void
  • 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, 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 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 time-ranges

    Parameters

    • axesForSeries: string[]

      The distinct axes that cover all the series

    • margin: Margin

      The plot margin

    • setTimeRangeFor: (axisId: string, timeRange: [start: number, end: number]) => void

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

        • (axisId: string, timeRange: [start: number, end: number]): void
        • Parameters

          • axisId: string
          • timeRange: [start: number, end: number]

          Returns void

    • xAxesState: AxesState

      The current state of the x-axes

    Returns (transform: ZoomTransform, x: number, plotDimensions: Dimensions, series: string[], ranges: Map<string, ContinuousAxisRange>) => void

    A handler function for pan events

      • 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, 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 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 time-ranges

        Parameters

        Returns void

        A handler function for pan events

Generated using TypeDoc