Demonstrates how to create custom data-point markers on scatter/line using SciChart.js, High Performance JavaScript Charts
This example demonstrates how to render custom data-point markers using SciChart.js in a JavaScript application. It showcases a variety of marker types including Ellipse, Square, Triangle, Cross, and a custom image marker using that is loaded asynchronously. The example also illustrates how to handle gaps in the data by setting specific data points to NaN.
The chart is initialized asynchronously using the SciChartSurface.create() method, which efficiently loads the required WebAssembly resources for high-performance rendering. Multiple data series are generated with the XyDataSeries class and rendered using the SplineLineRenderableSeries for smooth, interpolated lines. Each data series is enhanced with a unique point marker implemented via classes such as EllipsePointMarker, SquarePointMarker, TrianglePointMarker, CrossPointMarker, and SpritePointMarker. The custom image marker leverages asynchronous image loading using the createImageAsync() function. Additionally, the implementation intentionally introduces a data gap by updating a data point to NaN, demonstrating how SciChart.js handles missing values as explained in the Drawing Gaps in Series documentation.
This example emphasizes high-performance chart rendering using WebGL along with real-time update capabilities and advanced interactivity. Interactive modifiers such as ZoomPanModifier and MouseWheelZoomModifier are integrated to allow smooth zooming and panning. Each renderable series is uniquely styled to clearly differentiate between the various data sets, even when data gaps occur.
Integrating SciChart.js into a JavaScript application is straightforward. The asynchronous initialization approach, as detailed in the Getting Started with SciChart JS guide and the Including SciChart.js in an HTML Page using CDN tutorial, ensures that all necessary assets are loaded efficiently. By modularizing the chart creation logic and handling asynchronous image loading properly, developers can achieve a maintainable and high-performance charting solution that follows best practices for real-time data visualization.

Demonstrates how to create a JavaScript Chart with background image using transparency in SciChart.js

Demonstrates how to style a JavaScript Chart entirely in code with SciChart.js themeing API

Demonstrates our Light and Dark Themes for JavaScript Charts with SciChart.js ThemeManager API

Demonstrates how to create a Custom Theme for a SciChart.js JavaScript Chart using our Theming API

Demonstrates per-point coloring in JavaScript chart types with SciChart.js PaletteProvider API

Demonstrates dashed line series in JavaScript Charts with SciChart.js

Show data labels on JavaScript Chart. Get your free demo now.

Demonstrates how to apply multiple different styles to a single series using RenderDataTransform

Demonstrates how to use a RenderDataTransform to split lines into multiple segments so they can be individually colored according to thresholds

Demonstrates chart title with different position and alignment options

The JavaScript Order of Rendering example gives you full control of the draw order of series and annotations for charts. Try SciChart's advanced customizations.