React Polar Band | Polar Error Bands Chart

Create a React Polar Band Chart using SciChart.js

Fullscreen

Edit

 Edit

Docs

drawExample.ts

index.tsx

theme.ts

Copy to clipboard
Minimise
Fullscreen
1import {
2    PolarMouseWheelZoomModifier,
3    PolarZoomExtentsModifier,
4    PolarPanModifier,
5    PolarNumericAxis,
6    SciChartPolarSurface,
7    EPolarAxisMode, 
8    NumberRange, 
9    EAxisAlignment, 
10    EPolarLabelMode,
11    PolarBandRenderableSeries,
12    XyyDataSeries,
13    PolarLegendModifier,
14    SweepAnimation,
15} from "scichart";
16import { appTheme } from "../../../theme";
17
18export const drawExample = async (rootElement: string | HTMLDivElement) => {
19    const { sciChartSurface, wasmContext } = await SciChartPolarSurface.create(rootElement, {
20        theme: appTheme.SciChartJsTheme,
21    });
22
23    const radialYAxis = new PolarNumericAxis(wasmContext, {
24        polarAxisMode: EPolarAxisMode.Radial,
25        axisAlignment: EAxisAlignment.Right,
26        visibleRange: new NumberRange(0, 6),
27        drawMinorTickLines: false,
28        drawMajorTickLines: false,
29        useNativeText: true,
30        drawMinorGridLines: false,
31        startAngle: Math.PI / 2,
32        zoomExtentsToInitialRange: true,
33        labelPrecision: 0,
34        innerRadius: 0.1, // donut hole
35    });
36    sciChartSurface.yAxes.add(radialYAxis);
37
38    const polarXAxis = new PolarNumericAxis(wasmContext, {
39        polarAxisMode: EPolarAxisMode.Angular,
40        axisAlignment: EAxisAlignment.Top,
41
42        polarLabelMode: EPolarLabelMode.Parallel,
43        visibleRange: new NumberRange(0, 12),
44
45        autoTicks: false,
46        majorDelta: 1,
47
48        useNativeText: true,
49        flippedCoordinates: true, // go clockwise
50        startAngle: Math.PI / 2, // start at 12 o'clock
51        zoomExtentsToInitialRange: true,
52        labelPrecision: 0,
53    });
54    sciChartSurface.xAxes.add(polarXAxis);
55
56    // regular (non-interpolated) band
57    const polarBand1 = new PolarBandRenderableSeries(wasmContext, {
58        dataSeries: new XyyDataSeries(wasmContext, {
59            xValues: [0, 1, 2, 3, 4, 5],
60            yValues: [1, 2, 3, 4, 5, 6],
61            y1Values: [6, 5, 1, 5, 4, 2],
62            dataSeriesName: "Regular Band",
63        }),
64        stroke: appTheme.VividOrange,
65        strokeY1: appTheme.VividSkyBlue,
66        fill: appTheme.VividOrange + "88",
67        fillY1: appTheme.VividSkyBlue + "88",
68        strokeThickness: 3,
69        interpolateLine: false, // not interpolated
70        animation: new SweepAnimation({ duration: 400, delay: 400 }),
71    });
72    sciChartSurface.renderableSeries.add(polarBand1);
73
74    // interpolated band
75    const polarBand2 = new PolarBandRenderableSeries(wasmContext, {
76        dataSeries: new XyyDataSeries(wasmContext, {
77            xValues: [6, 7, 8, 9, 10, 11],
78            yValues: [1, 2, 3, 4, 5, 6],
79            y1Values: [6, 5, 1, 5, 4, 2],
80            dataSeriesName: "Interpolated Band",
81        }),
82        stroke: appTheme.VividPink,
83        strokeY1: appTheme.VividGreen,
84        fill: appTheme.VividPink + "88",
85        fillY1: appTheme.VividGreen + "88",
86        strokeThickness: 3,
87        interpolateLine: true,
88        animation: new SweepAnimation({ duration: 400 }),
89    });
90    sciChartSurface.renderableSeries.add(polarBand2);
91
92    sciChartSurface.chartModifiers.add(
93        new PolarPanModifier(),
94        new PolarZoomExtentsModifier(),
95        new PolarMouseWheelZoomModifier(),
96        new PolarLegendModifier({
97            showCheckboxes: true,
98        })
99    );
100
101    return { sciChartSurface, wasmContext };
102};

