JavaScript 3D Bubble Chart

Our team demonstrates how to create a JavaScript 3D Bubble Chart using SciChart.js, capable of creating detailed 3D JavaScript Charts.

Fullscreen

Edit

 Edit

Docs

drawExample.ts

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

Bubble 3D Chart in JavaScript

Overview

This example demonstrates the creation of an interactive 3D bubble chart using SciChart.js in a JavaScript environment. The chart leverages the power of WebAssembly for high-performance rendering and offers advanced features such as custom tooltip rendering, interactive 3D modifiers, and efficient data series management.

Technical Implementation

The chart is initialized by creating a new SciChart3DSurface with a WebAssembly context, as described in the 3D Tutorial. Asynchronous initialization is handled using Promise.all to ensure that both the chart setup and data fetching complete before rendering. Interactive modifiers such as MouseWheelZoomModifier3D, OrbitModifier3D, and ResetCamera3DModifier are added to enable smooth 3D navigation; learn more in the Orbit Modifier 3D documentation. Custom camera control is achieved via the CameraController, allowing for precise positioning of the 3D view.

Features and Capabilities

The example features a sophisticated custom tooltip implementation using TooltipModifier3D. Data points in the scatter renderable series are enriched with metadata (such as country, life expectancy, GDP per capita, and year), and tooltips are rendered using custom data and SVG templates as outlined in the Tooltip Modifier 3D documentation. Additionally, each of the 3D axes is configured using NumericAxis3D with specified visible ranges and label precision. Detailed information on axis configuration can be found in the NumericAxis3D API documentation.

Integration and Best Practices

Resource cleanup is managed via a destructor function that calls the delete method on the SciChartSurface, in accordance with best practices described in the Memory Best Practices documentation. The asynchronous pattern using Promise.all is further supported by guidelines discussed in the MDN Promise.all documentation. By integrating these advanced features in a JavaScript framework, the example illustrates how to build high-performance, customizable 3D charts using SciChart.js.

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