Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AreaRangeSeries <CursorPointInterface >

Implementation of SeriesXY for visualizing a collection of progressive AreaPoints (which consist of one X-value, and two Y-values) by filling the area between the points two Y-values.

Composed of the areas fill and border, both of which have two possible styles:

  • High
  • Low. This is used for AreaPoints whose high-value is lower than the low-value.

AreaRangeSeries are created with ChartXY.addAreaRangeSeries.

Index

Properties

_theme

_theme: Theme

Theme from owning Chart.

axisX

axisX: Axis

Axis X

axisY

axisY: Axis

Axis Y

chart

chart: ChartXY

scale

scale: Vec2<Scale>

Scale of the series

Methods

_findPreviouslyAddedData

  • Method that finds and lists all data that has been added to the Series.

    This method is only called when a ZoomBandChart is first created, so its performance is not important.

    Returns AreaPoint[]

    List of data points in order of addition.

_offDataAdd

  • _offDataAdd(token: Token): boolean
  • Unsubscribe from data add event. This is called whenever new data is added to the Series.

    Parameters

    • token: Token

      Token that was received when subscribing to the event.

    Returns boolean

    True if the unsubscription was successful.

_offDataClear

  • _offDataClear(token: Token): boolean
  • Unsubscribe from data clear event. This is called whenever all data of the Series is cleared.

    Parameters

    • token: Token

      Token that was received when subscribing to the event.

    Returns boolean

    True if the unsubscription was successful.

_onDataAdd

  • _onDataAdd(handler: function): Token
  • Subscribe to data add event. This is called whenever new data is added to the Series.

    Parameters

    • handler: function

      Function that is called when event is triggered.

        • Parameters

          Returns void

    Returns Token

    Token that can be used to unsubscribe from the event.

_onDataClear

  • _onDataClear(handler: function): Token
  • Subscribe to data clear event. This is called whenever all data of the Series is cleared.

    Parameters

    • handler: function

      Function that is called when event is triggered.

        • Parameters

          • series: this

          Returns void

    Returns Token

    Token that can be used to unsubscribe from the event.

add

  • Add point or array of points to the dataset.

    Parameters

    Returns this

    Series itself for fluent interface.

addMarker

  • addMarker(cursorBuilder: StaticCursorXYBuilder<PointMarkerType, ResultTableBackgroundType, TickMarkerBackgroundTypeX, TickMarkerBackgroundTypeY>): SeriesMarkerXY<PointMarkerType, ResultTableBackgroundType, TickMarkerBackgroundTypeX, TickMarkerBackgroundTypeY>
  • Add Marker to the Series.

    Type parameters

    Parameters

    • Default value cursorBuilder: StaticCursorXYBuilder<PointMarkerType, ResultTableBackgroundType, TickMarkerBackgroundTypeX, TickMarkerBackgroundTypeY>

      StaticCursorBuilderXY object for customized look of marker. MarkerBuilders.XY can be used to build a custom one from scratch.

    Returns SeriesMarkerXY<PointMarkerType, ResultTableBackgroundType, TickMarkerBackgroundTypeX, TickMarkerBackgroundTypeY>

    SeriesMarkerXY

attach

  • Attach object to an legendBox entry

    Parameters

    • entry: LegendBoxEntry

      Object which has to be attached

    • Default value disposeOnClick: boolean

      Flag that indicates whether the Attachable should be disposed/restored, when its respective Entry is clicked.

    Returns this

    Series itself for fluent interface

clear

  • clear(): this
  • Clear all points and segments from the dataset.

    Returns this

    Series itself for fluent interface

dispose

  • dispose(): this
  • Tell the owning chart to remove this series.

    Returns this

    Object itself.

getCursorEnabled

  • getCursorEnabled(): boolean
  • Returns boolean

    Whether Cursor is enabled or not

getCursorInterpolationEnabled

  • getCursorInterpolationEnabled(): boolean
  • Get if cursor interpolates solved data-points along series by default.

    Returns boolean

    Boolean flag

getHighFillStyle

  • Get a current fill style used for the coloring of the high area in the series.

    Returns FillStyle

    Current fill style used for the coloring of the high area in the series.

getHighFillStyleHighlight

  • Get a current highlight fill style used for the coloring of the high area by series.

    Returns FillStyle

    Current highlight fill style used for the coloring of the high area by series.

getHighStrokeStyle

  • getHighStrokeStyle(): LineStyle
  • Get a current line style of a stroke used for the coloring of the high border in the series.

    Returns LineStyle

    Current line style of a stroke used for the coloring of the high border.

