
Syncfusion React 3d Chart
- 340 installs
- 3 repo stars
- Updated July 28, 2026
- syncfusion/react-ui-components-skills
Use syncfusion-react-3d-chart for development tasks
About
syncfusion-react-3d-chart: A skill for development. This provides functionality for development workflows.
- syncfusion-react-3d-chart
Syncfusion React 3d Chart by the numbers
- 340 all-time installs (skills.sh)
- +22 installs in the week ending Jul 27, 2026 (Skillselion tracking)
- Ranked #1,180 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Jul 29, 2026 (Skillselion catalog sync)
npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion-react-3d-chartAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 340 |
|---|---|
| repo stars | ★ 3 |
| Last updated | July 28, 2026 |
| Repository | syncfusion/react-ui-components-skills ↗ |
What it does
Use syncfusion-react-3d-chart for development tasks
Files
Syncfusion React 3D Chart
A comprehensive skill for implementing and customizing Syncfusion's 3D Chart component in React applications. This skill helps you create interactive 3D visualizations with column, bar, and stacked chart types.
When to Use This Skill
Use this skill when you need to:
- Implement Syncfusion 3D charts in React applications
- Create column, bar, or stacked 3D charts
- Configure category, numeric, datetime, or logarithmic axes
- Bind and manage chart data sources
- Customize 3D chart appearance (rotation, depth, walls)
- Add data labels, legends, or tooltips to 3D charts
- Implement chart selection and interaction
- Export or print 3D charts
- Support accessibility in 3D visualizations
- Troubleshoot 3D chart rendering or performance issues
Component Overview
Package: @syncfusion/ej2-react-charts
Main Components:
Chart3DComponent- Root 3D chart containerChart3DSeriesCollectionDirective- Series collection wrapperChart3DSeriesDirective- Individual series configurationChart3DAxesDirective- Multiple axes configuration
Chart Types: Column, Bar, Stacked Column, Stacked Bar, 100% Stacked Column, 100% Stacked Bar
Axis Types: Category, Numeric, DateTime, Logarithmic
Documentation and Navigation Guide
API Reference
📄 Read: references/api-reference.md
- Concise list of public props, methods, events, child directives, and a usage snippet. Use this as the canonical in-repo API summary.
Getting Started
📄 Read: references/getting-started.md
- Installing @syncfusion/ej2-react-charts package
- Setting up dependencies and CSS themes
- Creating your first 3D chart
- Basic Chart3DComponent usage
- TypeScript configuration
Chart Types
📄 Read: references/chart-types.md
- Column chart (vertical 3D bars)
- Bar chart (horizontal 3D bars)
- Stacked Column chart
- Stacked Bar chart
- 100% Stacked Column chart
- 100% Stacked Bar chart
- When to use each chart type
- Series type configuration
Working with Data
📄 Read: references/working-with-data.md
- Data binding approaches
- Data source structure requirements
- Series configuration (xName, yName)
- Multiple series handling
- Dynamic data updates
- Empty points handling
Category Axis
📄 Read: references/category-axis.md
- Category axis configuration
- Label formatting and placement
- Category grouping
- Interval settings
- Use cases for categorical data
Numeric Axis
📄 Read: references/numeric-axis.md
- Numeric axis setup
- Range configuration (minimum, maximum)
- Interval and step size
- Label formatting (decimals, currency)
- Starting from zero vs auto-range
DateTime Axis
📄 Read: references/datetime-axis.md
- DateTime axis configuration
- Date format options
- Interval types (days, months, years)
- Date range settings
- Skeleton formats
- Timezone considerations
Logarithmic Axis
📄 Read: references/logarithmic-axis.md
- Logarithmic scale overview
- Base configuration (log10, log2, etc.)
- Use cases for exponential data
- Label formatting for log scales
- Range and interval settings
Axis Customization
📄 Read: references/axis-customization.md
- Axis titles and labels
- Multiple axes (secondary Y-axis)
- Axis line styling
- Grid lines configuration
- Tick marks customization
- Label rotation and formatting
- Axis crossing values
- Inversed axis
Multiple Panes
📄 Read: references/multiple-panes.md
- Multiple pane overview
- Row configuration and distribution
- Pane height settings
- Series assignment to different panes
- Axis binding per pane
- Use cases for multi-metric comparison
Data Labels, Legend, and Tooltip
📄 Read: references/data-labels-legend-tooltip.md
- Data labels configuration and positioning
- Label templates and formatting
- Legend position and customization
- Legend toggle visibility
- Tooltip enabling and formatting
- Custom tooltip templates
- Shared tooltips
Selection and Interaction
📄 Read: references/selection-interaction.md
- Selection modes (Point, Series, Cluster)
- Single and multi-selection
- Selection events and handlers
- Highlight on hover
- Selection styling
- Interactive features
Print and Export
📄 Read: references/print-export.md
- Print functionality
- Export as PNG, JPEG, SVG
- Export as PDF
- Export configuration options
- File naming conventions
- Export events
Appearance and Theming
- Built-in themes (Material, Bootstrap, Fluent, Tailwind)
- Custom theme creation
- Color palettes
- 3D rotation and tilt angles
- 3D depth configuration
- Wall customization
- Chart background and borders
- Animation settings
Accessibility
- WCAG 2.1 compliance
- Keyboard navigation support
- ARIA attributes
- Screen reader compatibility
- High contrast mode
- Focus management
- Accessible color schemes
Quick Start Example
import * 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'));Common Patterns
Basic Column Chart
<Chart3DComponent primaryXAxis={{ valueType: 'Category' }}>
<Inject services={[ColumnSeries3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='category'
yName='value'
type='Column'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>Stacked Column Chart
<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>Bar Chart (Horizontal)
<Chart3DComponent primaryXAxis={{ valueType: 'Category' }}>
<Inject services={[BarSeries3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='category'
yName='value'
type='Bar'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>With Data Labels and Legend
<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>Custom 3D Rotation
<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>Multiple Series with Different Colors
<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>Key Props Reference
Chart3DComponent Props
| Prop | Type | Description |
|---|---|---|
primaryXAxis | Object | Configuration for X-axis (type, title, labels) |
primaryYAxis | Object | Configuration for Y-axis (range, title, format) |
rotation | number | Horizontal rotation angle (0-360) |
tilt | number | Vertical tilt angle (0-90) |
depth | number | Depth of 3D chart (0-100) |
enableRotation | boolean | Enable mouse rotation interaction |
wallColor | string | Color of 3D walls |
wallSize | number | Thickness of wall borders |
title | string | Chart title text |
legendSettings | Object | Legend configuration |
tooltip | Object | Tooltip settings |
palettes | string[] | Array of colors for series |
Chart3DSeriesDirective Props
| Prop | Type | Description |
|---|---|---|
dataSource | any[] | Array of data points |
xName | string | Property name for X-axis values |
yName | string | Property name for Y-axis values |
type | string | Chart type: 'Column', 'Bar', 'StackingColumn', 'StackingBar', 'StackingColumn100', 'StackingBar100' |
name | string | Series name (shown in legend) |
dataLabel | Object | Data label configuration |
fill | string | Series color |
opacity | number | Series opacity (0-1) |
Common Use Cases
1. Sales Comparison: Column charts comparing monthly/quarterly sales across products 2. Survey Results: Bar charts showing survey responses or rankings 3. Market Share: Stacked column charts displaying market distribution 4. Time Series: DateTime axis for temporal data visualization 5. Financial Data: Logarithmic axis for stock prices or exponential growth 6. Multi-Metric Dashboards: Multiple panes showing different KPIs 7. Performance Tracking: Stacked 100% charts showing percentage contributions 8. Category Analysis: Category axis for discrete data grouping 9. Interactive Reports: Selection and export for user-driven exploration 10. Accessible Visualizations: WCAG-compliant charts for all users
TypeScript Support
All components are fully typed. Import types as needed:
import {
Chart3DComponent,
IChart3DLoadedEventArgs,
IChart3DPointRenderEventArgs,
Chart3DModel
} from '@syncfusion/ej2-react-charts';Troubleshooting Quick Reference
Chart not rendering?
- Verify @syncfusion/ej2-react-charts is installed
- Check CSS theme imports
- Ensure required services are injected
Data not showing?
- Verify xName/yName match data property names
- Check axis valueType matches data type
- Validate data source structure
Performance issues?
- Reduce data point count (aggregate if needed)
- Disable animations
- Optimize data structure
3D effect not working?
- Set enableRotation={true}
- Configure rotation, tilt, and depth props
- Check if series type supports 3D
For detailed troubleshooting, refer to the specific reference files above.
Chart3D API Reference
This file summarizes the public API for Chart3DComponent from @syncfusion/ej2-react-charts.
Key Props
axes(Chart3DAxisModel[]) — Axis collection (primaryXAxis, primaryYAxis, etc.)series(Chart3DSeriesModel[]) — Series collectiondataSource(any[]) — Data for the chartdepth(number) — 3D depthrotation(number) — Horizontal rotation angletilt(number) — Vertical tilt angleenableRotation(boolean) — Enable mouse/touch rotationenableExport(boolean) — Enable export featureslegendSettings(Chart3DLegendSettingsModel) — Legend configurationtooltip(Chart3DTooltipSettingsModel) — Tooltip configurationpalettes(string[]) — Color palettes for serieswallColor(string) — Wall colorwallSize(number) — Wall thicknessselectedDataIndexes(IndexesModel[][]) — Selected points
Methods
addSeries(seriesCollection: [Chart3DSeriesModel](https://ej2.syncfusion.com/react/documentation/api/chart3d/chart3dseriesmodel)[]): void— Add series at runtimeremoveSeries(index: number): void— Remove series by indexcreateChartSvg(): void— Force SVG creation (useful before export)export(type: [ExportType](https://ej2.syncfusion.com/react/documentation/api/chart3d/exporttype), fileName: string): void— Export chartprint(id: string | string[] | Element): void— Print the chartdestroy(): void— Cleanup
Events
load(Chart3DLoadedEventArgs),loaded(Chart3DLoadedEventArgs) — Component lifecycle eventsbeforeExport(Chart3DExportEventArgs),afterExport(IAfterExportEventArgs) — Export lifecyclebeforePrint(Chart3DPrintEventArgs),resized(Chart3DResizeEventArgs) — Print/resize eventsaxisLabelRender(Chart3DAxisLabelRenderEventArgs) — Modify axis label before renderpointRender(Chart3DPointRenderEventArgs),pointClick(Chart3DPointEventArgs),pointMove(Chart3DPointEventArgs) — Per-point rendering and interactionchart3DMouseClick,chart3DMouseMove,chart3DMouseDown,chart3DMouseUp,chart3DMouseLeave(Chart3DMouseEventArgs) — Mouse interaction eventslegendClick(Chart3DLegendClickEventArgs),legendRender(Chart3DLegendRenderEventArgs) — Legend eventsseriesRender(Chart3DSeriesRenderEventArgs),selectionComplete(Chart3DSelectionCompleteEventArgs),tooltipRender(Chart3DTooltipRenderEventArgs),textRender(Chart3DTextRenderEventArgs) — Rendering and selection events
Child Directives / Subcomponents
AnnotationsDirective/AnnotationDirectiveColumnsDirective/ColumnDirectiveRowsDirective/RowDirectiveRangeColorSettingsDirective/RangeColorSettingDirectiveTrendlinesDirective/TrendlineDirectiveMultiLevelLabelsDirective/MultiLevelLabelDirective
Usage Snippet
import {
Chart3DComponent,
Chart3DSeriesCollectionDirective,
Chart3DSeriesDirective,
Inject,
ColumnSeries3D,
Category3D,
Tooltip3D
} from '@syncfusion/ej2-react-charts';
<Chart3DComponent
id="chart3d"
enableRotation={true}
depth={100}
rotation={10}
tilt={8}
tooltip={{ enable: true }}
>
<Inject services={[ColumnSeries3D, Category3D, Tooltip3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName="x"
yName="y"
type="Column"
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>Notes
- For full API details (complete typings, interfaces and event argument shapes), consult the official API documentation: https://ej2.syncfusion.com/react/documentation/api/chart3d/index-default
Advanced Axis Customization
Table of contents
- Axis Crossing
- Multiple Axes
- Axis Line Break
- Custom Label Content
- Format Based on Value
- Axis Visibility Control
- Hide Axis Completely
- Hide Axis Line Only
- Hide Grid Lines
- Inversed Axis
- Edge Label Placement
- Complete Advanced Example
- Common Issues
This guide covers advanced axis customization features for precise control over axis behavior and appearance.
Axis Crossing
Control where axes intersect each other:
function AxisCrossing() {
const data = [
{ x: 'A', y: -10 },
{ x: 'B', y: 15 },
{ x: 'C', y: -5 },
{ x: 'D', y: 20 },
{ x: 'E', y: 8 }
];
return (
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'Category',
crossesAt: 0 // X-axis crosses Y-axis at 0
}}
primaryYAxis={{
crossesAt: 'B', // Y-axis crosses X-axis at category 'B'
minimum: -15,
maximum: 25,
interval: 5
}}
>
<Inject services={[ColumnSeries3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='x'
yName='y'
type='Column'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Use cases:
- Show positive and negative values with axis at zero
- Center axis for better data visualization
- Create custom chart layouts
Multiple Axes
Add multiple Y-axes for different value scales:
function MultipleAxesChart() {
const data = [
{ month: 'Jan', temperature: 5, rainfall: 78, humidity: 65 },
{ month: 'Feb', temperature: 8, rainfall: 65, humidity: 68 },
{ month: 'Mar', temperature: 12, rainfall: 55, humidity: 62 },
{ month: 'Apr', temperature: 18, rainfall: 45, humidity: 58 },
{ month: 'May', temperature: 23, rainfall: 38, humidity: 55 },
{ month: 'Jun', temperature: 28, rainfall: 25, humidity: 52 }
];
return (
<Chart3DComponent
id='multiple-axes'
title='Weather Data with Multiple Axes'
primaryXAxis={{
valueType: 'Category',
title: 'Month'
}}
primaryYAxis={{
name: 'yAxis1',
title: 'Temperature (°C)',
minimum: 0,
maximum: 35,
interval: 5,
labelFormat: '{value}°C',
lineStyle: { width: 2, color: '#E94649' }
}}
axes={[
{
name: 'yAxis2',
opposedPosition: true,
title: 'Rainfall (mm)',
minimum: 0,
maximum: 100,
interval: 20,
labelFormat: '{value}mm',
lineStyle: { width: 2, color: '#4472C4' }
},
{
name: 'yAxis3',
opposedPosition: true,
title: 'Humidity (%)',
minimum: 0,
maximum: 100,
interval: 20,
labelFormat: '{value}%',
lineStyle: { width: 2, color: '#70AD47' },
rowIndex: 0,
span: 1
}
]}
>
<Inject services={[ColumnSeries3D, Category3D, Legend3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='month'
yName='temperature'
type='Column'
name='Temperature'
yAxisName='yAxis1'
/>
<Chart3DSeriesDirective
dataSource={data}
xName='month'
yName='rainfall'
type='Column'
name='Rainfall'
yAxisName='yAxis2'
/>
<Chart3DSeriesDirective
dataSource={data}
xName='month'
yName='humidity'
type='Column'
name='Humidity'
yAxisName='yAxis3'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Key points:
- Name each axis with unique
nameproperty - Reference axis in series using
yAxisName - Use
opposedPosition: trueto place on right side - Match axis
lineStyle.colorwith series color for clarity
Axis Line Break
Not directly supported in 3D charts, but can simulate with range adjustment:
function SimulatedAxisBreak() {
const data = [
{ x: 'A', y: 10 },
{ x: 'B', y: 15 },
{ x: 'C', y: 100 }, // Outlier
{ x: 'D', y: 12 },
{ x: 'E', y: 18 }
];
return (
<Chart3DComponent
id='chart'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{
minimum: 0,
maximum: 25, // Limit range to exclude outlier
interval: 5
}}
>
<Inject services={[ColumnSeries3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='x'
yName='y'
type='Column'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Alternative: Filter outliers or use logarithmic scale for wide ranges.
Custom Label Content
Customize axis labels dynamically:
function CustomLabels() {
const data = [
{ value: 1, sales: 45 },
{ value: 2, sales: 55 },
{ value: 3, sales: 38 },
{ value: 4, sales: 65 }
];
const axisLabelRender = (args: any) => {
const labels = ['Q1', 'Q2', 'Q3', 'Q4'];
};
return (
<Chart3DComponent
id='custom-labels'
primaryXAxis={{
valueType: 'Double',
minimum: 0.5,
maximum: 4.5,
interval: 1
}}
axisLabelRender={axisLabelRender}
>
<Inject services={[ColumnSeries3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='value'
yName='sales'
type='Column'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Format Based on Value
const axisLabelRender = (args: any) => {
if (args.axis.name === 'primaryYAxis') {
if (args.value >= 1000000) {
args.text = (args.value / 1000000).toFixed(1) + 'M';
} else if (args.value >= 1000) {
args.text = (args.value / 1000).toFixed(1) + 'K';
}
}
};Axis Visibility Control
Hide Axis Completely
<Chart3DComponent
primaryYAxis={{
visible: false // Hide entire Y-axis including labels
}}
>
{/* Series */}
</Chart3DComponent>Hide Axis Line Only
<Chart3DComponent
primaryYAxis={{
lineStyle: { width: 0 }, // Hide axis line
majorTickLines: { width: 0 }, // Hide tick marks
// Labels still visible
}}
>
{/* Series */}
</Chart3DComponent>Hide Grid Lines
<Chart3DComponent
primaryYAxis={{
majorGridLines: { width: 0 },
minorGridLines: { width: 0 }
}}
>
{/* Series */}
</Chart3DComponent>Inversed Axis
Reverse axis direction:
function InversedAxisChart() {
const rankingData = [
{ team: 'Team A', rank: 1 },
{ team: 'Team B', rank: 2 },
{ team: 'Team C', rank: 3 },
{ team: 'Team D', rank: 4 },
{ team: 'Team E', rank: 5 }
];
return (
<Chart3DComponent
id='inversed-chart'
title='Team Rankings (Lower is Better)'
primaryXAxis={{
valueType: 'Category'
}}
primaryYAxis={{
isInversed: true, // Reverse Y-axis
title: 'Rank',
minimum: 0,
maximum: 6,
interval: 1
}}
>
<Inject services={[ColumnSeries3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={rankingData}
xName='team'
yName='rank'
type='Column'
name='Rank'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Use cases:
- Rankings (where 1 is best, higher at top)
- Depth charts (deeper values at bottom)
- Temperature scales (certain contexts)
Edge Label Placement
Handle labels at chart edges:
<Chart3DComponent
primaryXAxis={{
valueType: 'Category',
edgeLabelPlacement: 'Shift' // Options: 'None', 'Shift', 'Hide'
}}
>
{/* Series */}
</Chart3DComponent>Options:
None: Default, may overlap edgesShift: Move inside chart areaHide: Hide edge labels entirely
Complete Advanced Example
function AdvancedAxisCustomization() {
const data = [
{ month: 'Jan', actual: 45, target: 50 },
{ month: 'Feb', actual: 55, target: 50 },
{ month: 'Mar', actual: 38, target: 50 },
{ month: 'Apr', actual: 65, target: 50 },
{ month: 'May', actual: 72, target: 50 },
{ month: 'Jun', actual: 68, target: 50 }
];
return (
<Chart3DComponent
id='advanced-axis'
title='Sales Performance vs Target'
primaryXAxis={{
valueType: 'Category',
title: 'Month',
majorGridLines: { width: 1, color: '#E0E0E0' },
edgeLabelPlacement: 'Shift'
}}
primaryYAxis={{
title: 'Sales',
minimum: 0,
maximum: 100,
interval: 20,
labelFormat: '{value}K'
}}
rotation={7}
tilt={10}
>
<Inject services={[ColumnSeries3D, Category3D, Legend3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='month'
yName='actual'
type='Column'
name='Actual Sales'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Common Issues
Multiple axes not showing:
- Ensure each axis has unique
nameproperty - Verify series
yAxisNamematches axisname - Check
opposedPositionfor positioning
Strip lines not visible:
- Verify
startvalue is within axis range - Check
opacityis > 0 - Ensure
coloris valid
Custom labels not applying:
- Use
axisLabelRenderevent correctly - Modify
args.text, notargs.value - Check axis name in event if targeting specific axis
---
See also: api-reference.md | usage-example.md
Category Axis Configuration
A category axis displays string labels for discrete data points. It's the most common axis type for 3D charts showing data across named categories.
Table of contents
- Basic Category Axis
- Key requirement
- Axis Title Configuration
- Label Customization
- Label Styling
- Label Rotation
- Label Trimming
- Grid Lines
- Axis Line Customization
- Label Placement
- Multiple Category Levels
- Tick Customization
- Axis Visibility
- Complete Category Axis Example
- Common Issues
Basic Category Axis
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, ColumnSeries3D, Category3D } from '@syncfusion/ej2-react-charts';
function CategoryAxisChart() {
const data = [
{ product: 'Laptop', sales: 45 },
{ product: 'Mobile', sales: 60 },
{ product: 'Tablet', sales: 35 },
{ product: 'Desktop', sales: 28 },
{ product: 'Accessory', sales: 52 }
];
return (
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'Category',
title: 'Products'
}}
primaryYAxis={{
title: 'Sales (Units)'
}}
>
<Inject services={[ColumnSeries3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='product'
yName='sales'
type='Column'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Key requirement: Must inject Category3D service for category axis to work.
Axis Title Configuration
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'Category',
title: 'Product Categories',
titleStyle: {
fontFamily: 'Segoe UI',
size: '14px',
fontWeight: '600',
color: '#333'
}
}}
>
{/* Series */}
</Chart3DComponent>Label Customization
Label Styling
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'Category',
labelStyle: {
size: '12px',
fontFamily: 'Arial',
fontWeight: '500',
color: '#555'
}
}}
>
{/* Series */}
</Chart3DComponent>Label Rotation
For long category names:
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'Category',
labelRotation: -45, // Rotate 45 degrees counterclockwise
labelStyle: { size: '11px' }
}}
>
{/* Series */}
</Chart3DComponent>Common rotation angles:
-45: Good for moderately long labels-90: Vertical labels, saves horizontal space0: Default horizontal (best for short labels)
Label Trimming
Handle long labels automatically:
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'Category',
labelIntersectAction: 'Trim', // Options: 'None', 'Trim', 'Wrap', 'MultipleRows', 'Rotate45', 'Rotate90'
maximumLabelWidth: 100
}}
>
{/* Series */}
</Chart3DComponent>Label intersect actions:
None: No action, labels may overlapTrim: Truncate with ellipsis (...)Wrap: Wrap to multiple linesMultipleRows: Arrange in staggered rowsRotate45: Rotate 45 degreesRotate90: Rotate 90 degrees
Grid Lines
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'Category',
majorGridLines: {
width: 1,
color: '#E0E0E0'
},
minorGridLines: {
width: 0 // Hide minor grid lines
}
}}
>
{/* Series */}
</Chart3DComponent>Label Placement
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'Category',
labelPlacement: 'BetweenTicks', // Options: 'BetweenTicks', 'OnTicks'
edgeLabelPlacement: 'Shift' // Options: 'None', 'Shift', 'Hide'
}}
>
{/* Series */}
</Chart3DComponent>Label placement:
BetweenTicks: Labels centered between tick marks (default for Category)OnTicks: Labels aligned with tick marks
Edge label placement:
None: Default behaviorShift: Move edge labels inside chart areaHide: Hide labels at edges
Tick Customization
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'Category',
majorTickLines: {
width: 1,
height: 8,
color: '#333'
},
minorTickLines: {
width: 0 // Hide minor ticks
}
}}
>
{/* Series */}
</Chart3DComponent>Complete Category Axis Example
function AdvancedCategoryAxis() {
const salesData = [
{ department: 'Marketing', revenue: 120000 },
{ department: 'Sales', revenue: 180000 },
{ department: 'Engineering', revenue: 95000 },
{ department: 'Support', revenue: 78000 },
{ department: 'Operations', revenue: 110000 }
];
return (
<Chart3DComponent
id='advanced-category'
title='Department Revenue'
primaryXAxis={{
valueType: 'Category',
title: 'Departments',
titleStyle: {
fontFamily: 'Segoe UI',
size: '14px',
fontWeight: '600'
},
labelStyle: {
size: '12px',
fontWeight: '500'
},
labelRotation: -45,
labelIntersectAction: 'Trim',
maximumLabelWidth: 80,
majorGridLines: {
width: 1,
color: '#E0E0E0'
},
majorTickLines: {
width: 1,
height: 6
}
}}
primaryYAxis={{
title: 'Revenue ($)',
labelFormat: '${value}K'
}}
rotation={7}
tilt={10}
>
<Inject services={[ColumnSeries3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={salesData}
xName='department'
yName='revenue'
type='Column'
name='Revenue'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Common Issues
Labels overlapping:
- Use
labelRotation: -45or-90 - Set
labelIntersectAction: 'Rotate45'or'Trim' - Reduce
labelStyle.size
Categories not showing:
- Ensure
valueType: 'Category'is set - Verify
Category3Dis injected - Check
xNamematches data property exactly
Wrong order:
- Categories display in data order, not alphabetically
- Pre-sort data array if specific order needed
---
See also: api-reference.md | usage-example.md
3D Chart Types
Table of contents
- Column Chart
- Bar Chart
- Stacked Column Chart
- Stacked Bar Chart
- 100% Stacked Column Chart
- 100% Stacked Bar Chart
- Choosing the Right Chart Type
Syncfusion React 3D Charts support six chart types, each suited for different data visualization scenarios.
Column Chart
Use when: Comparing values across categories, showing changes over time with discrete intervals.
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, ColumnSeries3D, Category3D, Legend3D, Tooltip3D } from '@syncfusion/ej2-react-charts';
function ColumnChart() {
const data = [
{ country: 'USA', gold: 46, silver: 37, bronze: 38 },
{ country: 'China', gold: 38, silver: 32, bronze: 18 },
{ country: 'Japan', gold: 27, silver: 14, bronze: 17 },
{ country: 'UK', gold: 22, silver: 21, bronze: 22 }
];
return (
<Chart3DComponent
id='column-chart'
title='Olympic Medals by Country'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{ title: 'Medals' }}
enableRotation={true}
rotation={7}
tilt={10}
depth={100}
>
<Inject services={[ColumnSeries3D, Category3D, Legend3D, Tooltip3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='country'
yName='gold'
type='Column'
name='Gold'
/>
<Chart3DSeriesDirective
dataSource={data}
xName='country'
yName='silver'
type='Column'
name='Silver'
/>
<Chart3DSeriesDirective
dataSource={data}
xName='country'
yName='bronze'
type='Column'
name='Bronze'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Key features:
- Vertical bars representing values
- Ideal for comparing discrete categories
- Supports multiple series for grouped comparison
- Works best with 3-15 categories
Bar Chart
Use when: Comparing values where labels are long, or when emphasizing rank/order.
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, BarSeries3D, Category3D } from '@syncfusion/ej2-react-charts';
function BarChart() {
const data = [
{ department: 'Marketing', budget: 120000 },
{ department: 'Research & Development', budget: 180000 },
{ department: 'Sales', budget: 150000 },
{ department: 'Human Resources', budget: 90000 },
{ department: 'IT Infrastructure', budget: 140000 }
];
return (
<Chart3DComponent
id='bar-chart'
title='Department Budgets'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{ title: 'Budget ($)' }}
rotation={22}
tilt={0}
>
<Inject services={[BarSeries3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='department'
yName='budget'
type='Bar'
name='Budget'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Key features:
- Horizontal bars representing values
- Better readability for long category names
- Natural left-to-right reading direction
- Ideal for ranking data
Stacked Column Chart
Use when: Showing part-to-whole relationships over categories, comparing contribution of each part.
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, StackingColumnSeries3D, Category3D, Legend3D } from '@syncfusion/ej2-react-charts';
function StackedColumnChart() {
const data = [
{ quarter: 'Q1', mobile: 30, tablet: 15, desktop: 25 },
{ quarter: 'Q2', mobile: 35, tablet: 18, desktop: 22 },
{ quarter: 'Q3', mobile: 40, tablet: 20, desktop: 20 },
{ quarter: 'Q4', mobile: 45, tablet: 22, desktop: 18 }
];
return (
<Chart3DComponent
id='stacked-column-chart'
title='Device Sales by Quarter'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{ title: 'Units Sold (Thousands)' }}
>
<Inject services={[StackingColumnSeries3D, Category3D, Legend3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='quarter'
yName='mobile'
type='StackingColumn'
name='Mobile'
/>
<Chart3DSeriesDirective
dataSource={data}
xName='quarter'
yName='tablet'
type='StackingColumn'
name='Tablet'
/>
<Chart3DSeriesDirective
dataSource={data}
xName='quarter'
yName='desktop'
type='StackingColumn'
name='Desktop'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Key features:
- Series stacked vertically
- Shows total and individual contributions
- Emphasizes cumulative totals
- All series share the same categories
Stacked Bar Chart
Use when: Showing part-to-whole with long category names, horizontal orientation preferred.
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, StackingBarSeries3D, Category3D, Legend3D } from '@syncfusion/ej2-react-charts';
function StackedBarChart() {
const data = [
{ project: 'Website Redesign', planning: 20, development: 40, testing: 15 },
{ project: 'Mobile App', planning: 15, development: 50, testing: 20 },
{ project: 'API Integration', planning: 10, development: 35, testing: 12 },
{ project: 'Database Migration', planning: 25, development: 45, testing: 18 }
];
return (
<Chart3DComponent
id='stacked-bar-chart'
title='Project Time Distribution (Hours)'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{ title: 'Hours' }}
rotation={22}
>
<Inject services={[StackingBarSeries3D, Category3D, Legend3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='project'
yName='planning'
type='StackingBar'
name='Planning'
/>
<Chart3DSeriesDirective
dataSource={data}
xName='project'
yName='development'
type='StackingBar'
name='Development'
/>
<Chart3DSeriesDirective
dataSource={data}
xName='project'
yName='testing'
type='StackingBar'
name='Testing'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Key features:
- Series stacked horizontally
- Better for long project/category names
- Shows time/resource allocation clearly
100% Stacked Column Chart
Use when: Comparing percentage contribution over categories, emphasizing proportions rather than absolute values.
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, StackingColumnSeries3D, Category3D, Legend3D, DataLabel3D } from '@syncfusion/ej2-react-charts';
function HundredPercentStackedColumn() {
const data = [
{ year: '2020', renewable: 25, nuclear: 20, fossil: 55 },
{ year: '2021', renewable: 30, nuclear: 18, fossil: 52 },
{ year: '2022', renewable: 35, nuclear: 17, fossil: 48 },
{ year: '2023', renewable: 40, nuclear: 15, fossil: 45 }
];
return (
<Chart3DComponent
id='hundred-percent-stacked-column'
title='Energy Sources Distribution (%)'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{ title: 'Percentage', labelFormat: '{value}%' }}
>
<Inject services={[StackingColumnSeries3D, Category3D, Legend3D, DataLabel3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='year'
yName='renewable'
type='StackingColumn100'
name='Renewable'
dataLabel= {{ visible: true, position: 'Middle' }}
/>
<Chart3DSeriesDirective
dataSource={data}
xName='year'
yName='nuclear'
type='StackingColumn100'
name='Nuclear'
dataLabel= {{ visible: true, position: 'Middle' }}
/>
<Chart3DSeriesDirective
dataSource={data}
xName='year'
yName='fossil'
type='StackingColumn100'
name='Fossil Fuels'
dataLabel= {{ visible: true, position: 'Middle' }}
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Key features:
- Y-axis always 0-100%
- Shows relative proportions, not absolute values
- Each stack totals 100%
- Ideal for composition analysis
100% Stacked Bar Chart
Use when: Showing percentage contribution with horizontal orientation, long category names.
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, StackingBarSeries3D, Category3D, Legend3D } from '@syncfusion/ej2-react-charts';
function HundredPercentStackedBar() {
const data = [
{ region: 'North America', electronics: 30, clothing: 25, food: 45 },
{ region: 'Europe', electronics: 35, clothing: 30, food: 35 },
{ region: 'Asia Pacific', electronics: 40, clothing: 20, food: 40 },
{ region: 'Latin America', electronics: 20, clothing: 35, food: 45 }
];
return (
<Chart3DComponent
id='hundred-percent-stacked-bar'
title='Sales Distribution by Region (%)'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{ title: 'Percentage', labelFormat: '{value}%' }}
rotation={22}
>
<Inject services={[StackingBarSeries3D, Category3D, Legend3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='region'
yName='electronics'
type='StackingBar100'
name='Electronics'
/>
<Chart3DSeriesDirective
dataSource={data}
xName='region'
yName='clothing'
type='StackingBar100'
name='Clothing'
/>
<Chart3DSeriesDirective
dataSource={data}
xName='region'
yName='food'
type='StackingBar100'
name='Food & Beverage'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Key features:
- Horizontal 100% stacked bars
- Comparison of proportions across regions/categories
- Natural reading direction for long names
Choosing the Right Chart Type
| Chart Type | Best For | Avoid When |
|---|---|---|
| Column | Comparing discrete values, time series | >15 categories, long labels |
| Bar | Long category names, ranking | Short labels, time progression |
| Stacked Column | Part-to-whole, cumulative totals | Need exact comparisons between parts |
| Stacked Bar | Part-to-whole with long labels | Comparing totals across categories |
| 100% Stacked Column | Proportion comparison, composition | Absolute values matter |
| 100% Stacked Bar | Proportion comparison, long labels | Totals differ significantly |
General guidelines:
- Use Column/Bar for straightforward comparisons
- Use Stacked to show both parts and totals
- Use 100% Stacked to emphasize proportions over absolute values
- Choose Bar when labels are >15 characters
- Limit categories to 3-12 for readability in stacked charts
---
See also: api-reference.md | usage-example.md
Data Labels, Legend, and Tooltip
Table of contents
- Data Labels
- Basic Data Labels
- Data Label Position
- Data Label Styling
- Custom Data Label Format
- Data Label with Percentage
- Legend Configuration
- Basic Legend
- Legend Position
- Legend Alignment
- Legend Styling
- Hide Specific Series icon from Legend
- Tooltip Customization
- Basic Tooltip
- Tooltip Format
- Tooltip Styling
- Custom Tooltip Template
- Shared Tooltip (Multiple Series)
- Combining All Three
- Best Practices
- Common Issues
Visual enhancements that improve chart readability and user interaction.
Data Labels
Basic Data Labels
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, ColumnSeries3D, Category3D, DataLabel3D } from '@syncfusion/ej2-react-charts';
function DataLabelsChart() {
const data = [
{ month: 'Jan', sales: 35 },
{ month: 'Feb', sales: 42 },
{ month: 'Mar', sales: 38 },
{ month: 'Apr', sales: 48 }
];
return (
<Chart3DComponent
id='chart'
primaryXAxis={{ valueType: 'Category' }}
>
<Inject services={[ColumnSeries3D, Category3D, DataLabel3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='month'
yName='sales'
type='Column'
dataLabel={{ visible: true }}
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Key requirement: Must inject DataLabel3D service for data labels to work.
Data Label Position
<Chart3DSeriesDirective
dataSource={data}
xName='month'
yName='sales'
type='Column'
dataLabel={{ visible: true, position: 'Top' }}
/>Positions:
Top: Above the data pointMiddle: Center of the column/barBottom: Below/at baseOuter: Outside the chart areaAuto: Automatically determined
Data Label Styling
<Chart3DSeriesDirective
dataSource={data}
xName="month"
yName="sales"
type="Column"
dataLabel={{
visible: true,
position: 'Top',
font: {
fontFamily: 'Segoe UI',
size: '12px',
fontWeight: '600',
color: '#333',
},
fill: '#FFF', // Background color
border: {
width: 1,
color: '#DDD',
},
margin: {
left: 5,
right: 5,
top: 5,
bottom: 5,
},
}}
/>Custom Data Label Format
<Chart3DSeriesDirective
dataSource={data}
xName="month"
yName="sales"
type="Column"
dataLabel={{
visible: true,
position: 'Top',
template: '<div style="background: #333; color: #FFF; padding: 5px; border-radius: 3px;">${point.y}K</div>'
}}
/>Data Label with Percentage
For stacked charts showing percentage:
<Chart3DSeriesDirective
dataSource={data}
xName="month"
yName="sales"
type="Column"
dataLabel={{
visible: true,
position: 'Top',
format: '{value}%',
font: { color: 'red', fontWeight: 'bold' }
}}
/>Legend Configuration
Basic Legend
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, ColumnSeries3D, Category3D, Legend3D } from '@syncfusion/ej2-react-charts';
function LegendChart() {
const data = [
{ month: 'Jan', actual: 35, target: 40 },
{ month: 'Feb', actual: 42, target: 40 },
{ month: 'Mar', actual: 38, target: 40 }
];
return (
<Chart3DComponent
id='chart'
primaryXAxis={{ valueType: 'Category' }}
legendSettings={{
visible: true // Enable legend (default)
}}
>
<Inject services={[ColumnSeries3D, Category3D, Legend3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='month'
yName='actual'
type='Column'
name='Actual'
/>
<Chart3DSeriesDirective
dataSource={data}
xName='month'
yName='target'
type='Column'
name='Target'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Key requirement: Must inject Legend3D service for legend to work.
Legend Position
<Chart3DComponent
primaryXAxis={{ valueType: 'Category' }}
legendSettings={{
visible: true,
position: 'Bottom' // Options: 'Top', 'Bottom', 'Left', 'Right', 'Custom'
}}
>
{/* Series */}
</Chart3DComponent>Legend Alignment
<Chart3DComponent
primaryXAxis={{ valueType: 'Category' }}
legendSettings={{
visible: true,
position: 'Bottom',
alignment: 'Center' // Options: 'Near', 'Center', 'Far'
}}
>
{/* Series */}
</Chart3DComponent>Legend Styling
<Chart3DComponent
primaryXAxis={{ valueType: 'Category' }}
legendSettings={{
visible: true,
position: 'Right',
background: '#F9F9F9',
border: {
width: 1,
color: '#DDD'
},
textStyle: {
fontFamily: 'Segoe UI',
size: '12px',
fontWeight: '500',
color: '#333'
},
padding: 10,
shapePadding: 8,
shapeHeight: 12,
shapeWidth: 12
}}
>
{/* Series */}
</Chart3DComponent>Hide Specific Series icon from Legend
<Chart3DSeriesDirective
dataSource={data}
xName='x'
yName='y'
type='Column'
name='Hidden Series'
legendShape= 'None' // Hide this icon of series from legend
/>Tooltip Customization
Basic Tooltip
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, ColumnSeries3D, Category3D, Tooltip3D } from '@syncfusion/ej2-react-charts';
function TooltipChart() {
const data = [
{ month: 'Jan', sales: 35 },
{ month: 'Feb', sales: 42 },
{ month: 'Mar', sales: 38 }
];
return (
<Chart3DComponent
id='chart'
primaryXAxis={{ valueType: 'Category' }}
tooltip={{
enable: true // Enable tooltip
}}
>
<Inject services={[ColumnSeries3D, Category3D, Tooltip3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='month'
yName='sales'
type='Column'
name='Sales'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Key requirement: Must inject Tooltip3D service for tooltips to work.
Tooltip Format
<Chart3DComponent
tooltip={{
enable: true,
format: '${series.name}: ${point.y}K'
}}
>
{/* Series */}
</Chart3DComponent>Available tokens:
${point.x}: X-axis value${point.y}: Y-axis value${series.name}: Series name${point.tooltip}: Custom tooltip text from data
Tooltip Styling
<Chart3DComponent
tooltip={{
enable: true,
fill: '#333',
textStyle: {
color: '#FFF',
fontFamily: 'Segoe UI',
size: '12px'
},
border: {
width: 2,
color: '#FFF'
},
opacity: 0.9
}}
>
{/* Series */}
</Chart3DComponent>Custom Tooltip Template
<Chart3DComponent
tooltip={{
enable: true,
template: '<div style="background: #333; color: #FFF; padding: 10px; border-radius: 5px;"><b>${x}</b><br/>Sales: <b>${y}K</b><br/>Growth: <b>+12%</b></div>'
}}
>
{/* Series */}
</Chart3DComponent>Shared Tooltip (Multiple Series)
<Chart3DComponent
tooltip={{
enable: true,
shared: true, // Show all series values in one tooltip
format: '<b>${point.x}</b><br/>${series.name}: ${point.y}'
}}
>
{/* Multiple series */}
</Chart3DComponent>Combining All Three
import {
Chart3DComponent,
Chart3DSeriesCollectionDirective,
Chart3DSeriesDirective,
Inject,
Category3D,
ColumnSeries3D,
DataLabel3D,
Legend3D,
Tooltip3D,
} from '@syncfusion/ej2-react-charts';
import * as React from 'react';
import { createRoot } from 'react-dom/client';
function App() {
const salesData = [
{ quarter: 'Q1', actual: 45, target: 50, region: 'North' },
{ quarter: 'Q2', actual: 55, target: 50, region: 'North' },
{ quarter: 'Q3', actual: 48, target: 50, region: 'North' },
{ quarter: 'Q4', actual: 62, target: 50, region: 'North' },
];
return (
<Chart3DComponent
id="comprehensive-chart"
title="Quarterly Sales Performance"
primaryXAxis={{
valueType: 'Category',
title: 'Quarter',
}}
primaryYAxis={{
title: 'Sales ($K)',
minimum: 0,
maximum: 70,
interval: 10,
}}
legendSettings={{
visible: true,
position: 'Bottom',
alignment: 'Center',
textStyle: {
fontFamily: 'Segoe UI',
size: '12px',
},
shapeHeight: 12,
shapeWidth: 12,
}}
tooltip={{
enable: true,
shared: true,
format: '<b>${point.x}</b><br/>${series.name}: <b>${point.y}K</b>',
fill: '#333',
textStyle: {
color: '#FFF',
size: '12px',
},
border: { width: 2, color: '#FFF' },
}}
rotation={7}
tilt={10}
>
<Inject
services={[
ColumnSeries3D,
Category3D,
Legend3D,
DataLabel3D,
Tooltip3D,
]}
/>
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={salesData}
xName="quarter"
yName="actual"
type="Column"
name="Actual Sales"
dataLabel={{
visible: true,
position: 'Top',
format: '{value}K',
font: {
fontWeight: '600',
size: '11px',
color: '#2C5F2D',
},
}}
/>
<Chart3DSeriesDirective
dataSource={salesData}
xName="quarter"
yName="target"
type="Column"
name="Target"
dataLabel={{
visible: true,
position: 'Top',
format: '{value}K',
font: {
fontWeight: '600',
size: '11px',
color: '#8B4513',
},
}}
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}
export default App;
createRoot(document.getElementById('charts')).render(<App />);Best Practices
Data labels:
- Use for small datasets (<10 points) to avoid clutter
- Position at 'Top' for column charts, 'Outer' for bars
- Use contrasting colors for readability
- Consider hiding when chart has many series
Legend:
- Place 'Bottom' or 'Right' for most use cases
- Use 'Top' sparingly (interferes with title)
- Keep series names concise (<20 characters)
- Hide legend if only one series
Tooltips:
- Always enable for interactive charts
- Use shared tooltip for multi-series comparison
- Include units in format (K, %, etc.)
- Keep template HTML simple for performance
Combining:
- Data labels + tooltip: Use labels for key points, tooltip for details
- Legend + tooltip: Essential for multi-series charts
- All three: Only when all serve distinct purposes
Common Issues
Data labels overlapping:
- Reduce number of data points
- Use
position: 'Outer'or 'Auto' - Adjust
font.sizeto smaller value - Consider hiding labels, using tooltip instead
Legend not showing:
- Ensure
Legend3Dservice is injected - Check
legendSettings.visibleis true - Verify series have
nameproperty - Check legend position doesn't place it outside viewport
Tooltip not appearing:
- Inject
Tooltip3Dservice - Set
tooltip.enable: true - Ensure hovering over data points (not empty space)
- Check tooltip not blocked by CSS z-index issues
Custom templates not rendering:
- Use proper HTML syntax in template string
- Escape special characters if needed
- Test with simple template first, then add complexity
---
See also: api-reference.md | usage-example.md
DateTime Axis Configuration
A DateTime axis displays time-based data with automatic interval calculation, date formatting, and intelligent label placement.
Table of contents
- Basic DateTime Axis
- Date Data Formats
- JavaScript Date Objects (Recommended)
- ISO Date Strings
- Timestamp Milliseconds
- Label Formatting
- Standard Date Formats
- Month and Year
- Time Format
- Interval Configuration
- Automatic Intervals
- Manual Interval with Interval Type
- Range Configuration
- Custom Date Range
- Range Padding
- Label Rotation and Styling
- Complete DateTime Example
- Hourly/Minute Data Example
- Common Issues
Basic DateTime Axis
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, ColumnSeries3D, DateTime3D } from '@syncfusion/ej2-react-charts';
function DateTimeAxisChart() {
const data = [
{ date: new Date(2023, 0, 1), value: 30 },
{ date: new Date(2023, 1, 1), value: 35 },
{ date: new Date(2023, 2, 1), value: 32 },
{ date: new Date(2023, 3, 1), value: 38 },
{ date: new Date(2023, 4, 1), value: 42 }
];
return (
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'DateTime',
title: 'Month'
}}
primaryYAxis={{
title: 'Sales'
}}
>
<Inject services={[ColumnSeries3D, DateTime3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='date'
yName='value'
type='Column'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Key requirement: Must inject DateTime3D service and set valueType: 'DateTime'.
Date Data Formats
JavaScript Date Objects (Recommended)
const data = [
{ date: new Date(2023, 0, 15), sales: 120 }, // Jan 15, 2023
{ date: new Date(2023, 1, 15), sales: 135 }, // Feb 15, 2023
{ date: new Date(2023, 2, 15), sales: 142 } // Mar 15, 2023
];ISO Date Strings
const data = [
{ date: new Date('2023-01-15T00:00:00'), sales: 120 },
{ date: new Date('2023-02-15T00:00:00'), sales: 135 },
{ date: new Date('2023-03-15T00:00:00'), sales: 142 }
];Timestamp Milliseconds
const data = [
{ date: new Date(1673740800000), sales: 120 }, // Timestamp
{ date: new Date(1676419200000), sales: 135 },
{ date: new Date(1678838400000), sales: 142 }
];Label Formatting
Standard Date Formats
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'DateTime',
labelFormat: 'MMM dd', // Jan 15, Feb 15, etc.
// OR
// labelFormat: 'dd/MM/yyyy', // 15/01/2023
// OR
// labelFormat: 'yyyy', // 2023
}}
>
{/* Series */}
</Chart3DComponent>Common format patterns:
MMM dd: Jan 15, Feb 15dd MMM: 15 Jan, 15 FebMMM yyyy: Jan 2023, Feb 2023dd/MM/yyyy: 15/01/2023MM/dd/yyyy: 01/15/2023yyyy-MM-dd: 2023-01-15hh:mm a: 02:30 PMHH:mm: 14:30
Month and Year
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'DateTime',
labelFormat: 'MMM yyyy', // Jan 2023, Feb 2023
intervalType: 'Months',
interval: 1
}}
>
{/* Series */}
</Chart3DComponent>Time Format
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'DateTime',
labelFormat: 'hh:mm:ss', // 02:30:45
intervalType: 'Hours'
}}
>
{/* Series */}
</Chart3DComponent>Interval Configuration
Automatic Intervals
The chart automatically determines the most suitable interval based on the data range.
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'DateTime',
// Automatic interval calculation
}}
>
{/* Series */}
</Chart3DComponent>Manual Interval with Interval Type
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'DateTime',
intervalType: 'Months', // Options: 'Auto', 'Years', 'Months', 'Days', 'Hours', 'Minutes', 'Seconds'
interval: 3 // Every 3 months
}}
>
{/* Series */}
</Chart3DComponent>Interval types:
Auto: Automatically determine based on data rangeYears: Yearly intervalsMonths: Monthly intervalsDays: Daily intervalsHours: Hourly intervalsMinutes: Minute intervalsSeconds: Second intervals
Examples for Different Time Ranges
Daily data:
primaryXAxis={{
valueType: 'DateTime',
intervalType: 'Days',
interval: 1,
labelFormat: 'dd MMM'
}}Weekly data:
primaryXAxis={{
valueType: 'DateTime',
intervalType: 'Days',
interval: 7,
labelFormat: 'dd MMM'
}}Quarterly data:
primaryXAxis={{
valueType: 'DateTime',
intervalType: 'Months',
interval: 3,
labelFormat: 'MMM yyyy'
}}Yearly data:
primaryXAxis={{
valueType: 'DateTime',
intervalType: 'Years',
interval: 1,
labelFormat: 'yyyy'
}}Range Configuration
Custom Date Range
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'DateTime',
minimum: new Date(2023, 0, 1), // Jan 1, 2023
maximum: new Date(2023, 11, 31), // Dec 31, 2023
intervalType: 'Months',
interval: 2
}}
>
{/* Series */}
</Chart3DComponent>Range Padding
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'DateTime',
rangePadding: 'Additional' // Add padding around date range
}}
>
{/* Series */}
</Chart3DComponent>Label Rotation and Styling
Handle long date labels:
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'DateTime',
labelFormat: 'dd MMM yyyy',
labelRotation: -45,
labelStyle: {
size: '11px',
fontWeight: '500'
}
}}
>
{/* Series */}
</Chart3DComponent>Complete DateTime Example
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, DateTime3D, ColumnSeries3D } from '@syncfusion/ej2-react-charts';
import * as React from "react";
import { createRoot } from 'react-dom/client';
function App() {
const salesData = [
{ date: new Date(2023, 0, 1), sales: 45000 },
{ date: new Date(2023, 1, 1), sales: 52000 },
{ date: new Date(2023, 2, 1), sales: 48000 },
{ date: new Date(2023, 3, 1), sales: 58000 },
{ date: new Date(2023, 4, 1), sales: 63000 },
{ date: new Date(2023, 5, 1), sales: 59000 },
{ date: new Date(2023, 6, 1), sales: 68000 },
{ date: new Date(2023, 7, 1), sales: 72000 },
{ date: new Date(2023, 8, 1), sales: 70000 },
{ date: new Date(2023, 9, 1), sales: 78000 },
{ date: new Date(2023, 10, 1), sales: 82000 },
{ date: new Date(2023, 11, 1), sales: 88000 }
];
return (
<Chart3DComponent
id='datetime-chart'
title='Monthly Sales - 2023'
primaryXAxis={{
valueType: 'DateTime',
title: 'Month',
labelFormat: 'MMM',
intervalType: 'Months',
interval: 1,
edgeLabelPlacement: 'Shift',
majorGridLines: {
width: 1,
color: '#E0E0E0'
},
labelStyle: {
size: '12px'
}
}}
primaryYAxis={{
title: 'Sales ($)',
labelFormat: '${value}K',
minimum: 0,
maximum: 100000,
interval: 20000
}}
rotation={7}
tilt={10}
>
<Inject services={[ColumnSeries3D, DateTime3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={salesData}
xName='date'
yName='sales'
type='Column'
name='Sales'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}
;
export default App;
createRoot(document.getElementById('charts')).render(<App />);Hourly/Minute Data Example
function HourlyTraffic() {
const data = [
{ time: new Date(2023, 5, 15, 8, 0), visitors: 120 },
{ time: new Date(2023, 5, 15, 10, 0), visitors: 245 },
{ time: new Date(2023, 5, 15, 12, 0), visitors: 380 },
{ time: new Date(2023, 5, 15, 14, 0), visitors: 310 },
{ time: new Date(2023, 5, 15, 16, 0), visitors: 290 },
{ time: new Date(2023, 5, 15, 18, 0), visitors: 420 }
];
return (
<Chart3DComponent
id='hourly-chart'
title='Website Traffic - June 15, 2023'
primaryXAxis={{
valueType: 'DateTime',
title: 'Time',
labelFormat: 'hh:mm a',
intervalType: 'Hours',
interval: 2,
minimum: new Date(2023, 5, 15, 7, 0),
maximum: new Date(2023, 5, 15, 19, 0)
}}
primaryYAxis={{
title: 'Visitors',
minimum: 0,
maximum: 500,
interval: 100
}}
>
<Inject services={[ColumnSeries3D, DateTime3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='time'
yName='visitors'
type='Column'
name='Visitors'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Common Issues
Dates not displaying correctly:
- Ensure data contains actual Date objects:
new Date(...) - Verify
valueType: 'DateTime'is set - Check
DateTime3Dservice is injected
Labels overlapping:
- Use
labelRotation: -45or-90 - Reduce label density with larger
interval - Use shorter
labelFormat(e.g., 'MMM' instead of 'MMM yyyy')
Wrong date range:
- Set
minimumandmaximumexplicitly - Adjust
rangePaddingsetting - Verify date objects are valid
Incorrect intervals:
- Set
intervalTypeto match your data granularity - Adjust
intervalvalue - Use
edgeLabelPlacement: 'Shift'for edge labels
---
See also: api-reference.md | usage-example.md
Getting Started with 3D Charts
This guide covers installation, setup, and creating your first Syncfusion React 3D Chart.
Table of contents
- Installation
- Required Imports
- CSS Imports
- Basic 3D Column Chart
- Essential Props
- Module Injection
- Data Binding
- Array of Objects (Recommended)
- Multiple Series
- Adding Title and Subtitle
- Troubleshooting
Installation
Install the required package:
npm install @syncfusion/ej2-react-charts --saveRequired Imports
Import the necessary modules in your component:
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, ColumnSeries3D, Category3D, Legend3D, DataLabel3D, Tooltip3D } from '@syncfusion/ej2-react-charts';Theme Customization
Available themes (18+ including dark & high contrast):
- Material, MaterialDark, Material3, Material3Dark
- Fabric, FabricDark
- Bootstrap, BootstrapDark, Bootstrap4, Bootstrap5, Bootstrap5Dark, Bootstrap5.3, Bootstrap5.3Dark
- Tailwind, TailwindDark
- Fluent, FluentDark, Fluent2, Fluent2Dark, Fluent2HighContrast
- HighContrast, HighContrastLight
Switch via the theme prop:
<Chart3DComponent theme='Material3Dark'>
{/* Sankey content */}
</Chart3DComponent>Basic 3D Column Chart
Create a simple 3D column chart with category axis:
import React from 'react';
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, ColumnSeries3D, Category3D } from '@syncfusion/ej2-react-charts';
function App() {
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'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{ title: 'Sales' }}
>
<Inject services={[ColumnSeries3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='month'
yName='sales'
type='Column'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}
export default App;Essential Props
Chart3DComponent:
id: Unique identifier (required)primaryXAxis: X-axis configurationprimaryYAxis: Y-axis configurationenableRotation: Enable 3D rotation (default: true)rotation: Rotation angle (0-360, default: 7)tilt: Tilt angle (0-90, default: 10)depth: Chart depth (20-100, default: 100)
Chart3DSeriesDirective:
dataSource: Array of data objectsxName: Property name for x-axis valuesyName: Property name for y-axis valuestype: Chart type ('Column', 'Bar', 'StackingColumn', etc.)
Module Injection
The Inject component registers modules needed by the chart. Common modules:
ColumnSeries3D: Column chart typeBarSeries3D: Bar chart typeStackingColumnSeries3D: Stacked column typeStackingBarSeries3D: Stacked bar typeCategory3D: Category axisDateTime3D: DateTime axisLogarithmic3D: Logarithmic axisLegend3D: Legend supportDataLabel3D: Data label supportTooltip3D: Tooltip supportHighlight3D: Highlight on hoverSelection3D: Data point selectionExport3D: Export functionality
Always inject the series type and axis type you're using.
Data Binding
Array of Objects (Recommended)
const data = [
{ category: 'Product A', value: 30 },
{ category: 'Product B', value: 40 },
{ category: 'Product C', value: 25 }
];
<Chart3DSeriesDirective
dataSource={data}
xName='category'
yName='value'
type='Column'
/>Multiple Series
const salesData = [
{ month: 'Jan', product1: 35, product2: 28 },
{ month: 'Feb', product1: 28, product2: 34 },
{ month: 'Mar', product1: 34, product2: 40 }
];
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={salesData}
xName='month'
yName='product1'
type='Column'
name='Product 1'
/>
<Chart3DSeriesDirective
dataSource={salesData}
xName='month'
yName='product2'
type='Column'
name='Product 2'
/>
</Chart3DSeriesCollectionDirective>Adding Title and Subtitle
<Chart3DComponent
id='chart'
title='Monthly Sales Report'
titleStyle={{ fontFamily: 'Segoe UI', fontWeight: '600', size: '16px' }}
subTitle='2024 Data'
subTitleStyle={{ fontFamily: 'Segoe UI', size: '12px' }}
primaryXAxis={{ valueType: 'Category' }}
>
{/* Series */}
</Chart3DComponent>Troubleshooting
Chart not rendering:
- Verify CSS imports are present
- Check that
Injectincludes the chart type (e.g.,ColumnSeries3D) - Ensure
primaryXAxis.valueTypematches your data (Category, Numeric, DateTime) - Verify container has height/width (set explicit dimensions if needed)
Data not displaying:
- Check
xNameandyNamematch property names in dataSource exactly (case-sensitive) - Ensure dataSource is an array of objects, not null/undefined
- Verify numeric values are numbers, not strings
TypeScript errors:
- Import types:
import { Chart3DLoadedEventArgs } from '@syncfusion/ej2-react-charts'; - Type your data array:
const data: { month: string; sales: number }[] = [...]
3D view not visible:
- Set
enableRotation={true}explicitly - Adjust
rotation(0-360) andtilt(0-90) values - Increase
depthfor more pronounced 3D effect
---
See also: api-reference.md | usage-example.md
Logarithmic Axis Configuration
A logarithmic axis displays data that spans multiple orders of magnitude using a logarithmic scale, making it ideal for exponential growth, scientific data, or wide value ranges.
Table of contents
- Basic Logarithmic Axis
- When to Use Logarithmic Scale
- Logarithmic Base
- Base 10 (Default)
- Base 2
- Natural Logarithm (Base e)
- Range and Interval
- Custom Range
- Automatic Range
- Label Formatting
- Standard Numeric Format
- Scientific Notation
- Custom Units
- Grid Lines
- Complete Logarithmic Example
- Logarithmic vs Linear Comparison
- Common Use Cases
- Common Issues
Basic Logarithmic Axis
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, ColumnSeries3D, Logarithmic3D, Category3D } from '@syncfusion/ej2-react-charts';
function LogarithmicAxisChart() {
const data = [
{ x: 'Product A', y: 10 },
{ x: 'Product B', y: 100 },
{ x: 'Product C', y: 1000 },
{ x: 'Product D', y: 10000 },
{ x: 'Product E', y: 100000 }
];
return (
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'Category'
}}
primaryYAxis={{
valueType: 'Logarithmic',
title: 'Values (Log Scale)'
}}
>
<Inject services={[ColumnSeries3D, Logarithmic3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='x'
yName='y'
type='Column'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Key requirement: Must inject Logarithmic3D service and set valueType: 'Logarithmic'.
When to Use Logarithmic Scale
Use logarithmic axis when:
- Data spans multiple orders of magnitude (1, 10, 100, 1000, etc.)
- Showing exponential growth or decay
- Comparing percentage changes rather than absolute differences
- Scientific data (pH, decibels, earthquake magnitude)
- Financial data with wide value ranges
Example scenarios:
- Population growth over centuries
- Stock prices over long periods
- Website traffic (10 to 10,000,000 visitors)
- Scientific measurements (0.001 to 10,000)
Logarithmic Base
Base 10 (Default)
<Chart3DComponent
id='chart'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{
valueType: 'Logarithmic',
logBase: 10 // Default, can be omitted
}}
>
{/* Series */}
</Chart3DComponent>Base 10 intervals: 1, 10, 100, 1000, 10000, ...
Base 2
<Chart3DComponent
id='chart'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{
valueType: 'Logarithmic',
logBase: 2,
title: 'Values (Log₂)'
}}
>
{/* Series */}
</Chart3DComponent>Base 2 intervals: 1, 2, 4, 8, 16, 32, 64, 128, ...
Use case: Computer science (memory sizes, binary trees, algorithm complexity)
Natural Logarithm (Base e)
<Chart3DComponent
id='chart'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{
valueType: 'Logarithmic',
logBase: Math.E,
title: 'Values (ln)'
}}
>
{/* Series */}
</Chart3DComponent>Use case: Natural sciences, continuous growth models
Range and Interval
Custom Range
<Chart3DComponent
id='chart'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{
valueType: 'Logarithmic',
minimum: 1,
maximum: 100000,
interval: 1 // Interval in logarithmic scale (powers)
}}
>
{/* Series */}
</Chart3DComponent>Note: interval: 1 with base 10 means labels at 10⁰, 10¹, 10², etc. (1, 10, 100, 1000)
Automatic Range
Let chart calculate optimal range:
<Chart3DComponent
id='chart'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{
valueType: 'Logarithmic'
// Automatic min/max based on data
}}
>
{/* Series */}
</Chart3DComponent>Label Formatting
Standard Numeric Format
<Chart3DComponent
id='chart'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{
valueType: 'Logarithmic',
labelFormat: 'n0' // 1, 10, 100, 1,000, 10,000
}}
>
{/* Series */}
</Chart3DComponent>Scientific Notation
<Chart3DComponent
id='chart'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{
valueType: 'Logarithmic',
labelFormat: '{value}',
// Will display as: 1e+0, 1e+1, 1e+2, etc.
}}
>
{/* Series */}
</Chart3DComponent>Custom Units
<Chart3DComponent
id='chart'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{
valueType: 'Logarithmic',
labelFormat: '{value} units',
logBase: 10
}}
>
{/* Series */}
</Chart3DComponent>Grid Lines
<Chart3DComponent
id='chart'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{
valueType: 'Logarithmic',
majorGridLines: {
width: 1,
color: '#E0E0E0'
},
minorGridLines: {
width: 1,
color: '#F5F5F5'
},
minorTicksPerInterval: 8 // Minor ticks between logarithmic intervals
}}
>
{/* Series */}
</Chart3DComponent>Note: Minor ticks in logarithmic scale appear at intermediate values (e.g., 2, 3, 4, ..., 9 between 1 and 10).
Complete Logarithmic Example
function ExponentialGrowth() {
const growthData = [
{ year: '2000', users: 100 },
{ year: '2005', users: 1000 },
{ year: '2010', users: 10000 },
{ year: '2015', users: 100000 },
{ year: '2020', users: 1000000 },
{ year: '2023', users: 5000000 }
];
return (
<Chart3DComponent
id='log-chart'
title='User Growth (Logarithmic Scale)'
primaryXAxis={{
valueType: 'Category',
title: 'Year'
}}
primaryYAxis={{
valueType: 'Logarithmic',
title: 'Number of Users (Log Scale)',
logBase: 10,
minimum: 10,
maximum: 10000000,
interval: 1,
labelFormat: 'n0',
majorGridLines: {
width: 1,
color: '#E0E0E0'
},
minorGridLines: {
width: 1,
color: '#F5F5F5'
},
minorTicksPerInterval: 8
}}
rotation={7}
tilt={10}
>
<Inject services={[ColumnSeries3D, Logarithmic3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={growthData}
xName='year'
yName='users'
type='Column'
name='Users'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Logarithmic vs Linear Comparison
Linear Scale (For Comparison)
// Linear scale - hard to see small values
const data = [
{ x: 'A', y: 5 },
{ x: 'B', y: 50 },
{ x: 'C', y: 500 },
{ x: 'D', y: 5000 }
];
// Bars at 5, 50, 500 appear drastically different in height
// 5 is barely visible compared to 5000Logarithmic Scale (Better Visualization)
<Chart3DComponent
primaryYAxis={{ valueType: 'Logarithmic' }}
>
{/* Same data, but all bars are more comparable */}
{/* Shows relative differences and growth rates clearly */}
</Chart3DComponent>Key difference: Logarithmic scale shows rate of change (percentage growth), linear scale shows absolute change (actual difference).
Common Use Cases
Scientific Data
function PHLevels() {
const phData = [
{ substance: 'Battery Acid', ph: 0.5 },
{ substance: 'Lemon Juice', ph: 2 },
{ substance: 'Coffee', ph: 5 },
{ substance: 'Water', ph: 7 },
{ substance: 'Baking Soda', ph: 9 },
{ substance: 'Bleach', ph: 12.5 }
];
return (
<Chart3DComponent
id='ph-chart'
title='pH Levels of Common Substances'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{
valueType: 'Logarithmic',
logBase: 10,
title: 'pH (Logarithmic Scale)',
minimum: 0.1,
maximum: 14
}}
>
<Inject services={[ColumnSeries3D, Logarithmic3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={phData}
xName='substance'
yName='ph'
type='Column'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Financial Data
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, ColumnSeries3D, Category3D, Logarithmic3D } from '@syncfusion/ej2-react-charts';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React, { useRef } from 'react';
function App() {
const stockData = [
{ year: '2010', price: 10 },
{ year: '2015', price: 50 },
{ year: '2020', price: 250 },
{ year: '2023', price: 800 }
];
return (
<Chart3DComponent
id='stock-chart'
title='Stock Price Growth'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{
valueType: 'Logarithmic',
logBase: 10,
title: 'Stock Price ($)',
labelFormat: '${value}'
}}
>
<Inject services={[ColumnSeries3D, Logarithmic3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={stockData}
xName='year'
yName='price'
type='Column'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}
export default App;
ReactDOM.render(<App />, document.getElementById('charts'));Common Issues
Negative or zero values:
- Logarithmic scale cannot display zero or negative values
- Filter out or replace with small positive values (e.g., 0.1)
- Use linear scale if data includes zero/negative
Chart appears compressed:
- This is expected behavior showing proportional relationships
- Logarithmic scale emphasizes percentage changes, not absolute values
Wrong intervals:
- Adjust
interval(in powers of the base) interval: 1with base 10 = 10⁰, 10¹, 10² (1, 10, 100)interval: 2with base 10 = 10⁰, 10², 10⁴ (1, 100, 10000)
Service not found error:
- Ensure
Logarithmic3Dis imported and injected - Verify
valueType: 'Logarithmic'is set correctly
---
See also: api-reference.md | usage-example.md
Multiple Panes Layout
Multiple panes allow you to divide the chart area into rows and columns, enabling different series to display in separate chart regions while sharing axes or having independent axes.
Table of contents
- Basic Multiple Rows
- Row Configuration
- Equal Height Rows
- Custom Height Distribution
- Row Borders
- Assigning Series to Rows
- Shared Axes Across Rows
- Spanning Multiple Rows
- Complete Multiple Panes Example
- Use Cases
- Best Practices
- Common Issues
Basic Multiple Rows
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, ColumnSeries3D, Category3D } from '@syncfusion/ej2-react-charts';
function MultipleRowsChart() {
const salesData = [
{ month: 'Jan', sales: 35, profit: 12 },
{ month: 'Feb', sales: 42, profit: 15 },
{ month: 'Mar', sales: 38, profit: 11 },
{ month: 'Apr', sales: 48, profit: 18 }
];
return (
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'Category'
}}
rows={[
{ height: '50%' }, // Top row
{ height: '50%' } // Bottom row
]}
axes={[
{
name: 'yAxis1',
rowIndex: 0,
title: 'Sales',
opposedPosition: true
},
{
name: 'yAxis2',
rowIndex: 1,
title: 'Profit'
}
]}
>
<Inject services={[ColumnSeries3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={salesData}
xName='month'
yName='sales'
type='Column'
name='Sales'
yAxisName='yAxis1'
/>
<Chart3DSeriesDirective
dataSource={salesData}
xName='month'
yName='profit'
type='Column'
name='Profit'
yAxisName='yAxis2'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Row Configuration
Equal Height Rows
<Chart3DComponent
rows={[
{ height: '33%' },
{ height: '33%' },
{ height: '34%' }
]}
>
{/* Three rows with equal height */}
</Chart3DComponent>Custom Height Distribution
<Chart3DComponent
rows={[
{ height: '60%' }, // Main chart takes 60%
{ height: '40%' } // Secondary chart takes 40%
]}
>
{/* Two rows with different heights */}
</Chart3DComponent>Assigning Series to Rows
Use yAxisName and axis rowIndex to control placement:
function ThreeRowChart() {
const data = [
{ x: 'A', revenue: 120, cost: 80, profit: 40 },
{ x: 'B', revenue: 150, cost: 95, profit: 55 },
{ x: 'C', revenue: 135, cost: 88, profit: 47 }
];
return (
<Chart3DComponent
id='three-row'
primaryXAxis={{ valueType: 'Category' }}
rows={[
{ height: '40%' },
{ height: '30%' },
{ height: '30%' }
]}
axes={[
{
name: 'yAxis1',
rowIndex: 0,
title: 'Revenue',
minimum: 0,
maximum: 200
},
{
name: 'yAxis2',
rowIndex: 1,
title: 'Cost',
minimum: 0,
maximum: 150,
opposedPosition: true
},
{
name: 'yAxis3',
rowIndex: 2,
title: 'Profit',
minimum: 0,
maximum: 80
}
]}
>
<Inject services={[ColumnSeries3D, Category3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='x'
yName='revenue'
type='Column'
name='Revenue'
yAxisName='yAxis1'
/>
<Chart3DSeriesDirective
dataSource={data}
xName='x'
yName='cost'
type='Column'
name='Cost'
yAxisName='yAxis2'
/>
<Chart3DSeriesDirective
dataSource={data}
xName='x'
yName='profit'
type='Column'
name='Profit'
yAxisName='yAxis3'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Shared Axes Across Rows
Multiple series can share the same row:
function SharedRowChart() {
const data = [
{ month: 'Jan', actual: 35, target: 40 },
{ month: 'Feb', actual: 42, target: 40 },
{ month: 'Mar', actual: 38, target: 40 }
];
return (
<Chart3DComponent
id='shared-row'
primaryXAxis={{ valueType: 'Category' }}
rows={[{ height: '100%' }]}
axes={[
{
name: 'yAxis1',
rowIndex: 0,
title: 'Sales',
opposedPosition: true
}
]}
>
<Inject services={[ColumnSeries3D, Category3D, Legend3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='month'
yName='actual'
type='Column'
name='Actual'
yAxisName='yAxis1'
/>
<Chart3DSeriesDirective
dataSource={data}
xName='month'
yName='target'
type='Column'
name='Target'
yAxisName='yAxis1'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Spanning Multiple Rows
An axis can span multiple rows:
<Chart3DComponent
rows={[
{ height: '50%' },
{ height: '50%' }
]}
axes={[
{
name: 'yAxis1',
rowIndex: 0,
span: 2, // Spans both rows
title: 'Shared Axis'
}
]}
>
{/* Series in different rows but sharing same axis */}
</Chart3DComponent>Complete Multiple Panes Example
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, ColumnSeries3D, Category3D, Export3D, Legend3D } from '@syncfusion/ej2-react-charts';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React, { useRef } from 'react';
function MultiplePane() {
const financialData = [
{ quarter: 'Q1', revenue: 120, expenses: 80, netIncome: 40 },
{ quarter: 'Q2', revenue: 150, expenses: 95, netIncome: 55 },
{ quarter: 'Q3', revenue: 135, expenses: 88, netIncome: 47 },
{ quarter: 'Q4', revenue: 165, expenses: 102, netIncome: 63 }
];
return (
<Chart3DComponent
id='multi-pane-financial'
title='Quarterly Financial Performance'
primaryXAxis={{
valueType: 'Category',
title: 'Quarter'
}}
rows={[
{
height: '40%',
border: { width: 1, color: '#E0E0E0' }
},
{
height: '30%',
border: { width: 1, color: '#E0E0E0' }
},
{
height: '30%',
border: { width: 1, color: '#E0E0E0' }
}
]}
axes={[
{
name: 'revenueAxis',
rowIndex: 0,
title: 'Revenue ($K)',
minimum: 0,
maximum: 200,
interval: 50,
labelFormat: '${value}K',
majorGridLines: { width: 1, color: '#E0E0E0' }
},
{
name: 'expenseAxis',
rowIndex: 1,
title: 'Expenses ($K)',
minimum: 0,
maximum: 150,
interval: 50,
labelFormat: '${value}K',
majorGridLines: { width: 1, color: '#E0E0E0' },
opposedPosition: true
},
{
name: 'incomeAxis',
rowIndex: 2,
title: 'Net Income ($K)',
minimum: 0,
maximum: 80,
interval: 20,
labelFormat: '${value}K',
majorGridLines: { width: 1, color: '#E0E0E0' }
}
]}
rotation={7}
tilt={10}
>
<Inject services={[ColumnSeries3D, Category3D, Legend3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={financialData}
xName='quarter'
yName='revenue'
type='Column'
name='Revenue'
yAxisName='revenueAxis'
/>
<Chart3DSeriesDirective
dataSource={financialData}
xName='quarter'
yName='expenses'
type='Column'
name='Expenses'
yAxisName='expenseAxis'
/>
<Chart3DSeriesDirective
dataSource={financialData}
xName='quarter'
yName='netIncome'
type='Column'
name='Net Income'
yAxisName='incomeAxis'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}
export default MultiplePane;
ReactDOM.render(<MultiplePane />, document.getElementById('charts'));Use Cases
Financial dashboards:
- Revenue, expenses, and profit in separate panes
- Each with appropriate scale
Multi-metric monitoring:
- Temperature, humidity, pressure
- Different units, separate ranges
Comparison charts:
- Actual vs budget in top pane
- Variance in bottom pane
Time series analysis:
- Main data series on top
- Moving average or trend below
Best Practices
Height distribution:
- Primary data gets larger pane (50-60%)
- Secondary/supporting data gets smaller pane (30-40%)
- Equal heights only if metrics are equally important
Axis configuration:
- Match axis
rowIndexwith row position (0-indexed) - Set appropriate
minimum,maximumfor each axis - Use consistent
labelFormatfor similar metrics
Visual consistency:
- Use row borders sparingly (may clutter)
- Maintain consistent color scheme across panes
- Align gridlines if possible
Performance:
- Limit to 2-4 rows for readability
- Too many panes reduce individual chart size
- Consider separate charts if >4 metrics
Common Issues
Series not appearing in correct row:
- Verify axis
rowIndexmatches row position - Check series
yAxisNamematches axisname - Ensure
rowsarray has correct number of entries
Rows overlapping:
- Total height percentages should sum to 100%
- Use exact percentages: '33.33%' instead of '33%' for three equal rows
Axes not aligned:
- Set matching
rowIndexfor axes that should be in same row - Use
spanproperty for axes spanning multiple rows
Uneven spacing:
- Specify explicit height percentages
- Check for border widths affecting layout
---
See also: api-reference.md | usage-example.md
Numeric Axis Configuration
A numeric axis displays continuous numerical values with automatic scaling, range calculation, and interval determination.
Table of contents
- Basic Numeric Axis
- Range Configuration
- Automatic Range (Default)
- Custom Range
- Range Padding
- Interval Configuration
- Automatic Interval
- Custom Interval
- Desired Intervals Count
- Label Formatting
- Currency Format
- Thousands Separator
- Decimal Precision
- Percentage Format
- Custom Formatting
- Axis Line and Grid
- Tick Configuration
- Multiple Axes
- Opposed Axis
- Complete Numeric Axis Example
- Common Issues
Basic Numeric Axis
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, ColumnSeries3D } from '@syncfusion/ej2-react-charts';
function NumericAxisChart() {
const data = [
{ x: 2018, y: 45000 },
{ x: 2019, y: 52000 },
{ x: 2020, y: 48000 },
{ x: 2021, y: 58000 },
{ x: 2022, y: 63000 }
];
return (
<Chart3DComponent
id='chart'
primaryXAxis={{
valueType: 'Double', // Numeric axis (default)
title: 'Year'
}}
primaryYAxis={{
title: 'Revenue ($)'
}}
>
<Inject services={[ColumnSeries3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='x'
yName='y'
type='Column'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Note: Numeric axis is the default type; valueType: 'Double' can be omitted.
Range Configuration
Automatic Range (Default)
Chart automatically calculates minimum and maximum:
<Chart3DComponent
id='chart'
primaryYAxis={{
// Auto range based on data
}}
>
{/* Series */}
</Chart3DComponent>Custom Range
Set explicit minimum and maximum values:
<Chart3DComponent
id='chart'
primaryYAxis={{
minimum: 0,
maximum: 100,
interval: 20 // Show labels at 0, 20, 40, 60, 80, 100
}}
>
{/* Series */}
</Chart3DComponent>Use custom range when:
- You want consistent scale across multiple charts
- Need to emphasize certain value ranges
- Comparing charts with different data ranges
Range Padding
Add padding around automatic range:
<Chart3DComponent
id='chart'
primaryYAxis={{
rangePadding: 'Additional' // Options: 'None', 'Round', 'Additional', 'Normal', 'Auto'
}}
>
{/* Series */}
</Chart3DComponent>Range padding options:
None: No padding, tight fit to dataRound: Round to nice numbersAdditional: Add 10% paddingNormal: Standard padding (default)Auto: Automatic based on data
Interval Configuration
Automatic Interval
Chart calculates optimal interval:
<Chart3DComponent
id='chart'
primaryYAxis={{
// Automatic interval calculation
}}
>
{/* Series */}
</Chart3DComponent>Custom Interval
<Chart3DComponent
id='chart'
primaryYAxis={{
minimum: 0,
maximum: 100,
interval: 25 // Labels at 0, 25, 50, 75, 100
}}
>
{/* Series */}
</Chart3DComponent>Desired Intervals Count
Suggest number of intervals without setting exact value:
<Chart3DComponent
id='chart'
primaryYAxis={{
desiredIntervals: 5 // Approximately 5 intervals
}}
>
{/* Series */}
</Chart3DComponent>Label Formatting
Currency Format
<Chart3DComponent
id='chart'
primaryYAxis={{
labelFormat: '${value}', // $1000, $2000, etc.
title: 'Revenue'
}}
>
{/* Series */}
</Chart3DComponent>Thousands Separator
<Chart3DComponent
id='chart'
primaryYAxis={{
labelFormat: 'n0', // 1,000 2,000 etc.
title: 'Population'
}}
>
{/* Series */}
</Chart3DComponent>Decimal Precision
<Chart3DComponent
id='chart'
primaryYAxis={{
labelFormat: 'n2', // 1.25, 2.50, etc. (2 decimal places)
title: 'Average Score'
}}
>
{/* Series */}
</Chart3DComponent>Percentage Format
<Chart3DComponent
id='chart'
primaryYAxis={{
labelFormat: '{value}%', // 10%, 20%, etc.
title: 'Growth Rate'
}}
>
{/* Series */}
</Chart3DComponent>Custom Formatting
<Chart3DComponent
id='chart'
primaryYAxis={{
labelFormat: '{value}K', // 10K, 20K, etc.
title: 'Users'
}}
>
{/* Series */}
</Chart3DComponent>Axis Line and Grid
Grid Lines
<Chart3DComponent
id='chart'
primaryYAxis={{
majorGridLines: {
width: 1,
color: '#E0E0E0'
},
minorGridLines: {
width: 1,
color: '#F5F5F5'
},
minorTicksPerInterval: 4 // 4 minor ticks between major ticks
}}
>
{/* Series */}
</Chart3DComponent>Tick Configuration
<Chart3DComponent
id='chart'
primaryYAxis={{
majorTickLines: {
width: 1,
height: 8,
color: '#333'
},
minorTickLines: {
width: 1,
height: 4,
color: '#999'
},
minorTicksPerInterval: 4
}}
>
{/* Series */}
</Chart3DComponent>Multiple Axes
Add secondary Y-axis for different value ranges:
function MultipleAxesChart() {
const data = [
{ x: 'Jan', temperature: 15, rainfall: 45 },
{ x: 'Feb', temperature: 18, rainfall: 38 },
{ x: 'Mar', temperature: 22, rainfall: 30 },
{ x: 'Apr', temperature: 28, rainfall: 22 }
];
return (
<Chart3DComponent
id='chart'
primaryXAxis={{ valueType: 'Category' }}
primaryYAxis={{
title: 'Temperature (°C)',
minimum: 0,
maximum: 40,
interval: 10
}}
axes={[
{
name: 'yAxis2',
opposedPosition: true,
title: 'Rainfall (mm)',
minimum: 0,
maximum: 60,
interval: 15,
labelFormat: '{value}mm'
}
]}
>
<Inject services={[ColumnSeries3D, Category3D, Legend3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='x'
yName='temperature'
type='Column'
name='Temperature'
/>
<Chart3DSeriesDirective
dataSource={data}
xName='x'
yName='rainfall'
type='Column'
name='Rainfall'
yAxisName='yAxis2'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Opposed Axis
Place axis on opposite side (right for Y-axis):
<Chart3DComponent
id='chart'
primaryYAxis={{
opposedPosition: true,
title: 'Values'
}}
>
{/* Series */}
</Chart3DComponent>Complete Numeric Axis Example
function AdvancedNumericAxis() {
const revenueData = [
{ year: 2018, revenue: 45000 },
{ year: 2019, revenue: 52000 },
{ year: 2020, revenue: 48000 },
{ year: 2021, revenue: 58000 },
{ year: 2022, revenue: 63000 },
{ year: 2023, revenue: 71000 }
];
return (
<Chart3DComponent
id='advanced-numeric'
title='Annual Revenue Growth'
primaryXAxis={{
valueType: 'Double',
title: 'Year',
minimum: 2017.5,
maximum: 2023.5,
interval: 1,
labelFormat: '{value}',
majorGridLines: { width: 1, color: '#E0E0E0' },
edgeLabelPlacement: 'Shift'
}}
primaryYAxis={{
title: 'Revenue',
minimum: 0,
maximum: 80000,
interval: 20000,
labelFormat: '${value}',
rangePadding: 'None',
majorGridLines: {
width: 1,
color: '#E0E0E0'
},
minorGridLines: {
width: 1,
color: '#F5F5F5'
},
minorTicksPerInterval: 3,
labelStyle: {
size: '12px',
fontWeight: '500'
}
}}
rotation={7}
tilt={10}
>
<Inject services={[ColumnSeries3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={revenueData}
xName='year'
yName='revenue'
type='Column'
name='Revenue'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
);
}Common Issues
Axis not showing expected range:
- Set
minimumandmaximumexplicitly - Check
rangePaddingsetting - Verify data values are numbers, not strings
Too many/few labels:
- Adjust
intervalvalue - Set
desiredIntervalsfor approximate count - Use
labelIntersectActionto handle overlap
Wrong number format:
- Use
labelFormat: 'n0'for thousands separator - Use
labelFormat: 'n2'for decimals - Use
labelFormat: '${value}'for currency
Minor grid lines not showing:
- Set
minorTicksPerInterval> 0 - Configure
minorGridLines.width> 0
---
See also: api-reference.md | usage-example.md
Print and Export
Export 3D charts as images (PNG, JPEG, SVG, PDF) or print directly from the browser.
Table of contents
- Print Functionality
- Basic Print
- Print with Custom IDs
- Export as Image
- Export to PNG
- Export to JPEG
- Export to SVG
- Export to PDF
- Export with Orientation
- Export Multiple Charts
- Before Export Event
- Complete Export Example with Menu
- Export Options Comparison
- Use Cases
- Best Practices
- Common Issues
Print Functionality
Basic Print
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, ColumnSeries3D, Category3D, Export3D } from '@syncfusion/ej2-react-charts';
function PrintChart() {
const chartRef = React.useRef<Chart3DComponent>(null);
const data = [
{ month: 'Jan', sales: 35 },
{ month: 'Feb', sales: 42 },
{ month: 'Mar', sales: 38 },
{ month: 'Apr', sales: 48 }
];
const handlePrint = () => {
if (chartRef.current) {
chartRef.current.print();
}
};
return (
<div>
<button onClick={handlePrint}>Print Chart</button>
<Chart3DComponent
ref={chartRef}
id='chart'
primaryXAxis={{ valueType: 'Category' }}
>
<Inject services={[ColumnSeries3D, Category3D, Export3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='month'
yName='sales'
type='Column'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
</div>
);
}Key requirement: Must inject Export3D service for print/export functionality.
Print with Custom IDs
Print specific charts by ID:
const handlePrintSpecific = () => {
if (chartRef.current) {
chartRef.current.print(['chart1', 'chart2']);
}
};Export as Image
Export to PNG
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, ColumnSeries3D, Category3D, Export3D } from '@syncfusion/ej2-react-charts';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React, { useRef } from 'react';
function ExportChart() {
const data = [
{ month: 'Jan', sales: 35 },
{ month: 'Feb', sales: 42 },
{ month: 'Mar', sales: 38 }
];
const chartRef = useRef(null);
const exportChart = (format) => {
if (chartRef.current) {
const fileName = `${new Date().getTime()}.${format.toLowerCase()}`;
chartRef.current.export(format, fileName);
}
};
return (
<div>
<div style={{ marginBottom: '15px' }}>
<button onClick={() => exportChart('PNG')}>Export as PNG</button>
</div>
<Chart3DComponent
ref={chartRef}
enableExport={true}
id='chart'
primaryXAxis={{ valueType: 'Category' }}
>
<Inject services={[ColumnSeries3D, Category3D, Export3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='month'
yName='sales'
type='Column'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
</div>
);
}
export default ExportChart;
ReactDOM.render(<ExportChart />, document.getElementById('charts'));SVG benefits:
- Vector format (scalable without quality loss)
- Smaller file size for simple charts
- Editable in vector graphics software
Before Export Event
Customize chart before exporting:
function CustomizedExport() {
const chartRef = React.useRef<Chart3DComponent>(null);
const data = [
{ month: 'Jan', sales: 35 },
{ month: 'Feb', sales: 42 }
];
const beforeExport = (args: any) => {
console.log('Exporting chart...');
// Modify chart appearance before export if needed
args.chart.title = 'Exported Sales Chart - ' + new Date().toLocaleDateString();
};
const handleExport = () => {
if (chartRef.current) {
chartRef.current.export('PNG', 'SalesChart');
}
};
return (
<div>
<button onClick={handleExport}>Export</button>
<Chart3DComponent
ref={chartRef}
id='chart'
primaryXAxis={{ valueType: 'Category' }}
beforeExport={beforeExport}
>
<Inject services={[ColumnSeries3D, Category3D, Export3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='month'
yName='sales'
type='Column'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
</div>
);
}Complete Export Example with Menu
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, Inject, ColumnSeries3D, Category3D, Export3D } from '@syncfusion/ej2-react-charts';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React, { useRef } from 'react';
function PrintChart() {
const data = [
{ month: 'Jan', sales: 35 },
{ month: 'Feb', sales: 42 },
{ month: 'Mar', sales: 38 }
];
const chartRef = useRef(null);
const exportChart = (format) => {
if (chartRef.current) {
const fileName = `${new Date().getTime()}.${format.toLowerCase()}`;
chartRef.current.export(format, fileName);
}
};
return (
<div>
<div style={{ marginBottom: '15px' }}>
<button onClick={() => exportChart('PNG')}>Export as PNG</button>
<button onClick={() => exportChart('PDF')}>Export as PDF</button>
<button onClick={() => exportChart('SVG')}>Export as SVG</button>
<button onClick={() => exportChart('JPEG')}>Export as JPEG</button>
<button onClick={() => window.print()}>Print</button>
</div>
<Chart3DComponent
ref={chartRef}
enableExport={true}
id='chart'
primaryXAxis={{ valueType: 'Category' }}
>
<Inject services={[ColumnSeries3D, Category3D, Export3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective
dataSource={data}
xName='month'
yName='sales'
type='Column'
/>
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
</div>
);
}
export default PrintChart;
ReactDOM.render(<PrintChart />, document.getElementById('charts'));Export Options Comparison
| Format | Best For | Pros | Cons |
|---|---|---|---|
| PNG | General use, web sharing | Lossless, supports transparency | Larger file size |
| JPEG | Photos, presentations | Smaller file size | Lossy compression, no transparency |
| SVG | Print, scaling, editing | Vector (infinite scaling), editable | Limited browser support for complex charts |
| Reports, archiving, printing | Universal format, maintains quality | Larger file size |
Use Cases
Reports:
- Export to PDF for quarterly reports
- Landscape orientation for wide charts
- Include timestamp in filename
Presentations:
- Export to PNG/JPEG for PowerPoint
- High resolution for projection
- Transparent background (PNG) for overlay
Web sharing:
- PNG for social media, blogs
- SVG for responsive web graphics
- JPEG for faster loading
Documentation:
- PDF for archiving analysis
- SVG for technical documentation (editable)
Printing:
- Direct print for immediate hardcopy
- PDF export for later printing
Best Practices
Filename conventions:
- Include date:
SalesChart_2023-12-15 - Include context:
Q4_Revenue_Report - Avoid special characters: use underscores, not spaces
Format selection:
- Default to PNG for general use
- Use SVG for scalable graphics
- Use PDF for formal reports
- Use JPEG only when file size critical
Before export:
- Update title with export date
- Hide/show specific elements
- Adjust colors for print (consider grayscale)
User experience:
- Show loading indicator during export
- Confirm successful export
- Provide format selection dropdown
Common Issues
Export not working:
- Ensure
Export3Dservice is injected - Check chart reference is valid
- Verify chart has rendered (use loaded event)
Exported image blank/corrupted:
- Wait for chart to fully load before exporting
- Check browser compatibility
- Try different format (e.g., PNG instead of PDF)
Print preview empty:
- Ensure chart has rendered
- Check CSS doesn't hide chart on print media
- Verify browser allows popup for print dialog
File not downloading:
- Check browser popup blocker settings
- Verify browser allows downloads from site
- Try different format
TypeScript errors with export:
- Import proper types:
import { Chart3DComponent } from '@syncfusion/ej2-react-charts'; - Use correct method signature:
export(type: ExportType, fileName: string, orientation?: number, controls?: any[])
---
See also: api-reference.md | usage-example.md
Chart3D Usage Example
Table of contents
- Minimal Example
- Imports
- Data
- Component
- See also
Minimal runnable example demonstrating common props, methods, and events for Chart3DComponent.
Imports
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React, { useRef } from 'react';
import {
Chart3DComponent,
Chart3DSeriesCollectionDirective,
Chart3DSeriesDirective,
Inject,
ColumnSeries3D,
Category3D,
Legend3D,
Tooltip3D
} from '@syncfusion/ej2-react-charts';Data
const data = [
{ x: 'Jan', y: 40 },
{ x: 'Feb', y: 55 },
{ x: 'Mar', y: 48 }
];Component
export default function Chart3DUsage() {
const chartRef = useRef(null);
const handleLoaded = () => console.log('3D chart loaded');
return (
<div>
<Chart3DComponent
id="chart3d"
primaryXAxis={{ valueType: 'Category' }}
dataSource={data}
enableRotation={true}
depth={90}
rotation={15}
tilt={8}
tooltip={{ enable: true }}
loaded={handleLoaded}
>
<Inject services={[ColumnSeries3D, Category3D, Legend3D, Tooltip3D]} />
<Chart3DSeriesCollectionDirective>
<Chart3DSeriesDirective dataSource={data} xName="x" yName="y" type="Column" name="Sales" />
</Chart3DSeriesCollectionDirective>
</Chart3DComponent>
</div>
);
}See also
See also: api-reference.md
ReactDOM.render(<Chart3DUsage />, document.getElementById('charts'));
See also: [api-reference.md](api-reference.md)