JavaScript Polar Range Column Chart

Creates a JavaScript Polar Range Column Chart using SciChart.js, with y/y1 values for each column, using the XyyDataSeries

Fullscreen

Edit

 Edit

Docs

drawExample.ts

index.html

vanilla.ts

theme.ts

Copy to clipboard
Minimise
Fullscreen
1import {
2    PolarMouseWheelZoomModifier,
3    PolarZoomExtentsModifier,
4    PolarPanModifier,
5    PolarNumericAxis,
6    SciChartPolarSurface,
7    EPolarAxisMode,
8    NumberRange,
9    PolarCategoryAxis,
10    PolarColumnRenderableSeries,
11    XyyDataSeries,
12    SweepAnimation,
13} from "scichart";
14import { appTheme } from "../../../theme";
15
16export const MONTHS_SHORT = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
17export const TEMPERATURE_DATA = {
18    min: [
19        11.81948, 12.034697, 12.778375, 13.789007, 14.624746, 15.316486, 15.89393, 15.517554, 14.725496, 13.799661,
20        12.776523, 12.119616,
21    ],
22    max: [
23        12.493054, 12.817261, 14.034957, 14.891214, 15.676935, 16.244125, 16.889472, 16.512617, 15.804098, 14.787963,
24        13.775281, 13.000732,
25    ],
26};
27
28export const drawExample = async (rootElement: string | HTMLDivElement) => {
29    const { sciChartSurface, wasmContext } = await SciChartPolarSurface.create(rootElement, {
30        theme: appTheme.SciChartJsTheme,
31        title: "Min and Max surface temperature of each month of 2024",
32        titleStyle: {
33            fontSize: 24,
34        },
35    });
36
37    const radialYAxis = new PolarNumericAxis(wasmContext, {
38        polarAxisMode: EPolarAxisMode.Radial,
39        drawLabels: true,
40        labelPrecision: 0,
41        labelStyle: {
42            color: "white",
43        },
44        labelPostfix: "°C",
45        autoTicks: false,
46        majorDelta: 1,
47        drawMinorGridLines: false,
48        majorGridLineStyle: {
49            color: appTheme.DarkIndigo,
50            strokeThickness: 1,
51        },
52        visibleRange: new NumberRange(11, 17), // min and max temperatures
53        zoomExtentsToInitialRange: true,
54        innerRadius: 0.05, // donut hole
55        startAngle: Math.PI / 2, // start only after 12 o'clock
56    });
57    sciChartSurface.yAxes.add(radialYAxis);
58
59    const polarXAxis = new PolarCategoryAxis(wasmContext, {
60        polarAxisMode: EPolarAxisMode.Angular,
61        labels: MONTHS_SHORT,
62        autoTicks: false,
63        majorDelta: 1, // one tick per month
64
65        // replace minors with majors by not drawing majors and setting this:
66        minorsPerMajor: 2,
67        drawMajorGridLines: false,
68        drawMinorGridLines: true,
69        minorGridLineStyle: {
70            color: appTheme.DarkIndigo,
71            strokeThickness: 1,
72        },
73
74        drawMajorTickLines: false,
75        drawMinorTickLines: false,
76        flippedCoordinates: true, // grow clockwise
77        startAngle: Math.PI / 2 - Math.PI / 12,
78        visibleRange: new NumberRange(0, 12), // 12 months
79        zoomExtentsToInitialRange: true,
80    });
81    sciChartSurface.xAxes.add(polarXAxis);
82
83    // Add series
84    const xValues = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
85    const columns = new PolarColumnRenderableSeries(wasmContext, {
86        dataSeries: new XyyDataSeries(wasmContext, {
87            xValues,
88            yValues: TEMPERATURE_DATA.min,
89            y1Values: TEMPERATURE_DATA.max,
90        }),
91        dataPointWidth: 1,
92        fill: appTheme.VividSkyBlue + "44",
93        stroke: appTheme.VividSkyBlue,
94        animation: new SweepAnimation({ duration: 800 }),
95    });
96    sciChartSurface.renderableSeries.add(columns);
97
98    // Add modifiers
99    sciChartSurface.chartModifiers.add(
100        new PolarPanModifier(),
101        new PolarZoomExtentsModifier(),
102        new PolarMouseWheelZoomModifier()
103    );
104
105    return { sciChartSurface, wasmContext };
106};
107

Polar Range Column Chart - JavaScript

Overview

This example renders a Polar Range Column Chart visualizing monthly minimum and maximum surface temperatures using SciChart.js. It a polar surface with radial and angular axes to display a donut-style column series.

Technical Implementation

The chart is initialized via SciChartPolarSurface.create(), applying PolarNumericAxis for the radial axis (documentation) and PolarCategoryAxis for the angular axis to map 12 months evenly around the circle (layout guide). A PolarColumnRenderableSeries is configured with an XyyDataSeries supplying yValues (min) and y1Values (max), and animated via SweepAnimation.

Features and Capabilities

Real-time updates can be achieved by updating the data series. Interactive modifiers include PolarPanModifier, PolarZoomExtentsModifier, and PolarMouseWheelZoomModifier for smooth panning, zooming, and mouse-wheel control.

Integration and Best Practices

Use SciChartSurface.delete() to clean up WebAssembly resources when disposing. For performance, enable zoomExtentsToInitialRange on axes and minimize redraws by batching data updates.

javascript Chart Examples & Demos

See Also: Polar Charts (21 Demos)

