Options
All
  • Public
  • Public/Protected
  • All
Menu

Module tooltipUtils

Index

Variables

defaultTooltipStyle

defaultTooltipStyle: TooltipStyle = ...

Functions

boundingPoints

  • boundingPoints(data: TimeSeries, time: number): [[number, number], [number, number]]
  • Returns the (time, value) point that comes just before the mouse and just after the mouse

    Parameters

    • data: TimeSeries

      The time-series data

    • time: number

      The time represented by the mouse's x-coordinate

    Returns [[number, number], [number, number]]

    the (time, value) point that comes just before the mouse and just after the mouse. If the mouse is after the last point, then the "after" point is [NaN, NaN]. If the mouse is before the first point, then the "before" point is [NaN, NaN].

categoryTooltipY

  • categoryTooltipY(seriesName: string, textHeight: number, axis: CategoryAxis, tooltipStyle: TooltipStyle, margin: Margin, categoryHeight: number): number
  • Calculates the y-coordinate of the lower-left-hand corner of the tooltip rectangle. Adjusts the y-coordinate so that the tooltip is visible on the upper edge of the plot

    Parameters

    • seriesName: string

      The name of the series

    • textHeight: number

      The height of the header and neuron ID text

    • axis: CategoryAxis

      The category axis for determining the y-value of the tooltip

    • tooltipStyle: TooltipStyle

      The tooltip style

    • margin: Margin

      The plot margin

    • categoryHeight: number

      The height (in pixels) of the category

    Returns number

    The y-coordinate of the lower-left-hand corner of the tooltip rectangle

removeTooltip

  • removeTooltip(): void
  • Removes the tooltip when the mouse has moved away from the spike

    Returns void

tooltipX

  • Calculates the x-coordinate of the lower left-hand side of the tooltip rectangle (obviously without "rounded corners"). Adjusts the x-coordinate so that tooltip is visible on the edges of the plot.

    Parameters

    • x: number

      The current x-coordinate of the mouse

    • textWidth: number

      The width of the tooltip text

    • plotDimensions: Dimensions

      The dimensions of the plot

    • tooltipStyle: TooltipStyle

      The tooltip style information

    • margin: Margin

      The plot margin

    Returns number

    The x-coordinate of the lower left-hand side of the tooltip rectangle

tooltipY

  • Calculates the y-coordinate of the lower-left-hand corner of the tooltip rectangle. Adjusts the y-coordinate so that the tooltip is visible on the upper edge of the plot

    Parameters

    • y: number

      The y-coordinate of the series

    • textHeight: number

      The height of the header and neuron ID text

    • plotDimensions: Dimensions

      The dimensions of the plot

    • tooltipStyle: TooltipStyle

      The tooltip style information

    • margin: Margin

      The plot margin

    Returns number

    The y-coordinate of the lower-left-hand corner of the tooltip rectangle

Generated using TypeDoc