Chart Background Image with Transparency

Demonstrates how to create a Chart with Transparent Background using SciChart.js, High Performance JavaScript Charts

Fullscreen

Edit

 Edit

Docs

drawExample.ts

Copy to clipboard
Minimise
Fullscreen
1// Loading ... 

Charts with Transparent Backgrounds Example using JavaScript

Overview

This example demonstrates how to create a SciChart.js chart with a fully transparent background. By setting the chart's background to "Transparent", the underlying DOM—such as a CSS background image—can be seen, enabling rich visual integrations for custom-themed web applications.

Technical Implementation

Implemented in JavaScript, the chart is initialized asynchronously using the SciChartSurface.create() method. Performance is optimized through the use of WebAssembly (wasmContext), ensuring fast rendering and high responsiveness. The numeric axes are configured with custom grid lines, band fills, and label styles as detailed in the Axis Styling: Title, Labels, Gridlines and Axis Band Style documentation. The transparent background is applied by setting sciChartSurface.background to "Transparent", a technique explained in the Transparent Background documentation.

Features and Capabilities

The chart incorporates several renderable series including a spline line, bubble, and column series. Each series utilizes dynamic animations—such as SweepAnimation and WaveAnimation — to create engaging visual effects, a concept described in the Series Startup Animations documentation. Additionally, interactive modifiers like ZoomPanModifier, MouseWheelZoomModifier, and ZoomExtentsModifier are added to enable smooth real-time navigation and user interaction.

Integration and Best Practices

This example follows best practices for high-performance charting by leveraging the WebAssembly context for rendering efficiency. Data series are configured using clear JSON-style setups, making it straightforward to modify and extend the chart's functionality as needed. Developers can refer to the Working with Data documentation for more details on customizing series and interactivity. Overall, this transparent background example serves as a solid reference for integrating SciChart.js into JavaScript projects requiring advanced styling and seamless background integration.

javascript Chart Examples & Demos

See Also: Styling and Theming (11 Demos)

Styling a JavaScript Chart in Code | SciChart.js Demo

Styling a JavaScript Chart in Code

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

Using Theme Manager in JavaScript Chart | SciChart.js

Using Theme Manager in JavaScript Chart

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

Create a Custom Theme for JavaScript Chart | SciChart.js

Create a Custom Theme for JavaScript Chart

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

Coloring Series per-point using the PaletteProvider

Coloring Series per-point using the PaletteProvider

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

JavaScript Point-Markers Chart | Javascript Charts | SciChart.js

JavaScript Point-Markers Chart

Demonstrates the different point-marker types for JavaScript Scatter charts (Square, Circle, Triangle and Custom image point-marker)

Dashed Line Styling | Javascript Charts | SciChart.js Demo

Dashed Line Styling

Demonstrates dashed line series in JavaScript Charts with SciChart.js

Data Labels | Javascript Charts | SciChart.js Demo

Data Labels

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

JavaScript Chart with Multi-Style Series | SciChart.js

JavaScript Chart with Multi-Style Series

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

JavaScript Chart with lines split by thresholds | SciChart

JavaScript Chart with lines split by thresholds

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

JavaScript Chart Title | Javascript Charts | SciChart.js Demo

JavaScript Chart Title

Demonstrates chart title with different position and alignment options

NEW!
JavaScript Order of Rendering | Javascript Charts | SciChart.js

JavaScript Order of Rendering Example

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.

SciChart Ltd, 16 Beaufort Court, Admirals Way, Docklands, London, E14 9XL.