Loading...
Loading...
Implement Syncfusion React 3D Chart component from the @syncfusion/ej2-react-charts package. Use this skill when users need 3D column, bar, stacked column, stacked bar, or 100% stacked chart variations. Covers Chart3DComponent, axis configuration (category, numeric, datetime, logarithmic), data binding, multiple panes, data labels, legends, tooltips, selection, print/export, theming, and accessibility.
npx skill4agent add syncfusion/react-ui-components-skills syncfusion-react-3d-chart@syncfusion/ej2-react-chartsChart3DComponentChart3DSeriesCollectionDirectiveChart3DSeriesDirectiveChart3DAxesDirectiveimport * as React from 'react';
import * as ReactDOM from 'react-dom';
import {
Chart3DComponent,
Chart3DSeriesCollectionDirective,
Chart3DSeriesDirective,
Inject,
Category3D,
ColumnSeries3D,
Legend3D,
DataLabel3D,
Tooltip3D
} from '@syncfusion/ej2-react-charts';
function SalesChart() {
const data = [
{ month: 'Jan', sales: 35 },
{ month: 'Feb', sales: 28 },
{ month: 'Mar', sales: 34 },
{ month: 'Apr', sales: 32 },
{ month: 'May', sales: 40 }
];
return (
<Chart3DComponent
id='chart'
title='Monthly Sales'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{ title: 'Sales (K)' }}
enableRotation={true}
rotation={7}
tilt={10}
depth={100}
>
<Inject services={[ColumnSeries3D, Category3D, Legend3D, DataLabel3D, Tooltip3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='month'
yName='sales'
type='Column'
name='Sales'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}
export default SalesChart;
ReactDOM.render(<SalesChart />, document.getElementById('charts'));<Chart3DComponent primaryXAxis={{ valueType: 'Category' }}>
<Inject services={[ColumnSeries3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='category'
yName='value'
type='Column'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent><Chart3DComponent primaryXAxis={{ valueType: 'Category' }}>
<Inject services={[StackingColumnSeries3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data1}
xName='x'
yName='y'
type='StackingColumn'
name='Product A'
/>
<Chart3DSeriesDirective
dataSource={data2}
xName='x'
yName='y'
type='StackingColumn'
name='Product B'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent><Chart3DComponent primaryXAxis={{ valueType: 'Category' }}>
<Inject services={[BarSeries3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='category'
yName='value'
type='Bar'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent><Chart3DComponent
primaryXAxis={{ valueType: 'Category' }}
legendSettings={{ visible: true }}
>
<Inject services={[ColumnSeries3D, Category3D, Legend3D, DataLabel3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='x'
yName='y'
type='Column'
name='Sales'
dataLabel={{ visible: true }}
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent><Chart3DComponent
primaryXAxis={{ valueType: 'Category' }}
enableRotation={true}
rotation={15}
tilt={5}
depth={120}
wallColor='transparent'
wallSize={1}
>
<Inject services={[ColumnSeries3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='x'
yName='y'
type='Column'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent><Chart3DComponent
primaryXAxis={{ valueType: 'Category' }}
palettes={['#E94649', '#F6B53F', '#6FAAB0']}
>
<Inject services={[ColumnSeries3D, Category3D, Legend3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data1}
xName='x'
yName='y'
type='Column'
name='Product A'
/>
<Chart3DSeriesDirective
dataSource={data2}
xName='x'
yName='y'
type='Column'
name='Product B'
/>
<Chart3DSeriesDirective
dataSource={data3}
xName='x'
yName='y'
type='Column'
name='Product C'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>| Prop | Type | Description |
|---|---|---|
| Object | Configuration for X-axis (type, title, labels) |
| Object | Configuration for Y-axis (range, title, format) |
| number | Horizontal rotation angle (0-360) |
| number | Vertical tilt angle (0-90) |
| number | Depth of 3D chart (0-100) |
| boolean | Enable mouse rotation interaction |
| string | Color of 3D walls |
| number | Thickness of wall borders |
| string | Chart title text |
| Object | Legend configuration |
| Object | Tooltip settings |
| string[] | Array of colors for series |
| Prop | Type | Description |
|---|---|---|
| any[] | Array of data points |
| string | Property name for X-axis values |
| string | Property name for Y-axis values |
| string | Chart type: 'Column', 'Bar', 'StackingColumn', 'StackingBar', 'StackingColumn100', 'StackingBar100' |
| string | Series name (shown in legend) |
| Object | Data label configuration |
| string | Series color |
| number | Series opacity (0-1) |
import {
Chart3DComponent,
IChart3DLoadedEventArgs,
IChart3DPointRenderEventArgs,
Chart3DModel
} from '@syncfusion/ej2-react-charts';