Series type for visualizing a collection of { x, y, z } coordinates by a continuous line stroke.

LineSeries3D is optimized for massive amounts of data - here are some reference specs to give an idea:

  • A static data set in millions data points range is rendered in hundreds of milliseconds (~200ms). Afterwards chart can be rotated and zoomed with 60 FPS.
  • With streaming data, even millions of data points can be streamed in every second, while retaining an interactive document.

Creating LineSeries3D:

LineSeries3D are created with addLineSeries method.

 // Example syntax, create line series 3D
const lineSeries3D = Chart3D.addLineSeries()

Frequently used methods:

  • Append data points to series | add
  • Remove all data points from series | clear
  • Configure style of line stroke | setStrokeStyle
  • Destory series permanently | dispose

Color shading style.

By default, LineSeries3D uses Phong shading style.

This can be changed with LineSeries3D.setColorShadingStyle(new ColorShadingStyles.Simple())

Related information:

To combine line stroke with markers over each data coordinate, PointLineSeries3D can be used.

Hierarchy

Properties

_shadingStyle: ColorShadingStyle = _phongShadingStyle

Methods

  • Permanently destroy the component.

    To fully allow Garbage-Collection to free the resources used by the component, make sure to remove any references to the component and its children in application code.

    let chart = ...ChartXY()
    let axisX = chart.getDefaultAxisX()
    // Dispose Chart, and remove all references so that they can be garbage-collected.
    chart.dispose()
    chart = undefined
    axisX = undefined

    Returns

    Object itself for fluent interface

    Returns LineSeries3D

  • Get whether series is taken into account with automatic scrolling and fitting of attached axes.

    By default, this is true for all series.

    Returns

    true default, axes will take series into account in scrolling and fitting operations. false, axes will ignore series boundaries.

    Returns boolean

  • Get 3D depth test enabled for this series.

    By default this is enabled, meaning that any series that is rendered after this series and is behind this series will not be rendered.

    Can be disabled to alter 3D rendering behavior.

    Returns

    Depth test enabled?

    Returns boolean

  • Get theme effect enabled on component or disabled.

    A theme can specify an Effect to add extra visual oomph to chart applications, like Glow effects around data or other components. Whether this effect is drawn above a particular component can be configured using the setEffect method.

     // Example, disable theme effect from a particular component.
    Component.setEffect(false)

    For the most part, theme effects are enabled by default on most components.

    Theme effect is configured with effect property.

    Returns

    Boolean that describes whether drawing the theme effect is enabled around the component or not.

    Returns boolean

  • Get state of component highlighting.

    In case highlight animations are enabled, this method returns the unanimated highlight value.

    Returns

    Number between 0 and 1, where 1 is fully highlighted.

    Returns number

  • Get boolean flag for whether object should highlight on mouse hover

    Returns

    Boolean for if object should highlight on mouse hover or not.

    Returns boolean

  • Get boolean flag for whether object is currently under mouse or not

    Returns

    Boolean for is object under mouse currently

    Returns boolean

  • Get mouse interactions enabled or disabled. Disabled mouse-interactions will naturally prevent mouse-driven highlighting from ever happening.

    Returns

    Mouse interactions state

    Returns boolean

  • Get the name of the Component.

    Returns

    The name of the Component.

    Returns string

  • Get element visibility.

    Returns

    true when element is set to be visible and false otherwise.

    Returns boolean

  • Remove event listener from dispose event.

    Returns

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

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Unsubscribe from Highlight object event. This is called whenever an object is highlighted

    Returns

    True if the unsubscription was successful.

    Parameters

    • token: Token

      Token that was received when subscribing to the event.

    Returns boolean

  • Remove event listener from Mouse Click Event

    Returns

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

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Double Click Event

    Returns

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

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Down Event

    Returns

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

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Drag Event

    Returns

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

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Drag Start Event

    Returns

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

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Drag Stop Event

    Returns

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

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Enter Event

    Returns

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

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Leave Event

    Returns

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

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Move Event

    Returns

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

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Up Event

    Returns

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

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Wheel Event

    Returns

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

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Touch End Event

    Returns

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

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Touch Move Event

    Returns

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

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Touch Start Event

    Returns

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

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Subscribe onDispose event. This event is triggered whenever the ChartComponent is disposed.

     // Example usage

    lineSeries.onDispose(() => {
    console.log('lineSeries was disposed')
    })

    lineSeries.dispose()

    Returns

    Token of subscription

    Parameters

    Returns Token

  • Subscribe to highlight object event. This is called whenever an object is highlighted.

    Returns

    Token that can be used to unsubscribe from the event.

    Parameters

    • handler: ((isHighlighted: number | boolean) => void)

      Function that is called when event is triggered.

        • (isHighlighted: number | boolean): void
        • Parameters

          • isHighlighted: number | boolean

          Returns void

    Returns Token

  • Set component highlight animations enabled or not. For most components this is enabled by default.

     // Example usage, disable highlight animations.
    component.setAnimationHighlight(false)

    Returns

    Object itself

    Parameters

    • enabled: boolean

      Animation enabled?

    Returns LineSeries3D

  • Set whether series is taken into account with automatic scrolling and fitting of attached axes.

    By default, this is true for all series.

    By setting this to false, any series can be removed from axis scrolling/fitting.

     // Example syntax, remove series from automatic scrolling / fitting.
    LineSeries.setAutoScrollingEnabled(false)

    Returns

    Object itself for fluent interface.

    Parameters

    • enabled: boolean

      true default, axes will take series into account in scrolling and fitting operations. false, axes will ignore series boundaries.

    Returns LineSeries3D

  • Set Color Shading Style for series.

    Shading style changes the visual style of the rendering. See ColorShadingStyles for available shading styles.

    Use Simple color shading style:

    series3D.setShadingStyle(new ColorShadingStyles.Simple())
    

    Use Phong color shading style:

    series3D.setShadingStyle(new ColorShadingStyles.Phong())
    

    Configuring specular highlight for Phong shading style:

    series3D.setShadingStyle(new ColorShadingStyles.Phong({
    specularReflection: 0.5,
    specularColor: ColorRGBA(255, 255, 255)
    }))

    Returns

    Object itself for fluent interface.

    Parameters

    Returns LineSeries3D

  • Set 3D depth test enabled for this series.

    By default this is enabled, meaning that any series that is rendered after this series and is behind this series will not be rendered.

    Can be disabled to alter 3D rendering behavior.

     // Example syntax, disable depth test.
    pointSeries3D.setDepthTestEnabled(false)

    Returns

    Object itself for fluent interface.

    Parameters

    • enabled: boolean

      Depth test enabled?

    Returns LineSeries3D

  • Set theme effect enabled on component or disabled.

    A theme can specify an Effect to add extra visual oomph to chart applications, like Glow effects around data or other components. Whether this effect is drawn above a particular component can be configured using the setEffect method.

     // Example, disable theme effect from a particular component.
    Component.setEffect(false)

    For the most part, theme effects are enabled by default on most components.

    Theme effect is configured with effect property.

    Returns

    Object itself.

    Parameters

    • enabled: boolean

      Theme effect enabled

    Returns LineSeries3D

  • Set state of component highlighting.

     // Example usage

    component.setHighlight(true)

    component.setHighlight(0.5)

    If highlight animations are enabled (which is true by default), the transition will be animated. As long as the component is highlighted, the active highlight intensity will be animated continuously between 0 and the configured value. Highlight animations can be disabled with setAnimationHighlight

    Returns

    Object itself

    Parameters

    • highlight: number | boolean

      Boolean or number between 0 and 1, where 1 is fully highlighted.

    Returns LineSeries3D

  • Set highlight on mouse hover enabled or disabled.

    Mouse interactions have to be enabled on the component for this to function as expected. See setMouseInteractions for more information.

    Returns

    Object itself for fluent interface.

    Parameters

    • state: boolean

      True if highlighting on mouse hover, false if no highlight on mouse hover

    Returns LineSeries3D

  • Set component mouse interactions enabled or disabled.

    Disabling mouse interactions means that the objects below this component can be interacted through it.

    Possible side-effects from disabling mouse interactions:

    • Mouse events are not triggered. For example, onMouseMove.
    • Mouse driven highlighting will not work.

    Returns

    Object itself for fluent interface

    Parameters

    • state: boolean

      Specifies state of mouse interactions

    Returns LineSeries3D

  • Set stroke style of Series.

     // Example syntax, specify LineStyle
    LineSeries3D.setStrokeStyle(new SolidLine({
    thickness: 2,
    fillStyle: new SolidFill({ color: ColorHEX('#F00') })
    }))
     // Example syntax, change active LineStyle
    LineSeries3D.setStrokeStyle((stroke) => stroke.setThickness(5))

    Use -1 thickness to enable primitive line rendering. Primitive line rendering can have slightly better rendering performance than line with 1 thickness but the quality of line is not as good.

     LineSeries3D.setStrokeStyle((solidLine) => solidLine.setThickness(-1))
    
    • Supported fill styles:

    SolidFill:

    Solid color for entire line series.

     // Example, solid colored line.
    LineSeries3D.setStrokeStyle(new SolidLine({
    thickness: 2,
    fillStyle: new SolidFill({ color: ColorRGBA(255, 0, 0) })
    }))

    To learn more about available Color factories, see ColorRGBA

    PalettedFill:

    Color line stroke dynamically based on x, y or z coordinate.

     // Example, dynamic color by Y coordinates
    LineSeries3D.setStrokeStyle(new SolidLine({
    thickness: 2,
    fillStyle: new PalettedFill({
    lookUpProperty: 'y',
    lut: new LUT({
    interpolate: true,
    steps: [
    { value: 0, color: ColorRGBA(255, 0, 0) },
    { value: 100, color: ColorRGBA(0, 255, 0) },
    ]
    })
    })
    }))

    To learn more about Color lookup tables, see LUT.

    • Primitive 3D line rendering

    LineSeries3D has a special feature for drawing primitive line sets.

    When enabled, this will draw all line segments as exactly 1 pixel thick on the monitor (regardless of distance from camera).

    As a benefit, this is considerably lighter on the GPU, which is especially good with mobile and laptop devices with weak GPUs.

    Primitive drawing is enabled by setting stroke thickness to -1:

     // Enable primitive 3D line drawing.
    LineSeries3D.setStrokeStyle((stroke) => stroke.setThickness(-1))
    • Other information

    In 3D, line thickness is not configured exactly as pixels (since the size of pixel is not affected by distance from camera).

    However, for usage convenience, you can consider line thickness in 3D as pixels just the same as 2D, even if the resulting visualization will have some differences.

    Returns

    Object itself for fluent interface.

    Parameters

    Returns LineSeries3D