Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BoxAndWhiskers

Box and whiskers StatisticFigure implementation.

Index

Properties

Readonly boundaries

boundaries : Interval<Point>

Boundaries of BoxFigure. Constant and computed in constructor.

Readonly dimensionStrategy

dimensionStrategy : MultidimensionalStrategy

Readonly end

end : number

Readonly lowerExtreme

lowerExtreme : number

Readonly lowerQuartile

lowerQuartile : number

Readonly median

median : number

Readonly scale

scale : LinearScaleXY

Readonly start

start : number

Readonly upperExtreme

upperExtreme : number

Readonly upperQuartile

upperQuartile : number

Methods

dispose

  • dispose(): this
  • Dispose shapes from rendering layer

    Returns this

getBodyFillStyle

  • Get fill style of box body when not highlighted.

    Returns FillStyle

    FillStyle object

getBodyFillStyleHighlight

  • getBodyFillStyleHighlight(): FillStyle | undefined
  • Get fill style of box body when highlighted.

    Returns FillStyle | undefined

    FillStyle object or undefined if not assigned

getBodyStrokeStyle

  • Get style of box body when not highlighted.

    Returns LineStyle

    LineStyle object

getBodyStrokeStyleHighlight

  • getBodyStrokeStyleHighlight(): LineStyle | undefined
  • Get style of box body when highlighted.

    Returns LineStyle | undefined

    LineStyle object or undefined if not assigned

getBodyWidth

  • getBodyWidth(): number
  • Get width of box body as a % of the width of its interval width.

    Returns number

    Ratio between box body width and the segments interval

getBoundaries

  • getBoundaries(): Interval<Point>
  • Get boundaries that contain figure.

    Returns Interval<Point>

    Interval

getDominantStyle

  • Return some dominant fill style of the segment

    Returns FillStyle

    FillStyle object

getHighlighted

  • getHighlighted(): boolean
  • Returns boolean

    True for highlighted state of object and false for basic

getIsUnderMouse

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

    Returns boolean

    Boolean for is object under mouse currently

getMedianStrokeStrokeHighlight

  • getMedianStrokeStrokeHighlight(): LineStyle | undefined
  • Get stroke style of box median line when highlighted.

    Returns LineStyle | undefined

    LineStyle object or undefined if not assigned

getMedianStrokeStyle

  • Get stroke style of box median line when not highlighted.

    Returns LineStyle

    LineStyle object

getMouseInteractions

  • getMouseInteractions(): boolean
  • Returns boolean

    Mouse interactions state

getStrokeStyle

  • Get stroke style of box whiskers and tails when not highlighted.

    Returns LineStyle

    LineStyle object

getStrokeStyleHighlight

  • getStrokeStyleHighlight(): LineStyle | undefined
  • Get stroke style of box whiskers and tails when highlighted.

    Returns LineStyle | undefined

    LineStyle object or undefined if not assigned

getTailWidth

  • getTailWidth(): number
  • Get width of box tails as a % of the width of its interval width.

    Returns number

    Ratio between box tail width and the segments interval

isDisposed

  • isDisposed(): boolean
  • Returns boolean

    True if all shapes are disposed, false if not.

offHighlight

  • offHighlight(token: Token): boolean
  • Unsubscribe from Highlight object event. This is called whenever an object is highlighted

    Parameters

    • token: Token

      Token that was received when subscribing to the event.

    Returns boolean

    True if the unsubscription was successful.

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

onHighlight

  • onHighlight(handler: function): Token
  • Subscribe to highlight object event. This is called whenever an object is highlighted.

    Parameters

    • handler: function

      Function that is called when event is triggered.

        • Parameters

          • isHighlighted: boolean

          Returns void

    Returns Token

    Token that can be used to unsubscribe from the event.

onMouseClick

  • Subscribe to Mouse Click event

    Parameters

    • listener: MouseEventHandler<this>

      Function that will be called when mouse clicks the bounds of UiObject.

    Returns Token

    Token-object that is a reference ID to the listener created.

onMouseDoubleClick

  • Subscribe to Mouse Double Click event

    Parameters

    Returns Token

onMouseDown

  • Subscribe to Mouse Down event

    Parameters

    Returns Token

onMouseDrag

onMouseDragStart

onMouseDragStop

onMouseEnter

  • Subscribe to Mouse Enter event

    Parameters

    • listener: MouseEventHandler<this>

      Function that will be called when mouse enters the bounds of UiObject.

    Returns Token

    Token-object that is a reference ID to the listener created.

onMouseLeave

  • Subscribe to Mouse Leave event

    Parameters

    Returns Token

    Token-object that is a reference ID to the listener created.

onMouseMove

  • Subscribe to Mouse Move event

    Parameters

    Returns Token

    Token of subscription

onMouseUp

  • Subscribe to Mouse Up event

    Parameters

    Returns Token

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
  • Restore shapes to the rendering layer.

    Returns this

setBodyFillStyle

  • Set fill style of Series.

    Example Usage:

    // Specified FillStyle
    BoxAndWhiskers.setBodyFillStyle(new SolidFill({ color: ColorHEX('#F00') }))
    // Changed transparency
    BoxAndWhiskers.setBodyFillStyle((solidFill) => solidFill.setA(80))
    // Hidden (emptyFill is not supported)
    BoxAndWhiskers.setBodyFillStyle(transparentFill)
    

    Parameters

    Returns this

    Series itself for fluent interface.

