React Polar Column | React Polar Bar

Creates a React Polar Column Chart using the PolarColumnRenderableSeries, with the following features: DataLabels, Gradient fill, startup animations.

This plot type is Known As: Nightingale Rose Chart and Coxcomb Chart.

Fullscreen

Edit

 Edit

Docs

drawExample.ts

index.tsx

theme.ts

Copy to clipboard
Minimise
Fullscreen
1import {
2    PolarColumnRenderableSeries,
3    PolarMouseWheelZoomModifier,
4    PolarZoomExtentsModifier,
5    PolarPanModifier,
6    XyDataSeries,
7    PolarNumericAxis,
8    SciChartPolarSurface,
9    EPolarAxisMode, 
10    NumberRange, 
11    EAxisAlignment, 
12    GradientParams, 
13    Point, 
14    EPolarLabelMode,
15    WaveAnimation,
16} from "scichart";
17import { appTheme } from "../../../theme";
18
19export const drawExample = async (rootElement: string | HTMLDivElement) => {
20    const { sciChartSurface, wasmContext } = await SciChartPolarSurface.create(rootElement, {
21        theme: appTheme.SciChartJsTheme,
22        drawSeriesBehindAxis: true
23    });
24
25    const radialYAxis = new PolarNumericAxis(wasmContext, {
26        polarAxisMode: EPolarAxisMode.Radial,
27        axisAlignment: EAxisAlignment.Right,
28        visibleRange: new NumberRange(0, 6),
29        zoomExtentsToInitialRange: true,
30        
31        drawMinorTickLines: false,
32        drawMajorTickLines: false,
33        drawMinorGridLines: false,
34        majorGridLineStyle: {
35            color: appTheme.DarkIndigo,
36            strokeThickness: 1,
37        },
38        startAngle: Math.PI / 2,
39        drawLabels: false, // no radial labels
40
41        innerRadius: 0.1, // donut hole
42    });
43    sciChartSurface.yAxes.add(radialYAxis);
44
45    const polarXAxis = new PolarNumericAxis(wasmContext, {
46        polarAxisMode: EPolarAxisMode.Angular,
47        axisAlignment: EAxisAlignment.Top,
48        polarLabelMode: EPolarLabelMode.Parallel,
49        visibleRange: new NumberRange(0, 9),
50        startAngle: Math.PI / 2, // start at 12 o'clock
51        flippedCoordinates: true, // go clockwise
52        zoomExtentsToInitialRange: true,
53
54        drawMinorTickLines: false,
55        drawMajorTickLines: false,
56        drawMinorGridLines: false,
57
58        useNativeText: true,
59        labelPrecision: 0,
60        labelStyle: {
61            color: "white",
62        },
63        majorGridLineStyle: {
64            color: appTheme.DarkIndigo,
65            strokeThickness: 1,
66        },
67    });
68    sciChartSurface.xAxes.add(polarXAxis);
69
70    const polarColumn = new PolarColumnRenderableSeries(wasmContext, {
71        dataSeries: new XyDataSeries(wasmContext, {
72            xValues: [0, 1, 2, 3, 4, 5, 6, 7, 8],
73            yValues: [2.6, 5.3, 3.5, 2.7, 4.8, 3.8, 5, 4.5, 3.5]
74        }),
75        fillLinearGradient: new GradientParams(
76            new Point(0, 0), 
77            new Point(1, 0), // `new Point(0, 1)` for vertical gradient
78            [
79                { color: appTheme.DarkIndigo, offset: 0 },
80                { color: appTheme.Indigo, offset: 0.2 },
81                { color: appTheme.Indigo, offset: 0.8 },
82                { color: appTheme.MutedBlue, offset: 1 }
83            ]
84        ),
85        stroke: "white",
86        strokeThickness: 1.5,
87        dataPointWidth: 0.8,
88        dataLabels: {
89            color: "white",
90            style: {
91                fontSize: 14,
92                fontFamily: "Default",
93            },
94            polarLabelMode: EPolarLabelMode.Parallel,
95        },
96        animation: new WaveAnimation({ duration: 800, fadeEffect: true }),
97    });
98    sciChartSurface.renderableSeries.add(polarColumn);
99
100    sciChartSurface.chartModifiers.add(
101        new PolarPanModifier(),
102        new PolarZoomExtentsModifier(),
103        new PolarMouseWheelZoomModifier()
104    );
105
106    return { sciChartSurface, wasmContext };
107};

Polar Column Chart - React

Overview

This React example showcases a Polar Column Chart using the SciChartReact component. It renders columns in a polar layout with gradient fills and animations, demonstrating seamless integration with React's component lifecycle.

Technical Implementation

The chart is initialized via the initChart prop, which creates a SciChartPolarSurface and configures axes with EPolarAxisMode. Data labels are positioned parallel to columns using EPolarLabelMode. The implementation leverages React's async patterns for efficient rendering.

Features and Capabilities

Notable features include dynamic gradient fills, configurable column widths, and interactive modifiers like PolarMouseWheelZoomModifier. The chart supports real-time updates and follows React best practices for performance.

Integration and Best Practices

The example uses the SciChart React wrapper for simplified integration. For advanced use cases, refer to the React Charts 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 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 Band | Polar Error Bands Chart | SciChart.js

React Polar Band | Polar Error Bands Chart

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

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.