Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SpiderSeries <CursorPointInterface >

Class that represents a collection of linked data-points inside a SpiderChart.

Given data is visualized in the form of a polygon, where each SpiderPoint is an edge along an Axis. This polygon can be styled with 3 independent areas:

  • fill
  • border
  • points

Data is pushed with SpiderSeries.addPoints in form: { axis: string, value: number }

Index

Properties

scale

scale: Vec2<Scale>

Rendering scale of series

Methods

addPoints

  • Adds an arbitrary amount of SpiderPoints to the Series.

    Animates transition if its enabled on owning chart.

    Parameters

    • Rest ...points: SpiderPoint[]

      List of SpiderPoints as {'axis': string, 'value': number}

    Returns this

    Object itself

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

dispose

  • dispose(): this
  • Enable or disable the series

    Returns this

    Series itself for fluent interface

getCursorEnabled

  • getCursorEnabled(): boolean
  • Returns boolean

    Whether Cursor is enabled or not

getFillStyle

  • Returns FillStyle

    Current series fill style

getFillStyleHighlight

  • getFillStyleHighlight(): FillStyle | undefined
  • Gets the highlighted fillStyle of the Polygon that represents the shape of this Series

    Returns FillStyle | undefined

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

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.

getPointFillStyle

getPointFillStyleHighlight

  • getPointFillStyleHighlight(): FillStyle | undefined
  • Returns FillStyle | undefined

    Current highlight point fill style

getPointShape

  • Get shape of points.

    This is defined upon creation of series, and cannot be changed afterwards.

    Returns PointShape

    PointShape

getPointSize

  • getPointSize(): number
  • Returns number

    Size of point in pixels

getResultTableFormatter

  • Get ResultTable Formatter.

    Returns SpiderSeriesFormatter

    Function which builds ResultTable content for SpiderSeries.

getStrokeStyle

  • getStrokeStyle(): LineStyle
  • Gets the stroke style of the Polygon that represents the shape of this Series

    Returns LineStyle

getStrokeStyleHighlight

  • getStrokeStyleHighlight(): LineStyle | undefined
  • Get stroke style of highlighted polygon.

    Returns LineStyle | undefined

    LineStyle or undefined for auto assignment

getValue

  • getValue(tag: string, animated: boolean): number | undefined
  • Returns the respective value of a data-point with the given tag (if any)

    Parameters

    • tag: string
    • Default value animated: boolean

      If set to true, will take series animating into account for result

    Returns number | undefined

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
  • Enable or disable the series

    Returns this

    Series itself for fluent interface

setAnimationAddPoints

  • setAnimationAddPoints(easing?: AnimationEasing, duration?: undefined | number): this
  • Set animation for adding points.

    Parameters

    • Optional easing: AnimationEasing

      Type of easing for animation or undefined to disable animations

    • Optional duration: undefined | number

      Custom duration for animation in milliseconds.

    Returns this

    Object itself

setCursorEnabled

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

    Parameters

    • state: boolean

    Returns this

setDisposeAnimation

  • setDisposeAnimation(easing?: AnimationEasing, duration?: undefined | number): this
  • Set animation for disabling/enabling series.

    Parameters

    • Optional easing: AnimationEasing

      Type of easing for animation or undefined to disable animations

    • Optional duration: undefined | number

      Custom duration for animation in milliseconds.

    Returns this

    Object itself

setFillStyle

  • Set fill style of the Polygon that represents the shape 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.

setFillStyleHighlight

  • Set fill style of the highlighted Polygon that represents the shape 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
    Automatic undefined

    Parameters

    Returns this

    Series itself for fluent interface.

setHighlighted

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

    Parameters

    • highLight: boolean

      True for enabled and false for disabled

    Returns this

    Series itself for fluent interface

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

setPointFillStyle

  • Set point fill style of Series. Use IndividualPointFill object to enable individual coloring of points.

    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.

setPointFillStyleHighlight

  • Set point fill style of 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

    Returns this

    Series itself for fluent interface.

setPointSize

  • setPointSize(size: number): this
  • Set size of point in pixels

    Parameters

    • size: number

      Size of point in pixels

    Returns this

    Object itself for fluent interface

setResultTableFormatter

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

    Parameters

    Returns this

    Object itself

setStrokeStyle

  • Set stroke style of the Polygon that represents the shape of the Series.

    Example usage:

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

    Parameters

    • value: LineStyle | ImmutableMutator<LineStyle>

      Either a SolidLine object or a function, which will be used to create a new SolidLine based on current value.

    Returns this

    Chart itself

setStrokeStyleHighlight

  • setStrokeStyleHighlight(value: LineStyle | ImmutableMutator<LineStyle> | undefined): this
  • Set stroke style of the highlighted Polygon that represents the shape of the Series. 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
    Specified LineStyle new SolidLine({ thickness: 2, fillStyle: new SolidFill({ color: ColorHEX('#F00') }) })
    Changed thickness (solidLine) => solidLine.setThickness(5)
    Hidden emptyLine
    Automatic undefined

    Parameters

    • value: LineStyle | ImmutableMutator<LineStyle> | undefined

      Either a SolidLine object or a function, which will be used to modify current value.

    Returns this

    Chart itself

solveNearestFromScreen

  • Solves the nearest datapoint to a given coordinate on screen.

    Parameters

    • location: Point

      Location on screen

    Returns undefined | CursorPoint

    Undefined or data-structure for positioning of cursors

solveNearestFromSegment

  • solveNearestFromSegment(location: Point, segment: SpiderChartVisual): undefined | CursorPoint
  • Solves the nearest datapoint to a given coordinate on a screen from a specific segment.

    Parameters

    • location: Point

      Location on screen

    • segment: SpiderChartVisual

      Segment to solve from

    Returns undefined | CursorPoint

    Undefined or data-structure for positioning of cursors