setBodyFillStyleHighlight

  • Set fill style of Series when it is highlighted.

    // Specified FillStyle
    BoxAndWhiskers.setBodyFillStyleHighlight(new SolidFill({ color: ColorHEX('#F00') }))
    // Changed transparency
    BoxAndWhiskers.setBodyFillStyleHighlight((solidFill) => solidFill.setA(80))
    // Hidden (emptyFill is not supported)
    BoxAndWhiskers.setBodyFillStyleHighlight(transparentFill)
    // Automatic
    BoxAndWhiskers.setBodyFillStyleHighlight(undefined)
    

    Parameters

    Returns this

    Series itself for fluent interface.

setBodyStrokeStyle

  • Set border style of Series.

    // Specified SolidLine
    BoxAndWhiskers.setBodyStrokeStyle(new SolidLine({ thickness: 2, fillStyle: new SolidFill({ color: ColorHEX('#F00') }) }))
    // Changed thickness
    BoxAndWhiskers.setBodyStrokeStyle((solidLine) => solidLine.setThickness(5))
    // Hidden (emptyLine is not supported)
    BoxAndWhiskers.setBodyStrokeStyle(transparentLine)
    

    Parameters

    Returns this

    Series itself for fluent interface.

setBodyStrokeStyleHighlight

  • Set line style of Series border 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:

    // Specified SolidLine
    BoxAndWhiskers.setBodyStrokeStyleHighlight(new SolidLine({ thickness: 2, fillStyle: new SolidFill({ color: ColorHEX('#F00') }) }))
    // Changed thickness
    BoxAndWhiskers.setBodyStrokeStyleHighlight((solidLine) => solidLine.setThickness(5))
    // Hidden (emptyLine is not supported)
    BoxAndWhiskers.setBodyStrokeStyleHighlight(transparentLine)
    // Automatic
    BoxAndWhiskers.setBodyStrokeStyleHighlight(undefined)
    

    Parameters

    Returns this

    Chart itself

setBodyWidth

  • setBodyWidth(width: number): this
  • Set width of box body as a % of the width of its interval width.

    Parameters

    • width: number

      Ratio between box body width and the segments interval

    Returns this

    Object itself

setHighlighted

  • setHighlighted(isHighlighted: boolean): this
  • Set highlighted state of the Object

    Parameters

    • isHighlighted: boolean

      Highlight state of the object

    Returns this

    Object itself for fluent interface

setMedianStrokeStyle

  • Set stroke style of Series median line.

    Example usage:

    // Specified SolidLine
    BoxAndWhiskers.setMedianStrokeStyle(new SolidLine({ thickness: 2, fillStyle: new SolidFill({ color: ColorHEX('#F00') }) }))
    // Changed thickness
    BoxAndWhiskers.setMedianStrokeStyle((solidLine) => solidLine.setThickness(5))
    // Hidden (emptyLine is not supported)
    BoxAndWhiskers.setMedianStrokeStyle(transparentLine)
    

    Parameters

    Returns this

    Chart itself

setMedianStrokeStyleHighlight

  • Set stroke style of Series median line 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:

    // Specified SolidLine
    BoxAndWhiskers.setMedianStrokeStyleHighlight(new SolidLine({ thickness: 2, fillStyle: new SolidFill({ color: ColorHEX('#F00') }) }))
    // Changed thickness
    BoxAndWhiskers.setMedianStrokeStyleHighlight((solidLine) => solidLine.setThickness(5))
    // Hidden (emptyLine is not supported)
    BoxAndWhiskers.setMedianStrokeStyleHighlight(transparentLine)
    // Automatic
    BoxAndWhiskers.setMedianStrokeStyleHighlight(undefined)
    

    Parameters

    Returns this

    Chart itself

setMouseInteractions

  • setMouseInteractions(state: boolean): this
  • Set mouse interactions enabled or disabled

    Parameters

    • state: boolean

      Specifies state of mouse interactions

    Returns this

    Object itself for fluent interface

setStrokeStyle

  • Set stroke style of Series whiskers and tails.

    Example usage:

    // Specified SolidLine
    BoxAndWhiskers.setStrokeStyle(new SolidLine({ thickness: 2, fillStyle: new SolidFill({ color: ColorHEX('#F00') }) }))
    // Changed thickness
    BoxAndWhiskers.setStrokeStyle((solidLine) => solidLine.setThickness(5))
    // Hidden (emptyLine is not supported)
    BoxAndWhiskers.setStrokeStyle(transparentLine)
    

    Parameters

    Returns this

    Chart itself

setStrokeStyleHighlight

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

    Example usage:

    // Specified SolidLine
    BoxAndWhiskers.setStrokeStyleHighlight(new SolidLine({ thickness: 2, fillStyle: new SolidFill({ color: ColorHEX('#F00') }) }))
    // Changed thickness
    BoxAndWhiskers.setStrokeStyleHighlight((solidLine) => solidLine.setThickness(5))
    // Hidden (emptyLine is not supported)
    BoxAndWhiskers.setStrokeStyleHighlight(transparentLine)
    // Automatic
    BoxAndWhiskers.setStrokeStyleHighlight(undefined)
    

    Parameters

    Returns this

    Chart itself

setTailWidth

  • setTailWidth(width: number): this
  • Set width of box tails as a % of the width of its interval width.

    Parameters

    • width: number

      Ratio between box tail width and the segments interval

    Returns this

    Object itself