getHighStrokeStyleHighlight

  • getHighStrokeStyleHighlight(): LineStyle
  • Get a current line style of a border used for the coloring of the high border by series.

    Returns LineStyle

    Current line style of a border used for the coloring of the high border by series.

getHighlighted

  • getHighlighted(): boolean
  • Returns boolean

    the state of highlighted flag

getIsUnderMouse

  • getIsUnderMouse(): boolean
  • Get boolean flag for whether object is currently under mouse or not

    Returns boolean

    Boolean for is object under mouse currently

getLowFillStyle

  • Get a current fill style used for the coloring of the low area in the series.

    Returns FillStyle

    Current fill style used for the coloring of the low area in the series.

getLowFillStyleHighlight

  • Get a current highlight fill style used for the coloring of the low area by series.

    Returns FillStyle

    Current highlight fill style used for the coloring of the low area by series.

getLowStrokeStyle

  • getLowStrokeStyle(): LineStyle
  • Get a current line style of a border used for the coloring of the low border in the series.

    Returns LineStyle

    Current line style of a border used for the coloring of the low border.

getLowStrokeStyleHighlight

  • getLowStrokeStyleHighlight(): LineStyle
  • Get a current line style of a border used for the coloring of of the low border by series.

    Returns LineStyle

    Current line style of a border used for the coloring of the low border by series.