JavaScript Polar Line Chart | Javascript Charts | SciChart.js

JavaScript Polar Line Chart

Explore the React Polar Line Chart example to create data labels, line interpolation, gradient palette stroke and startup animations. Try the SciChart Demo.

JavaScript Polar Spline Line Chart | SciChart.js Demo

JavaScript Polar Spline Line Chart

Try the JavaScript Polar Spline Line Chart example to see SciChart's GPU-accelerated rendering in action. Choose a cubic spline or polar interpolation. View demo.

JavaScript Multi-Cycle Polar Line | SciChart.js Demo

JavaScript Multi Cycle-Polar Line Example

Create a JavaScript Multi-Cycle Polar Chart to plot data over multiple cycles and visualize patterns over time. This example shows surface temperature by month.

JavaScript Polar Column Chart | Polar Bar Chart | SciChart

JavaScript Polar Column | Polar Bar

Try the JavaScript Polar Column or Bar Chart example to render bars in a polar layout with gradient fills and animations. Use SciChart for seamless integrations.

JavaScript Polar Column Category Chart | SciChart.js Demo

JavaScript Polar Column Category Chart

Create a JavaScript Polar Colum Category chart visualizing UK consumer price changes. Try the demo with a custom positive/negative threshold fill and stroke.

JavaScript Windrose Plot | Polar Stacked Radial Column Chart

JavaScript Windrose Plot | Polar Stacked Radial Column Chart

View the JavaScript Windrose Chart example to display directional data with stacked columns in a polar layout. Try the polar chart demo with customizable labels

JavaScript Polar Sunburst Chart | Javascript Charts | SciChart.js

JavaScript Polar Sunburst Chart

See the JavaScript Sunburst Chart example with multiple levels, smooth animation transitions and dynamically updating segment colors. Try the SciChart demo.

JavaScript Polar Radial Column Chart | SciChart.js Demo

JavaScript Polar Radial Column Chart

View the JavaScript Radial Column Chart example to see the difference that SciChart has to offer. Switch radial and angular axes and add interactive modifiers.

JavaScript Stacked Radial Column Chart | Stacked Radial Bar Chart

JavaScript Stacked Radial Column Chart | Stacked Radial Bar Chart

This JavaScript Stacked Radial Bar Chart example shows Olympic medal data by country. Try the demo for yourself with async initialization and theme application.

JavaScript Polar Area Chart | Polar Mountain Chart | SciChart

JavaScript Polar Area Chart | Polar Mountain Chart

The JavaScript Polar Area Chart example, also known as Nightingale Rose Chart, renders an area series with polar coordinates with interactive legend controls.

JavaScript Polar Stacked Radial Mountain Chart | SciChart

JavaScript Polar Stacked Radial Mountain Chart

Try the JavaScript Stacked Radial Mountain Chart example to show multiple datasets on a polar layout with a stacked mountain series and animated transitions.

JavaScript Polar Band | Polar Error Bands Chart | SciChart

JavaScript Polar Band | Polar Error Bands Chart

Create a JavaScript Polar Chart with regular and interpolated error bands. Enhance a standard chart with shaded areas to show upper and lower data boundaries.

JavaScript Polar Scatter Chart | Javascript Charts | SciChart.js

JavaScript Polar Scatter Chart

Build a JavaScript Polar Scatter Chart with this example to render multiple scatter series on radial and angular axes. Try the flexible SciChart demo today.

JavaScript Polar Radar Chart | Spider Radar Chart | SciChart

JavaScript Polar Radar Chart

View the JavaScript Polar Radar Chart example. Also known as the Spider Radar Chart, view the scalability and stability that SciChart has to offer. Try demo.

JavaScript Polar Gauge Chart | Circular Gauge Chart

JavaScript Gauge Charts

Create JavaScript Gauge Charts, including a JavaScript Circular Gauge Dashboard, with user-friendly initialization and responsive design. Give SciChart a go.

JavaScript Arc Gauge & FIFO Scrolling Charts Dashboard

JavaScript Arc Gauge & FIFO Scrolling Charts Dashboard Example

View JavaScript Arc Gauge Charts alongside FIFO Scrolling Charts, all on the same dashboard with real-time, high-performance data rendering. Try the demo.

JavaScript Polar Uniform Heatmap Chart | SciChart.js Demo

JavaScript Polar Uniform Heatmap Chart

Try SciChart's JavaScript Polar Heatmap example to combine a polar heatmap with a legend component. Supports responsive design and chart and legend separation.

JS Polar Heatmap | B-Mode Image Ultrasound | Medical Heatmap

JavaScript Polar Heatmap | B-Mode Image Ultrasound | Medical Heatmap

No description available for this example yet

JavaScript Polar Partial Arc | Javascript Charts | SciChart.js

JavaScript Polar Partial Arc

Create a JavaScript Polar Partial Arc that bends from a full Polar Circle to a Cartesian-like arc. Try the demo to display an arc segment with Polar coordinates.

JavaScript Polar Axis Label Modes | SciChart.js Demo

JavaScript Polar Axis Label Modes

Create a JavaScript Polar Axis Label with SciChart. This demo shows the various label modes for Polar Axes – all optimised for pan, zoom, and mouse wheel.

JavaScript Polar Map Example | Javascript Charts | SciChart.js

JavaScript Polar Map Example

View the React Polar Map Example using the SciChartReact component. Display geographic data as color-coded triangles on a polar coordinate system. Try demo.

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