Angular Polar Column Chart

Creates a Angular Polar Column Chart using SciChart.js, with the following features: DataLabels, Rounded corners, Gradient-palette fill, startup animations.

Fullscreen

Edit

 Edit

Docs

drawExample.ts

angular.ts

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};

See Also: Polar Charts (20 Demos)

Angular Polar Line Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Line Chart

Angular Polar Line Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Spline Line Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Spline Line Chart

Angular Polar Spline Line Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Line Temperature Average | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Line Temperature Average

Angular Polar Line Temperature Average demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Column Category Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Column Category Chart

Angular Polar Column Category Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Range Column Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Range Column Chart

Angular Polar Range Column Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Windrose Column Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Windrose Column Chart

Angular Windrose Column Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Sunburst Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Sunburst Chart

Angular Polar Sunburst Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Radial Column Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Radial Column Chart

Angular Radial Column Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Stacked Radial Column Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Stacked Radial Column Chart

Angular Stacked Radial Column Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Mountain Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Mountain Chart

Angular Polar Mountain Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Stacked Mountain Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Stacked Mountain Chart

Angular Polar Stacked Mountain Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Band Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Band Chart

Angular Polar Band Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Scatter Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Scatter Chart

Angular Polar Scatter Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Radar Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Radar Chart

Angular Polar Radar Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Gauge Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Gauge Chart

Angular Polar Gauge Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Gauge Fifo Dashboard | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Gauge Fifo Dashboard

Angular Polar Gauge Fifo Dashboard demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Uniform Heatmap Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Uniform Heatmap Chart

Angular Polar Uniform Heatmap Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Ultrasound Heatmap | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Ultrasound Heatmap

Angular Polar Ultrasound Heatmap demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Partial Arc | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Partial Arc

Angular Polar Partial Arc demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Label Modes | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Label Modes

Angular Polar Label Modes demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

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