getMaxPointCount

  • getMaxPointCount(): number | undefined
  • Get amount of points that series should keep around at all times (data-cleaning won't touch them).

    Returns number | undefined

    Number of points, or undefined if data-cleaning is disabled

getMouseInteractions

  • getMouseInteractions(): boolean
  • Get mouse interactions enabled or disabled. Disabled mouse-interactions will naturally prevent mouse-driven highlighting from ever happening.

    Returns boolean

    Mouse interactions state

getName

  • getName(): string
  • Get the name of the Component.

    Returns string

    The name of the Component.

getPointAmount

  • getPointAmount(): number
  • Get amount of points that series currently has.

    Returns number

    Number of points

getResultTableFormatter

  • Get ResultTable Formatter.

    Returns RangeSeriesFormatter

    Function which builds ResultTable content for RangeSeries.

getXMax

  • getXMax(): number | undefined
  • Returns number | undefined

    Max X value of the series

getXMin

  • getXMin(): number | undefined
  • Returns number | undefined

    Min X value of the series

getYMax

  • getYMax(): number | undefined
  • Returns number | undefined

    Max Y value of the series

getYMin

  • getYMin(): number | undefined
  • Returns number | undefined

    Min Y value of the series

isDisposed

  • isDisposed(): boolean
  • Returns boolean

    TODO: True for enabled and false for disabled

offHover

  • offHover(token: Token): boolean
  • Remove event listener from Series Hover Event.

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

    True if the listener is successfully removed and false if it is not found

offMouseClick

  • offMouseClick(token: Token): boolean
  • Remove event listener from Mouse Click Event

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

    True if the listener is successfully removed and false if it is not found

offMouseDoubleClick

  • offMouseDoubleClick(token: Token): boolean
  • Remove event listener from Mouse Double Click Event

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

    True if the listener is successfully removed and false if it is not found

offMouseDown

  • offMouseDown(token: Token): boolean
  • Remove event listener from Mouse Down Event

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

    True if the listener is successfully removed and false if it is not found

offMouseDrag

  • offMouseDrag(token: Token): boolean
  • Remove event listener from Mouse Drag Event

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

    True if the listener is successfully removed and false if it is not found

offMouseDragStart

  • offMouseDragStart(token: Token): boolean
  • Remove event listener from Mouse Drag Start Event

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

    True if the listener is successfully removed and false if it is not found

offMouseDragStop

  • offMouseDragStop(token: Token): boolean
  • Remove event listener from Mouse Drag Stop Event

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

    True if the listener is successfully removed and false if it is not found

offMouseEnter

  • offMouseEnter(token: Token): boolean
  • Remove event listener from Mouse Enter Event

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

    True if the listener is successfully removed and false if it is not found

offMouseLeave

  • offMouseLeave(token: Token): boolean
  • Remove event listener from Mouse Leave Event

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

    True if the listener is successfully removed and false if it is not found

offMouseMove

  • offMouseMove(token: Token): boolean
  • Remove event listener from Mouse Move Event

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

    True if the listener is successfully removed and false if it is not found

offMouseUp

  • offMouseUp(token: Token): boolean
  • Remove event listener from Mouse Up Event

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

    True if the listener is successfully removed and false if it is not found

offMouseWheel

  • offMouseWheel(token: Token): boolean
  • Remove event listener from Mouse Wheel Event

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

    True if the listener is successfully removed and false if it is not found

offTouchEnd

  • offTouchEnd(token: Token): boolean
  • Remove event listener from Touch End Event

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

    True if the listener is successfully removed and false if it is not found

offTouchMove

  • offTouchMove(token: Token): boolean
  • Remove event listener from Touch Move Event

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

    True if the listener is successfully removed and false if it is not found

offTouchStart

  • offTouchStart(token: Token): boolean
  • Remove event listener from Touch Start Event

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

    True if the listener is successfully removed and false if it is not found

onHover

  • onHover(clbk: function): Token
  • Add event listener to Series Hover Event. Hover event is a custom mouse-event designed for Series that is the main link between Cursors and Series.

    Parameters

    • clbk: function

      Callback function that is called whenever mouse enters / moves or leaves the Series

        • Parameters

          • series: this
          • cursorPoint: CursorPointInterface | undefined

          Returns void

    Returns Token

    Token of the event listener

onMouseClick

  • Add event listener to Mouse Click Event

    Parameters

    Returns Token

    Token of the event listener

onMouseDoubleClick

  • Add event listener to Mouse Double Click Event

    Parameters

    Returns Token

    Token of the event listener

onMouseDown

  • Add event listener to Mouse Down Event

    Parameters

    Returns Token

    Token of the event listener

onMouseDrag

onMouseDragStart

onMouseDragStop

onMouseEnter

  • Add event listener to Enter Event

    Parameters

    Returns Token

    Token of the event listener

onMouseLeave

  • Add event listener to Mouse Leave Event

    Parameters

    Returns Token

    Token of the event listener

onMouseMove

  • Add event listener to Mouse Move Event

    Parameters

    Returns Token

    Token of the event listener

onMouseUp

  • Add event listener to Mouse Up Event

    Parameters

    Returns Token

    Token of the event listener

onMouseWheel

  • Subscribe to Mouse Wheel event

    Parameters

    Returns Token

    Token of subscription

onTouchEnd

  • Subscribe to Touch End event

    Parameters

    Returns Token

    Token of subscription

onTouchMove

  • Subscribe to Touch Move event

    Parameters

    Returns Token

    Token of subscription

onTouchStart

  • Subscribe to Touch Start event

    Parameters

    Returns Token

    Token of subscription

restore

  • restore(): this
  • Tell the owning chart to restore this series.

    Returns this

    Object itself.

setCursorEnabled

  • setCursorEnabled(state: boolean): this
  • Set whether Cursor is enabled or not

    Parameters

    • state: boolean

    Returns this

setCursorInterpolationEnabled

  • setCursorInterpolationEnabled(state: boolean): this
  • Set if cursor interpolates solved data-points along series by default.

    Parameters

    • state: boolean

      Boolean flag

    Returns this

    Object itself for fluent interface

setHighFillStyle

  • Set fill style of high area of the Series.

    Desired result Argument
    Specified FillStyle new SolidFill({ color: ColorHEX('#F00') })
    Changed color (solidFill) => solidFill.setColor( ColorRGBA( 0, 0, 0, 0 ) )
    Hidden emptyFill

    Parameters

    Returns this

    Series itself for fluent interface.

setHighFillStyleHighlight

  • Set fill style of high area of the Series when it is highlighted.

    Desired result Argument
    Specified FillStyle new SolidFill({ color: ColorHEX('#F00') })
    Changed color (solidFill) => solidFill.setColor( ColorRGBA( 0, 0, 0, 0 ) )
    Hidden emptyFill
    Automatic undefined

    Parameters

    • value: FillStyle | ImmutableMutator<FillStyle> | undefined

      Either a FillStyle object or a function, which will be used to create a new FillStyle based on current value or undefined for automatic value based on normal style.

    Returns this

    Series itself for fluent interface.

setHighStrokeStyle

  • Set style of the Series high stroke.

    Desired result Argument
    Specified LineStyle new SolidLine({ thickness: 2, fillStyle: new SolidFill({ color: ColorHEX('#F00') }) })
    Changed thickness (solidLine) => solidLine.setThickness(5)
    Hidden emptyLine Not supported, to hide border use transparentLine

    Parameters

    Returns this

    Series itself for fluent interface.

setHighStrokeStyleHighlight

  • Set style of the Series high stroke when it is highlighted. Highlighting is activated by placing mouse on top / touching Series (if mouse-interactions are not disabled), or by using setHighlighted() method.

    Example usage:

    Desired result Argument
    Solid line new SolidLine({ thickness: 2, fillStyle: new SolidFill({ color: ColorHEX('#F00') }) })
    Changed thickness (solidLine) => solidLine.setThickness(5)
    Hidden emptyLine Not supported, to hide highlighted border use transparentLine
    Automatic undefined

    Parameters

    • value: SolidLine | ImmutableMutator<SolidLine> | undefined

      Either a SolidLine object or a function, which will be used to create a new SolidLine based on current value or undefined for automatic value based on normal style.

    Returns this

    Chart itself

setHighlighted

  • setHighlighted(highLight: boolean): this
  • Enable or disable forced highlighting of component

    Parameters

    • highLight: boolean

      True for enabled and false for disabled

    Returns this

    component itself for fluent interface

setLowFillStyle

  • Set fill style of low area of the Series.

    Desired result Argument
    Specified FillStyle new SolidFill({ color: ColorHEX('#F00') })
    Changed color (solidFill) => solidFill.setColor( ColorRGBA( 0, 0, 0, 0 ) )
    Hidden emptyFill

    Parameters

    Returns this

    Series itself for fluent interface.

setLowFillStyleHighlight

  • Set fill style of low are of the Series when it is highlighted.

    Desired result Argument
    Specified FillStyle new SolidFill({ color: ColorHEX('#F00') })
    Changed color (solidFill) => solidFill.setColor( ColorRGBA( 0, 0, 0, 0 ) )
    Hidden emptyFill
    Automatic undefined

    Parameters

    • value: FillStyle | ImmutableMutator<FillStyle> | undefined

      Either a FillStyle object or a function, which will be used to create a new FillStyle based on current value or undefined for automatic value based on normal style.

    Returns this

    Series itself for fluent interface.

setLowStrokeStyle

  • Set style of the Series low stroke.

    Desired result Argument
    Specified LineStyle new SolidLine({ thickness: 2, fillStyle: new SolidFill({ color: ColorHEX('#F00') }) })
    Changed thickness (solidLine) => solidLine.setThickness(5)
    Hidden emptyLine Not supported, to hide border use transparentLine

    Parameters

    Returns this

    Series itself for fluent interface.

setLowStrokeStyleHighlight

  • Set style of the Series low stroke when it is highlighted. Highlighting is activated by placing mouse on top / touching Series (if mouse-interactions are not disabled), or by using setHighlighted() method.

    Example usage:

    Desired result Argument
    Solid line new SolidLine({ thickness: 2, fillStyle: new SolidFill({ color: ColorHEX('#F00') }) })
    Changed thickness (solidLine) => solidLine.setThickness(5)
    Hidden emptyLine Not supported, to hide highlighted stroke use transparentLine
    Automatic undefined

    Parameters

    • value: SolidLine | ImmutableMutator<SolidLine> | undefined

      Either a SolidLine object or a function, which will be used to create a new SolidLine based on current value or undefined for automatic value based on normal style.

    Returns this

    Chart itself

setMaxPointCount

  • setMaxPointCount(maxPointCount: number): this
  • Set amount of points that should be kept around at all times (data-cleaning won't touch them). NOTE: The actual data starts if there is at least 1 full segment (>8000 points normally).

    Parameters

    • Default value maxPointCount: number

      Guaranteed amount of visible points. If undefined or 0 is passed, data-cleaning will be disabled.

    Returns this

    Object itself

setMouseInteractions

  • setMouseInteractions(state: boolean): this
  • Set mouse interactions enabled or disabled. Disabling mouse-interactions will naturally prevent mouse-driven highlighting from ever happening.

    Parameters

    • state: boolean

      Specifies state of mouse interactions

    Returns this

    Object itself for fluent interface

setName

  • setName(name: string): this
  • Sets the name of the Component updating attached LegendBox entries

    Parameters

    • name: string

      Name of the Component

    Returns this

    Object itself

setResultTableFormatter

  • Method for customizing contents of ResultTables when pointing at this Series.

    Parameters

    Returns this

    Object itself

solveNearestFromScreen

  • solveNearestFromScreen(location: Point, interpolate: boolean): undefined | CursorPoint
  • Method that solves the nearest datapoint on mountain to a given coordinate on screen.

    Parameters

    • location: Point

      Location on screen

    • Default value interpolate: boolean

    Returns undefined | CursorPoint

    Undefined or data-structure for positioning of cursors

solveNearestFromSegment

  • solveNearestFromSegment(location: Point, segment: Junction, interpolate: boolean): undefined | CursorPoint
  • Method that solves the nearest datapoint on mountain to a given coordinate on a screen from a specific segment.

    Parameters

    • location: Point

      Location on screen

    • segment: Junction

      Segment to solve from

    • Default value interpolate: boolean

    Returns undefined | CursorPoint

    Undefined or data-structure for positioning of cursors