Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PolarAxisAmplitude

Class that represents the amplitude value interval on a PolarChart.

The Amplitude Axis is depicted as a single line segment starting from the very center of the PolarChart and ending at its right side.

The Amplitude Axes' tick grid lines travel all over the PolarCharts Series space, doing a full 360 degree until returning to the other end of the tick, along the Amplitude Axis.

The Amplitude Axes' title is positioned just below the Axis line and centered horizontally.

Here is a list of the most commonly useful methods of Polar Amplitude Axis:

Index

Properties

_overrideTickLabelVisibility

_overrideTickLabelVisibility : undefined

Function which can override whether a tick should be hidden.

param

Tick object.

returns

If 'false' is returned, tick will be hidden.

Methods

_alignTickLabel

  • _alignTickLabel(polarScale: RadialScale, tick: PolarAxisTick): object
  • Method which aligns Tick label (general location is set predefined).

    Parameters

    • polarScale: RadialScale

      Polar scale.

    • tick: PolarAxisTick

      Tick object.

    Returns object

    Text alignment, rotation and padding.

    • alignment: Point
    • padding: Point
    • rotation: number

_createTickGridlineShape

  • _createTickGridlineShape(layer: LayerXY, scale: RadialScale): Arc | Line
  • Method which creates shape for rendering Tick gridline. Used shape depends on type of Axis:

    • Amplitude: Line
    • Radial: Arc

    Parameters

    • layer: LayerXY

      Layer for rendering Tick.

    • scale: RadialScale

      Scale for rendering Tick.

    Returns Arc | Line

    Arc or Line.

_getPolarPositionAlongAxis

  • _getPolarPositionAlongAxis(polarScale: RadialScale, axisValue: number): Point
  • Method which gets a position in XY coordinates from a given Axis value.

    Parameters

    • polarScale: RadialScale

      PolarScale.

    • axisValue: number

      Value along the Axis.

    Returns Point

    XY coordinate.

_plot

  • _plot(): number
  • Update rendering shape states.

    Returns number

    Axis margin as pixels.

_plotAxisLine

  • _plotAxisLine(polarScale: RadialScale, style: LineStyle, margin: number): void
  • Method which plots Axis line, itself.

    Parameters

    • polarScale: RadialScale

      Polar scale.

    • style: LineStyle

      Style of Axis line.

    • margin: number

      Axis margin as pixels.

    Returns void

_plotAxisTitle

  • _plotAxisTitle(polarScale: RadialScale, title: Text, margin: number): void
  • Method which plots Axis Title.

    Parameters

    • polarScale: RadialScale

      Polar scale.

    • title: Text

      Text shape used to render title.

    • margin: number

      Axis margin as pixels.

    Returns void

_positionTickLines

  • _positionTickLines(polarScale: RadialScale, gridline: Arc, tickline: Line, tick: PolarAxisTick): void
  • Method which positions shape used to render Tick gridline.

    Parameters

    • polarScale: RadialScale

      PolarScale.

    • gridline: Arc

      Gridline shape. Class depends on type of Axis.

    • tickline: Line

      Tickline shape.

    • tick: PolarAxisTick

      Tick object.

    Returns void

disableAnimations

  • disableAnimations(): this
  • Disable all animations for the Axis.

    After calling this function, animations (Zooming, scaling) will be disabled. Animations must be recreated manually afterwards.

    Returns this

    Axis itself for fluent interface.

fit

  • fit(animate?: number | boolean, freeze: boolean): this
  • Fit axis view to attached series.

    Parameters

    • animate: number | boolean

      Boolean for animation enabled, or number for animation duration in milliseconds

    • freeze: boolean

      Freeze axis to fitted view? False by default.

    Returns this

formatValue

  • formatValue(value: number): string
  • Format a value along axis to string. Behavior depends on the Axis' TickStrategy. Eq. A DateTime-Axis will interpret 'value' as a Date.

    Parameters

    • value: number

      Value along axis

    Returns string

    Value formated to string

getInterval

  • Get the currently applied axis scale interval.

    Returns AxisInterval

    Object containing the current start and end of Axis.

getScrollStrategy

  • getScrollStrategy(): AxisScrollStrategy | undefined
  • Returns AxisScrollStrategy | undefined

    Current AxisScrollStrategy

getStrokeStyle

  • getStrokeStyle(): LineStyle
  • Returns LineStyle

    Axis stroke as a LineStyle object

getTickStrategy

  • getTickStrategy(): TickStrategyType
  • Get the currently used tick strategy

    Returns TickStrategyType

getTitle

  • getTitle(): string
  • Returns string

    Axis title string

getTitleFillStyle

getTitleFont

  • Get font of axis labels.

    Returns FontSettings

    FontSettings

isStopped

  • isStopped(): boolean
  • Get is axes' scrolling currently prevented by usage of mouse-interactions or 'stop()' method.

    Returns boolean

    Boolean flag

offScaleChange

  • offScaleChange(token: Token): boolean
  • Remove subscription from scale change event

    Parameters

    • token: Token

      Event listener

    Returns boolean

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