Polar Band Chart - React

Overview

This React example demonstrates how to integrate a Polar Band Chart using SciChart's React components. The chart displays two polar band series with different interpolation modes in a polar coordinate system.

Technical Implementation

The chart is rendered using the SciChartReact component with an initChart prop pointing to the drawExample function. This function creates a polar surface with radial and angular axes, then adds two PolarBandRenderableSeries instances with SweepAnimation for smooth transitions. The implementation uses React's component lifecycle for proper initialization and cleanup.

Features and Capabilities

The example highlights React-specific integration of polar chart features including animated series, interactive modifiers (PolarMouseWheelZoomModifier, PolarZoomExtentsModifier), and a configurable legend. The component demonstrates how to apply theme colors from a shared appTheme object.

Integration and Best Practices

The implementation shows best practices for using SciChart in React, including async initialization and proper component structure. For more on React integration, see the SciChart React documentation.

react Chart Examples & Demos

See Also: Polar Charts (21 Demos)

React Polar Line Chart | React Charts | SciChart.js Demo

React 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.

React Polar Spline Line Chart | React Charts | SciChart.js

React Polar Spline Line Chart

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

React Multi-Cycle Polar Line | React Charts | SciChart.js

React Multi Cycle-Polar Line Example

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

React Polar Column Chart | React Polar Bar Chart | SciChart

React Polar Column | React Polar Bar

Try the React Polar Bar Chart example to render bars in a polar layout with gradient fills and animations. Use SciChart for seamless integration with React.

React Polar Column Category Chart | SciChart.js Demo

React Polar Column Category Chart

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

React Polar Range Column Chart | React Charts | SciChart.js

React Polar Range Column Chart

Create a React Polar Range Column Chart with SciChart. This example displays monthly minimum and maximum temperatures within a Polar layout. Try the demo.

React Windrose Plot | React Polar Stacked Radial Column Chart

React Windrose Plot | React Polar Stacked Radial Column Chart

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

React Polar Sunburst Chart | React Charts | SciChart.js

React Polar Sunburst Chart

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

React Polar Radial Column Chart | React Charts | SciChart.js

React Polar Radial Column Chart

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

React Stacked Radial Column Chart | Stacked Radial Bar Chart

React Stacked Radial Column Chart | Stacked Radial Bar Chart

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

React Polar Area Chart | Polar Mountain Chart | SciChart

React Polar Area Chart | Polar Mountain Chart

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

React Polar Stacked Radial Mountain Chart | SciChart.js

React Polar Stacked Radial Mountain Chart

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

React Polar Scatter Chart | React Charts | SciChart.js Demo

React Polar Scatter Chart

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

React Polar Radar Chart | Spider Radar Chart | SciChart

React Polar Radar Chart

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

React Polar Gauge Chart | React Circular Gauge | SciChart

React Gauge Charts

Create React Gauge Charts, including a React Circular Gauge Dashboard, with React-friendly initialization and responsive design. Give the SciChart demo a go.

React Arc Gauge & FIFO Scrolling Charts Dashboard | SciChart

React Arc Gauge & FIFO Scrolling Charts Dashboard Example

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

React Polar Uniform Heatmap Chart | SciChart.js Demo

React Polar Uniform Heatmap Chart

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

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

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

No description available for this example yet

React Polar Partial Arc | React Charts | SciChart.js Demo

React Polar Partial Arc

Create a React 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.

React Polar Axis Label Modes | React Charts | SciChart.js

React Polar Axis Label Modes

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

React Polar Map Example | React Charts | SciChart.js Demo

React 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.