onScaleChange

  • onScaleChange(listener: function): Token
  • Subscribe to on scale change event

    Parameters

    • listener: function

      Event listener

        • Parameters

          • start: number
          • end: number

          Returns void

    Returns Token

    Token that is used to unsubscribe from the event

Readonly release

  • release(): void
  • Undo effects of 'stop'.

    Returns void

setAnimationScroll

  • setAnimationScroll(enabled: boolean | undefined): this
  • Specifies scroll animation.

    Parameters

    • enabled: boolean | undefined

      Boolean flag for whether scrolling should be animated or not.

    Returns this

setAnimationZoom

  • setAnimationZoom(easing: AnimationEasing | undefined, duration: number): this
  • Specifies zoom animation to use.

    Example usage:

    Desired result Argument Parameters
    Change animation setAnimationZoom(AnimationEasings.easeOut, 500) First parameter defines the easing to use for the animation. Second parameter is optional, and defines the duration for the animation
    Disable zooming animations axis.setAnimationZoom(undefined) Passing undefined as the parameter will disable the zooming animations for the Axis.

    Parameters

    • easing: AnimationEasing | undefined

      Easing of animation. Undefined disables zoom animations. See 'common/animator.Easings' for defaults

    • duration: number

      Optional default duration for zooming animations in milliseconds

    Returns this

setInterval

  • setInterval(start: number, end: number, animate: number | boolean | undefined, disableScrolling: boolean | undefined): this
  • Set axis scale interval.

    Parameters

    • start: number

      Start scale value

    • end: number

      End scale value

    • animate: number | boolean | undefined

      Boolean for animation enabled, or number for animation duration in milliseconds

    • disableScrolling: boolean | undefined

      If true, disables automatic scrolling after setting interval

    Returns this

    Object itself for fluent interface

setMouseInteractions

  • setMouseInteractions(enabled: boolean): this
  • Enable / disable all interactions of Axis.

    Parameters

    • enabled: boolean

      Interactions enabled or not.

    Returns this

    Object itself for fluent interface.

setScrollStrategy

  • setScrollStrategy(scrollStrategy?: AxisScrollStrategy): this
  • Specify ScrollStrategy of the Axis. This decides where the Axis scrolls based on current view and series boundaries.

    Parameters

    • scrollStrategy: AxisScrollStrategy

      AxisScrollStrategy or undefined to disable automatic scrolling. See AxisScrollStrategies for all options.

    Returns this

    Object itself for fluent interface.

setStrokeStyle

  • Specifies axis stroke

    Parameters

    Returns this

    Axis itself for fluent interface

setTickStrategy

  • setTickStrategy(tickStrategy: TickStrategy, styler?: TickStrategyStyler<TickStrategyParameters, TickStrategy>): this
  • Set TickStrategy of Axis.

    The TickStrategy defines the positioning and formatting logic of Axis ticks as well as the style of created ticks.

    Example usage:

    DateTime Axis:

    Axis.setTickStrategy( AxisTickStrategies.DateTime )

    Disable automatic ticks completely:

    Axis.setTickStrategy( AxisTickStrategies.Empty )

    Customized TickStrategy:

    Axis.setTickStrategy( AxisTickStrategies.Numeric, ( tickStrategy: NumericTickStrategy ) => tickStrategy
        .setNumericUnits( true )
        .setMajorTickStyle( ( tickStyle ) => tickStyle
            .setLabelFont( ( font ) => font
                .setWeight( 'bold' )
            )
        )
    )

    Type table for optional second parameter ('styler'):

    tickStrategy styler
    'Numeric' ( tickStrategy: NumericTickStrategy ) => tickStrategy
    'DateTime' ( tickStrategy: DateTimeTickStrategy ) => tickStrategy
    'Empty' undefined

    Type parameters

    • TickStrategy: TickStrategyType

    Parameters

    • tickStrategy: TickStrategy

      Selected TickStrategy. See AxisTickStrategies for a collection of options.

    • styler: TickStrategyStyler<TickStrategyParameters, TickStrategy>

      Optional callback that can be used to customize the TickStrategy. The type of supplied TickStrategy object depends on what was supplied to 'tickStrategy' parameter; See the above method documentation for a value table.

    Returns this

    Object itself for fluent interface.

setTickStyle

  • setTickStyle(styler: TickStrategyStyler<TickStrategyParameters, TickStrategy>): this
  • Type parameters

    • TickStrategy: TickStrategyType

    Parameters

    • styler: TickStrategyStyler<TickStrategyParameters, TickStrategy>

    Returns this

setTitle

  • setTitle(title: string): this
  • Specifies an Axis title string

    Parameters

    • title: string

      Axis title as a string

    Returns this

    Axis itself for fluent interface

setTitleFillStyle

  • Specifies Axis title FillStyle

    Parameters

    Returns this

    Axis itself for fluent interface

setTitleFont

stop

  • stop(): this
  • Stop scrolling of axis until restored.

    Returns this