
Syncfusion Angular Smith Chart
- 166 installs
- Updated August 4, 2026
- syncfusion/angular-ui-components-skills
Use syncfusion-angular-smith-chart for development tasks
About
syncfusion-angular-smith-chart: A skill for development. This provides functionality for development workflows.
- syncfusion-angular-smith-chart
Syncfusion Angular Smith Chart by the numbers
- 166 all-time installs (skills.sh)
- +11 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #2,333 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/syncfusion/angular-ui-components-skills --skill syncfusion-angular-smith-chartAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 166 |
|---|---|
| Last updated | August 4, 2026 |
| Repository | syncfusion/angular-ui-components-skills ↗ |
What it does
Use syncfusion-angular-smith-chart for development tasks
Files
Implementing Syncfusion Angular Smith Chart Component
When to Use This Skill
Use this skill when you need to:
- Visualize transmission lines - Plot impedance or admittance parameters on smith charts for circuit analysis
- Create smith charts - Render smith chart components with proper configuration and data binding
- Add multiple series - Display multiple transmission line series on a single chart
- Customize axes - Configure horizontal and radial axes with custom labels, gridlines, and styling
- Highlight data points - Add markers and data labels to emphasize key values
- Display legends - Implement legends with positioning, alignment, and visibility toggling
- Enable interactivity - Add tooltips, print functionality, and event handling
- Style and theme - Apply Syncfusion themes, custom colors, and responsive sizing
- Ensure accessibility - Support WCAG compliance, keyboard navigation, and RTL layouts
Component Overview
The Syncfusion Angular Smith Chart is a specialized data visualization component for high-frequency circuit applications. It uses two sets of concentric circles (constant resistance and reactance) to plot transmission line parameters for impedance and admittance analysis.
Key Characteristics:
- Dual-axis system - Horizontal axis (straight line for resistance) and radial axis (circular path for reactance)
- Render Types - Support for both
Impedance(default) andAdmittanceparameters - Multi-series support - Display multiple transmission line series simultaneously with different colors and styles
- Data binding - Two methods:
pointsarray ordataSourcewithresistance/reactanceproperty mapping - Interactive elements - Markers, data labels, tooltips, legends with visibility toggle, and export functionality
- Customizable styling - Axis labels, major/minor gridlines, colors, themes (Material, Bootstrap, Tailwind), responsive sizing
- Accessibility features - WCAG compliance, keyboard navigation, RTL (right-to-left) support, screen reader compatibility
- Event-driven - Load events, series rendering, legend interactions, and tooltip customization
- Export capabilities - PNG, JPEG, SVG formats for reporting and documentation
Documentation and Navigation Guide
This skill guides you through implementing smith charts. Here are the key topics:
Getting Started
📄 Read: references/getting-started.md
- Installation and package setup for Angular 19+
- Basic smith chart component implementation
- Module injection requirements
- Data binding with resistance and rectangle values
- CSS imports and theming
- When to read: Before implementing your first smith chart
Series and Data Management
📄 Read: references/series-and-data.md
- Understanding series concepts and data structure
- Points vs dataSource for data input
- Impedance and Admittance render types
- Series customization (fill, opacity, width, visibility)
- Multiple series examples and patterns
- Smart labels and overlapping prevention
- When to read: Bind data and configure multiple series
Axis Customization
📄 Read: references/axis-customization.md
- Horizontal and radial axis configuration
- Axis labels (positioning, intersection handling, styling)
- Major and minor gridlines (visibility, width, dash patterns, opacity)
- Axis line customization
- Label and value formatting
- When to read: Customize axis appearance and behavior
Markers and Data Labels
📄 Read: references/markers-and-labels.md
- Marker configuration and visibility
- Data label display and formatting
- Positioning markers and labels without overlap
- Custom label content (resistance, reactance values)
- Formatting numeric values
- When to read: Highlight specific data points or show detailed values
Legend and Interaction
📄 Read: references/legend-and-interaction.md
- Legend visibility and positioning (top, bottom, left, right, custom)
- Legend alignment and placement
- Legend shape customization (circle, rectangle, triangle)
- Legend sizing and responsiveness
- Series visibility toggle with legend clicks
- When to read: Add and configure legends for series identification
Advanced Features
📄 Read: references/advanced-features.md
- Tooltip configuration and formatting
- Print and export functionality
- RTL (Right-to-Left) support
- Theming and CSS customization
- Container sizing and responsive behavior
- WCAG accessibility compliance
- Keyboard navigation
- Event handling (click, hover, legend toggle)
- When to read: Implement complex features like tooltips, export, events, or accessibility
Troubleshooting
📄 Read: references/troubleshooting.md
- Common implementation issues and solutions
- Data format validation and errors
- Module import troubleshooting
- Performance optimization tips
- Chart rendering and display issues
- When to read: Debug issues or optimize chart performance
Quick Start Example
Here's a minimal example to render a basic smith chart:
import { SmithchartModule } from '@syncfusion/ej2-angular-charts'
import { Component } from '@angular/core';
@Component({
imports: [SmithchartModule],
standalone: true,
selector: 'app-container',
template: `<ejs-smithchart
id='smithchart-container'
[series]="series">
</ejs-smithchart>`
})
export class AppComponent {
series = [{
points: [
{ resistance: 10, reactance: 10 },
{ resistance: 20, reactance: 15 },
{ resistance: 30, reactance: 5 },
{ resistance: 40, reactance: -5 },
{ resistance: 50, reactance: -15 }
]
}]
}Output: A basic smith chart with one series showing transmission line impedance values.
Common Patterns
Pattern 1: Multi-Series Transmission Line Comparison
Display multiple transmission line series with different colors for impedance comparison:
series = [
{
name: 'Transmission Line A',
points: [
{ resistance: 0.2, reactance: 0.1 },
{ resistance: 0.5, reactance: 0.3 },
{ resistance: 1.0, reactance: 0.5 }
],
fill: '#0066CC',
marker: { visible: true },
tooltip: { visible: true }
},
{
name: 'Transmission Line B',
points: [
{ resistance: 0.3, reactance: 0.15 },
{ resistance: 0.6, reactance: 0.4 },
{ resistance: 1.2, reactance: 0.6 }
],
fill: '#FF6633',
marker: { visible: true },
tooltip: { visible: true }
}
]Pattern 2: Interactive Tooltips, Legends, and Markers
Enable legends for series identification, tooltips for detailed values, and markers to highlight data points:
@Component({
template: `
<ejs-smithchart [series]="series" [legendSettings]="legendSettings">
</ejs-smithchart>
`
})
export class AppComponent {
series = [
{
name: 'Device A',
marker: {
visible: true,
shape: 'Circle',
width: 8,
height: 8,
dataLabel: { visible: true } // ✓ dataLabel INSIDE marker
},
tooltip: { visible: true, template: 'R:${resistance}+jX:${reactance}' },
points: [...]
}
];
legendSettings = {
visible: true,
position: 'Bottom',
alignment: 'Center'
};
}Pattern 3: Admittance Render Type with Axis Customization
Switch to Admittance rendering and customize axes with gridlines:
@Component({
template: `
<ejs-smithchart
renderType: 'Admittance'
[series]="series"
[horizontalAxis]="hAxis"
[radialAxis]="rAxis">
</ejs-smithchart>
`
})
export class AppComponent {
series = [
{
points: [...],
}
];
hAxis = {
labelPosition: 'Outside',
majorGridLines: { visible: true, width: 1, opacity: 0.8 },
minorGridLines: { visible: true, count: 4, opacity: 0.4 }
};
rAxis = {
majorGridLines: { visible: true, width: 1, opacity: 0.8 },
minorGridLines: { visible: true, count: 4, opacity: 0.4 }
};
}Pattern 4: Data-Driven Series from External Source
Bind series data from an array using dataSource property:
series = [
{
name: 'Test Results',
dataSource: [
{ impedance: 50, phase: 0 }, // Will be mapped to resistance/reactance
{ impedance: 75, phase: 15 },
{ impedance: 100, phase: 30 }
],
resistance: 'impedance',
reactance: 'phase'
}
];Pattern 5: Export and Print Integration
Enable export and print functionality for documentation:
@Component({
template: `
<div>
<button (click)="exportChart('PNG')">Export PNG</button>
<button (click)="exportChart('SVG')">Export SVG</button>
<button (click)="printChart()">Print</button>
</div>
<ejs-smithchart #smithchart [series]="series"></ejs-smithchart>
`
})
export class AppComponent {
@ViewChild('smithchart') smithchart!: any;
exportChart(format: string) {
this.smithchart.export(format, 'smith-chart-export');
}
printChart() {
this.smithchart.print();
}
}
## Import Best Practices
### ✅ Minimal Imports (Most Cases)
For basic smith charts without advanced features, import only what you need:
import { SmithchartModule } from '@syncfusion/ej2-angular-charts' import { Component, ViewEncapsulation } from '@angular/core'
@Component({ imports: [SmithchartModule], // ✓ Only SmithchartModule needed standalone: true, encapsulation: ViewEncapsulation.None, template: <ejs-smithchart [series]="series"></ejs-smithchart> }) export class AppComponent { series = [{ points: [...] }] }
### ❌ Don't Import Unnecessary Modules
Avoid importing modules/services you're not using:
// ✗ WRONG - CommonModule not needed in standalone component import { CommonModule } from '@angular/common' @Component({ imports: [SmithchartModule, CommonModule], // CommonModule is unnecessary standalone: true })
// ✗ WRONG - SmithchartLegendService not needed without custom legend events import { SmithchartLegendService } from '@syncfusion/ej2-angular-charts' @Component({ providers: [SmithchartLegendService], // Only for custom legend click handling standalone: true }) export class AppComponent { legendSettings = { visible: true } // Basic legend doesn't need the service }
// ✗ WRONG - TooltipRenderService not needed without tooltips import { TooltipRenderService } from '@syncfusion/ej2-angular-charts' @Component({ providers: [TooltipRenderService], // Only needed if tooltip: { visible: true } standalone: true }) export class AppComponent { series = [{ points: [...] }] // No tooltip configuration }
### ✅ Add Services Only When Needed
| Use Case | Service | Import |
|----------|---------|--------|
| Basic chart | None | Only `SmithchartModule` |
| With tooltips | `TooltipRenderService` | Add when using `tooltip: { visible: true }` |
| Advanced legend clicks | `SmithchartLegendService` | Add when handling legend interaction events |
**Example: Tooltips Only When Used**import { SmithchartModule, TooltipRenderService } from '@syncfusion/ej2-angular-charts'
@Component({ imports: [SmithchartModule], providers: [TooltipRenderService], // ✓ Add only if using tooltips standalone: true }) export class AppComponent { series = [{ points: [ { resistance: 0.2, reactance: 0.1 }, { resistance: 0.4, reactance: 0.3 } ], tooltip: { visible: true } // ✓ Tooltips are configured }] }
## Key Configuration Properties
| Property | Type | Default | Purpose |
|----------|------|---------|---------|
| `series` | Array | `[]` | Array of series with points data for visualization |
| `points` | Array | - | Data array for a series (resistance, reactance pairs) |
| `dataSource` | Array | - | Bind data from external source or data array |
| `resistance` | string | - | Property name for X-axis value (resistance) from dataSource |
| `reactance` | string | - | Property name for Y-axis value (reactance) from dataSource |
| `name` | string | - | Series name for legend display |
| `renderType` | string | `'Impedance'` | Render type: `'Impedance'` or `'Admittance'` |
| `fill` | string | - | Series line color (hex or named color) |
| `width` | number | 2 | Series line width in pixels |
| `opacity` | number | 1 | Series line opacity (0-1) |
| `marker` | object | - | Marker configuration (visible, shape, size) |
| `dataLabel` | object | - | Data label configuration (visible, format) |
| `tooltip` | object | - | Tooltip configuration (visible, format, template) |
| `title` | object | - | Title configuration (text, visible, styling) |
| `height` | string/number | '400px' | Chart height (px or percentage) |
| `width` | string/number | '100%' | Chart width (px or percentage) |
| `theme` | string | `'Material'` | Built-in theme (Material, Bootstrap, Tailwind, etc.) |
| `legendSettings` | object | - | Legend configuration (visible, position, alignment) |
| `horizontalAxis` | object | - | Horizontal axis customization and labels |
| `radialAxis` | object | - | Radial axis customization and gridlines |
| `enableRtl` | boolean | `false` | Enable right-to-left text direction support |
| `ariaLabel` | string | - | Accessibility label for screen readers |
## Common Use Cases
1. **Circuit Analysis & Impedance Matching** - Visualize impedance matching and transmission line characteristics for high-frequency circuits
2. **Network & Filter Tuning** - Display multiple filter responses and network parameters for comparison and optimization
3. **Antenna Design & Optimization** - Plot impedance curves for antenna tuning, SWR analysis, and frequency response visualization
4. **RF Engineering** - Analyze reflection coefficients, standing wave patterns, and transmission line properties
5. **Microwave Engineering** - Design and analyze transmission lines, waveguides, and microwave components
6. **Educational Content** - Teach high-frequency circuit concepts with interactive charts and real-time parameter visualization
7. **Performance Dashboards** - Monitor multiple transmission line metrics and network parameters in real-time
8. **Device Testing & Validation** - Compare measured vs. simulated impedance data for device characterization
9. **Quality Control** - Visualize production test results for electronic components on smith charts
10. **Signal Integrity Analysis** - Analyze termination impedance and signal reflection for PCB design verification
---
## API Reference
A complete API reference for the Syncfusion Angular `Smithchart` is available in the `references` folder. It includes property anchors, method links, and event argument types that map to the official docs.
Read the API reference: [references/api-reference.md](references/api-reference.md)
**Next Steps:** Start with [getting-started.md](references/getting-started.md) to install and render your first smith chart, then explore other reference guides based on your needs.
Advanced Features
Table of Contents
- Tooltips
- Enable Tooltips
- Tooltip Formatting
- Tooltip Styling
- Custom Tooltip Template
- Print and Export
- Print Functionality
- Image Export
- Exporting SVG
- RTL Support
- Enable Right-to-Left Layout
- RTL Considerations
- CSS for RTL
- Component-Level Styling
- Responsive Sizing
- Percentage-Based Sizing
- Container Sizing
- Responsive with Media Queries
- Accessibility
- WCAG Compliance
- Keyboard Navigation
- ARIA Attributes
- Screen Reader Support
- Font and Color Contrast
- Event Handling
- Tooltip Events
- Series Events
- Legend Events
- Load Event
- Complete Advanced Example
Tooltips
Tooltips display detailed information when hovering over data points.
Enable Tooltips
import { Component } from '@angular/core';
import { SmithchartModule, TooltipRenderService } from '@syncfusion/ej2-angular-charts'
@Component({
imports: [SmithchartModule],
providers: [TooltipRenderService],
standalone: true,
template : `
<ejs-smithchart
[series]="series"
style="display:block;height:350px">
</ejs-smithchart> `
})
export class AppComponent {
series = [
{
marker: { visible: true }, // ✅ required for tooltip
tooltip: { visible: true }, // ✅ tooltip enabled per series
points: [
{ resistance: 0.4, reactance: 0.2 }
]
}
];
}Required: Inject TooltipRenderService in providers.
Tooltip Formatting
Customize tooltip content:
tooltip = {
visible: true,
template: '<div style="color: red; border: 1px solid #000; padding: 4px; border-radius: 3px;">Value: ${resistance} - ${reactance}</div>'
}Template tokens:
${resistance}- X-axis value${reactance}- Y-axis value
Example Template:
template: '<div>Resistance: ${resistance}<br>Reactance: ${reactance}</div>'Tooltip Styling
tooltip = {
visible: true,
fill: '#FFFFCC',
border: {
color: '#FF6633',
width: 1
}
}Custom Tooltip Template
Create custom tooltip HTML:
export class AppComponent {
tooltip = {
visible: true,
template: '<div>${resistance} + j${reactance}</div>'
}
}Print and Export
Print Functionality
import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
import { SmithchartModule } from '@syncfusion/ej2-angular-charts';
@Component({
standalone: true,
selector: 'app-container',
imports: [SmithchartModule],
encapsulation: ViewEncapsulation.None,
template: `
<button (click)="print()">Print Smith Chart</button>
<ejs-smithchart
#smithchart
style="display:block;height:400px">
</ejs-smithchart>
`
})
export class AppComponent {
@ViewChild('smithchart')
public smithchart!: any;
print(): void {
this.smithchart.print();
}
}Image Export
import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
import { SmithchartModule } from '@syncfusion/ej2-angular-charts';
@Component({
standalone: true,
selector: 'app-container',
imports: [SmithchartModule],
encapsulation: ViewEncapsulation.None,
template: `
<button (click)="exportAsImage()">Export as PNG</button>
<ejs-smithchart
#smithchart
style="display:block;height:400px">
</ejs-smithchart>
`
})
export class AppComponent {
@ViewChild('smithchart')
public smithchart!: any;
exportAsImage(): void {
this.smithchart.export('PNG', 'smith-chart');
}
}Supported formats:
'PNG'- Portable Network Graphics'JPEG'- Joint Photographic Experts Group'SVG'- Scalable Vector Graphics
Exporting SVG
exportAsSVG() {
this.smithchart.export('SVG', 'smith-chart')
}SVG format is ideal for:
- Embedding in web applications
- Editing in design software
- Scalable without quality loss
RTL Support
Enable Right-to-Left Layout
@Component({
standalone: true,
selector: 'app-container',
imports: [SmithchartModule],
encapsulation: ViewEncapsulation.None,
template: `
<ejs-smithchart
dir="rtl"
[legendSettings]="legendSettings">
</ejs-smithchart>
`
})
export class AppComponent {
legendSettings = {
visible: true,
position: 'Left' // Legend on left in RTL
}
}RTL Considerations
- Legend position - Adjust for RTL layout
- Label alignment - Text alignment adjusts automatically
- Axis labels - Rendered appropriately for RTL
CSS for RTL
[dir="rtl"] ejs-smithchart {
direction: rtl;
text-align: right;
}Component-Level Styling
@Component({
styles: [`
:host ::ng-deep ejs-smithchart {
background-color: #F5F5F5;
}
:host ::ng-deep .e-smithchart-legend {
background-color: #FFFFFF;
border: 1px solid #CCCCCC;
}
`]
})
export class AppComponent { }Responsive Sizing
Percentage-Based Sizing
@Component({
template : `
<ejs-smithchart
width="100%"
height="500px">
</ejs-smithchart>
`
})
export class AppComponent {
}Container Sizing
<div style="width: 600px; height: 500px;">
<ejs-smithchart style="width: 100%; height: 100%;"></ejs-smithchart>
</div>Responsive with Media Queries
@Component({
styles: [`
:host {
display: block;
}
@media (max-width: 768px) {
ejs-smithchart {
height: 300px !important;
}
}
@media (min-width: 1200px) {
ejs-smithchart {
height: 600px !important;
}
}
`]
})
export class AppComponent { }Accessibility
The Syncfusion Smith Chart is built with accessibility in mind, supporting WCAG 2.1 Level AA standards.
WCAG Compliance
Key accessibility features:
- Semantic HTML - Proper heading hierarchy and document structure
- Color contrast - Meets WCAG AA minimum ratios (4.5:1 for text)
- Keyboard navigation - All interactive elements accessible via keyboard
- Screen reader support - Proper ARIA labels and roles
- Focus management - Clear visual focus indicators
- Responsive design - Works well on all device sizes
Recommended themes for accessibility:
HighContrast- Best for visually impaired usersBootstrap5- Good contrast ratiosMaterial3- Modern and accessible
Keyboard Navigation
Navigate chart elements using keyboard:
import { Component, ViewEncapsulation } from '@angular/core';
import { SmithchartModule } from '@syncfusion/ej2-angular-charts';
@Component({
standalone: true,
selector: 'app-root',
imports: [SmithchartModule],
encapsulation: ViewEncapsulation.None,
template: `
<ejs-smithchart
tabindex="0"
role="img"
aria-label="Transmission line Smith chart showing impedance analysis"
(keydown)="onKeyDown($event)"
style="display:block; height:350px">
</ejs-smithchart>
`
})
export class AppComponent {
onKeyDown(event: KeyboardEvent) {
switch(event.key) {
case 'Escape':
console.log('Chart focus cleared');
break;
case 'Enter':
console.log('Chart activated');
break;
}
}
}Supported keyboard shortcuts:
Tab- Navigate to next elementShift + Tab- Navigate to previous elementEnter- Activate/select elementEscape- Clear focus/exit interactionArrow keys- Navigate within data points (when applicable)
ARIA Attributes
import { Component, ViewEncapsulation } from '@angular/core';
import { SmithchartModule } from '@syncfusion/ej2-angular-charts';
@Component({
standalone: true,
selector: 'app-root',
imports: [SmithchartModule],
encapsulation: ViewEncapsulation.None,
template: `
<div>
<h2 id="chart-title">Device Impedance Analysis</h2>
<p id="chart-description">
This chart displays transmission line impedance measurements for three devices: Device A, Device B, and Device C.
Each line shows resistance (horizontal axis) vs reactance (vertical axis).
</p>
<ejs-smithchart
role="img"
[ariaLabel]="'Smith chart: Device impedance analysis showing three transmission lines'"
aria-describedby="chart-description"
style="display:block; height:400px">
<e-seriesCollection>
<e-series name="Device A" [points]="deviceA"></e-series>
<e-series name="Device B" [points]="deviceB"></e-series>
<e-series name="Device C" [points]="deviceC"></e-series>
</e-seriesCollection>
</ejs-smithchart>
<!-- Data Table Alternative for Screen Readers -->
<details>
<summary>View impedance data in table format</summary>
<table>
<thead>
<tr>
<th>Device</th>
<th>Resistance</th>
<th>Reactance</th>
</tr>
</thead>
<tbody>
<tr><td>Device A</td><td>0.2</td><td>0.1</td></tr>
<tr><td>Device B</td><td>0.3</td><td>0.15</td></tr>
</tbody>
</table>
</details>
</div>
`
})
export class AppComponent {
deviceA = [{ resistance: 0.2, reactance: 0.1 }];
deviceB = [{ resistance: 0.3, reactance: 0.15 }];
deviceC = [{ resistance: 0.4, reactance: 0.2 }];
}Screen Reader Support
Best practices for screen reader users:
1. Always provide title and description:
ariaLabel: 'Smith chart showing impedance data for three transmission lines'
aria-describedby: 'chart-description'2. Include series names:
series = [
{ name: 'Device A' }, // Will be announced
{ name: 'Device B' }
];3. Enable tooltips for detailed values:
tooltip = {
visible: true,
template: 'Device: ${name}, R: ${resistance}, X: ${reactance}'
}4. Provide data table alternative:
- Use
<details>/<summary>to hide table by default - Makes all data available to screen readers
- Improves SEO
5. Legends with keyboard focus:
legendSettings = {
visible: true,
tabindex: 0 // Makes legend keyboard accessible
}Font and Color Contrast
Ensure readable text across all users:
@Component({
styles: [`
:host ::ng-deep .e-smithchart-title {
font-size: 18px !important; /* Minimum 16px for accessibility */
font-weight: 600 !important;
fill: #000000 !important; /* High contrast */
}
:host ::ng-deep .e-smithchart-legend {
font-size: 14px !important; /* Readable size */
fill: #333333 !important; /* Dark color */
}
`]
})
export class AppComponent {
tooltip = {
fill: '#FFFFFF', // Light background
textStyle: {
color: '#000000' // Dark text on light background
}
};
// Use HighContrast theme for visually impaired users
theme = 'HighContrast';
}Color contrast guidelines:
- Text on background: Minimum 4.5:1 ratio
- UI components: Minimum 3:1 ratio
- Focus indicators: Clear and visible (minimum 2px border)
Event Handling
Tooltip Events
import { Component, ViewEncapsulation } from '@angular/core';
import {
SmithchartModule,
TooltipRenderService
} from '@syncfusion/ej2-angular-charts';
@Component({
standalone: true,
selector: 'app-root',
imports: [SmithchartModule],
providers: [TooltipRenderService],
encapsulation: ViewEncapsulation.None,
template: `
<ejs-smithchart
[series]="series"
(tooltipRender)="onTooltipRender($event)"
style="display:block;height:350px">
</ejs-smithchart>
`
})
export class AppComponent {
series = [
{
marker: { visible: true }, // ✅ required for tooltip hover
tooltip: { visible: true }, // ✅ enable tooltip per series
points: [
{ resistance: 0.4, reactance: 0.2 }
]
}
];
onTooltipRender(args: any): void {
console.log('Tooltip displaying for:', args);
}
}Series Events
import { Component, ViewEncapsulation } from '@angular/core';
import {
SmithchartModule
} from '@syncfusion/ej2-angular-charts';
@Component({
standalone: true,
selector: 'app-root',
imports: [SmithchartModule],
encapsulation: ViewEncapsulation.None,
template: `
<ejs-smithchart
[series]="series"
(seriesRender)="onSeriesRender($event)"
style="display:block;height:350px">
</ejs-smithchart>
`
})
export class AppComponent {
series = [
{
name: 'Device A',
marker: { visible: true },
points: [
{ resistance: 0.4, reactance: 0.2 },
{ resistance: 0.6, reactance: 0.4 }
]
}
];
onSeriesRender(args: any): void {
console.log('Series rendering:', args.text);
}
}Legend Events
import { Component, ViewEncapsulation } from '@angular/core';
import {
SmithchartModule,
SmithchartLegendService
} from '@syncfusion/ej2-angular-charts';
@Component({
standalone: true,
selector: 'app-root',
imports: [SmithchartModule],
providers: [SmithchartLegendService],
encapsulation: ViewEncapsulation.None,
template: `
<ejs-smithchart
[series]="series"
[legendSettings]="legendSettings"
(legendRender)="onLegendRender($event)"
style="display:block;height:350px">
</ejs-smithchart>
`
})
export class AppComponent {
legendSettings = { visible: true };
series = [
{
name: 'Device A',
marker: { visible: true },
points: [{ resistance: 0.4, reactance: 0.2 }]
}
];
onLegendRender(args: any): void {
console.log('Legend rendering:', args.text);
}
}Load Event
Execute code when chart is fully loaded:
import { Component, ViewEncapsulation } from '@angular/core';
import { SmithchartModule } from '@syncfusion/ej2-angular-charts';
@Component({
standalone: true,
selector: 'app-root',
imports: [SmithchartModule],
encapsulation: ViewEncapsulation.None,
template: `
<ejs-smithchart
[series]="series"
(load)="onChartLoad($event)"
style="display:block;height:350px">
</ejs-smithchart>
`
})
export class AppComponent {
series = [
{
name: 'Device A',
marker: { visible: true },
points: [
{ resistance: 0.4, reactance: 0.2 }
]
}
];
onChartLoad(args: any): void {
console.log('SmithChart load event triggered');
}
}Complete Advanced Example
import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
import {
SmithchartModule,
TooltipRenderService,
SmithchartLegendService,
} from '@syncfusion/ej2-angular-charts';
@Component({
standalone: true,
selector: 'app-container',
imports: [SmithchartModule],
providers: [
TooltipRenderService,
SmithchartLegendService
],
encapsulation: ViewEncapsulation.None,
template: `
<div class="controls">
<button (click)="print()">Print</button>
<button (click)="exportAsImage()">Export PNG</button>
<label>
<input type="checkbox" (change)="toggleRTL()"> RTL Mode
</label>
</div>
<ejs-smithchart
#smithchart
id="container"
[series]="series"
[legendSettings]="legendSettings"
(tooltipRender)="onTooltipRender($event)"
style="display:block;height:350px">
</ejs-smithchart>
`,
styles: [`
.controls {
margin-bottom: 20px;
}
button, label {
margin-right: 10px;
}
`]
})
export class AppComponent {
@ViewChild('smithchart')
public smithchart!: any;
rtlMode = false;
series = [
{
name: 'Device A',
fill: '#0066CC',
marker: { visible: true },
tooltip: { visible: true },
points: [
{ resistance: 0.4, reactance: 0.2 },
{ resistance: 0.6, reactance: 0.4 }
]
}
];
legendSettings = {
visible: true,
position: 'Bottom'
};
print(): void {
this.smithchart.print();
}
exportAsImage(): void {
this.smithchart.export('PNG', 'smith-chart');
}
toggleRTL(): void {
this.rtlMode = !this.rtlMode;
this.legendSettings = {
...this.legendSettings,
position: this.rtlMode ? 'Left' : 'Bottom'
};
}
onTooltipRender(args: any): void {
console.log('Tooltip:', args);
}
}Responsive Design
Create responsive smith charts that adapt to mobile, tablet, and desktop devices.
Mobile-Optimized Layout
``` typescript import { Component } from '@angular/core'; import { CommonModule } from '@angular/common'; import { SmithchartModule } from '@syncfusion/ej2-angular-charts'; import { Browser } from '@syncfusion/ej2-base';
@Component({ standalone: true, imports: [CommonModule, SmithchartModule], template: <ejs-smithchart [width]="chartWidth" [height]="chartHeight" [series]="series" [legendSettings]="legendSettings"> </ejs-smithchart> }) export class AppComponent { series = [{ name: 'Device A', points: [...] }];
get chartWidth(): string { return Browser.isDevice ? '100%' : '800px'; }
get chartHeight(): string { return Browser.isDevice ? '300px' : '500px'; }
get legendSettings() { return { visible: true, position: Browser.isDevice ? 'Bottom' : 'Right' }; } }
## Performance Optimization
Optimize charts for better performance with large datasets.
### Large Dataset Pagination
@Component({ template: <button (click)="loadMore()" [disabled]="loadedCount >= totalSeries"> Load More ({{ loadedCount }}/{{ totalSeries }}) </button> <ejs-smithchart [series]="displayedSeries" style="display:block; height:500px"> </ejs-smithchart>
}) export class AppComponent { displayedSeries: any[] = []; loadedCount = 0; totalSeries = 100; seriesPerPage = 10;
loadMore() { const startIndex = this.loadedCount; const endIndex = Math.min(startIndex + this.seriesPerPage, this.totalSeries);
for (let i = startIndex; i < endIndex; i++) { this.displayedSeries.push({ name: Device, points: Array.from({ length: 10 }, (_, j) => ({ resistance: Math.random() 2, reactance: Math.random() 2 })) }); }
this.loadedCount = endIndex; } }
## Best Practices Summary
| Category | Best Practice | Benefit |
|----------|---------------|---------|
| **Performance** | Use pagination for large datasets | Faster initial load and better memory usage |
| **Accessibility** | Provide ARIA labels and descriptions | Screen reader compatibility and WCAG compliance |
| **Responsive** | Use \Browser.isDevice\ detection | Optimized experience per device type |
| **UX** | Enable tooltips with templates | Contextual information on hover |
| **Export** | Use SVG format | Scalable and editable outputs |
Smith Chart API Reference (Syncfusion Angular)
Table of Contents
Concise reference for the Smithchart Angular component. Links point to the official API anchors for detailed types and event argument definitions.
Official docs
- Index: https://ej2.syncfusion.com/angular/documentation/api/smithchart/index-default
Component import
import { SmithchartModule, SmithchartLegendService, TooltipRenderService } from '@syncfusion/ej2-angular-charts';Tag
<ejs-smithchart>
Selected Properties (with official anchors)
series: SmithchartSeriesModel[]— Series collection. See: https://ej2.syncfusion.com/angular/documentation/api/smithchart/smithchartseriesmodelrenderType?: RenderType—Impedance | Admittance. See: https://ej2.syncfusion.com/angular/documentation/api/smithchart/rendertypehorizontalAxis?: SmithchartAxisModel— Horizontal axis settings. See: https://ej2.syncfusion.com/angular/documentation/api/smithchart/smithchartaxismodelradialAxis?: SmithchartAxisModel— Radial axis settings. See: https://ej2.syncfusion.com/angular/documentation/api/smithchart/smithchartaxismodellegendSettings?: SmithchartLegendSettingsModel— Legend options. See: https://ej2.syncfusion.com/angular/documentation/api/smithchart/smithchartlegendsettingsmodeltitle?: TitleModel— Title config. See: https://ej2.syncfusion.com/angular/documentation/api/smithchart/titlemodeltooltip?: SmithChartTooltipSettingsModel— Tooltip settings. See: https://ej2.syncfusion.com/angular/documentation/api/smithchart/ismithcharttooltipeventargstheme?: SmithchartTheme— Theme selection. See: https://ej2.syncfusion.com/angular/documentation/api/smithchart/smithchartthemebackground?: string— Background colorborder?: SmithchartBorderModel— Border config. See: https://ej2.syncfusion.com/angular/documentation/api/smithchart/smithchartbordermodelfont?: SmithchartFontModel— Font styles. See: https://ej2.syncfusion.com/angular/documentation/api/smithchart/smithchartfontmodelwidth?: string— Width in px or%height?: string— Height in px or%
Methods (anchors)
destroy(): void— Destroy component. https://ej2.syncfusion.com/angular/documentation/api/smithchart/index-default#destroyexport(type: SmithchartExportType, fileName?: string, orientation?: PdfPageOrientation): void— Export. https://ej2.syncfusion.com/angular/documentation/api/smithchart/index-default#exportgetModuleName(): string— https://ej2.syncfusion.com/angular/documentation/api/smithchart/index-default#getmodulenamesmithchartOnClick(e: PointerEvent): void— Click handler. https://ej2.syncfusion.com/angular/documentation/api/smithchart/index-default#smithchartonclicksmithchartOnResize(): boolean— Resize handler. https://ej2.syncfusion.com/angular/documentation/api/smithchart/index-default#smithchartonresize
Events (selected with arg types)
animationComplete— ISmithchartAnimationCompleteEventArgsaxisLabelRender— ISmithchartAxisLabelRenderEventArgsbeforePrint— ISmithchartPrintEventArgslegendRender— ISmithchartLegendRenderEventArgsload/loaded— ISmithchartLoadEventArgs / ISmithchartLoadedEventArgsseriesRender— ISmithchartSeriesRenderEventArgstextRender— ISmithchartTextRenderEventArgstitleRender— ITitleRenderEventArgstooltipRender— ISmithChartTooltipEventArgs
Example (Angular standalone)
import { Component, ViewEncapsulation } from '@angular/core';
import {
SmithchartModule,
TooltipRenderService
} from '@syncfusion/ej2-angular-charts';
@Component({
standalone: true,
selector: 'app-container',
imports: [SmithchartModule],
providers: [TooltipRenderService],
encapsulation: ViewEncapsulation.None,
template: `
<ejs-smithchart
[series]="series"
(tooltipRender)="onTooltip($event)"
style="display:block;height:350px">
</ejs-smithchart>
`
})
export class ExampleComponent {
series = [
{
marker: { visible: true },
tooltip: { visible: true },
points: [
{ resistance: 0.4, reactance: 0.2 }
]
}
];
onTooltip(args: any): void {
console.log(args);
}
}Axis Customization
Table of Contents
- Axis Overview
- Horizontal Axis
- Radial Axis
- Axis Labels
- Label Positioning
- Label Intersection Handling
- Label Styling
- Gridlines
- Major Gridlines
- Minor Gridlines
- Common Gridline Patterns
- Axis Lines
- Complete Axis Configuration
- Example: Professional Appearance
- Example: Minimal Gridlines
- Example: Dense Information Display
- Best Practices
- For Circuit Analysis
- For Educational Displays
- For Print/Export
- For Web Display
- Common Issues
Axis Overview
The Smith Chart has two types of axes:
Horizontal Axis
- Drawn as a straight line horizontally
- Represents resistance values
- Labeled with numeric values
- Customizable labels, gridlines, styling
Radial Axis
- Drawn as a circular path
- Represents reactance values
- Concentric circles from center
- Customizable labels, gridlines, styling
Both axes work together to create the characteristic grid pattern of the smith chart.
Axis Labels
Label Positioning
Control where labels appear relative to the axis line:
@Component({
imports: [ SmithchartModule ],
selector: 'app-container',
standalone: true,
template: `
<ejs-smithchart
[horizontalAxis]="horizontalAxis"
[radialAxis]="radialAxis">
</ejs-smithchart>
`
})
export class AppComponent {
horizontalAxis = {
labelPosition: 'Outside' // Outside (default) or Inside
}
radialAxis = {
labelPosition: 'Inside'
}
}Options:
'Outside'- Labels appear outside the axis line'Inside'- Labels appear inside the axis line
Label Intersection Handling
Prevent label overlap by controlling intersection behavior:
horizontalAxis = {
labelIntersectAction: 'Hide' // Hide labels that overlap
}Options:
'Hide'- Hide labels that would overlap (default)'None'- Show all labels (may overlap)
Label Styling
Customize label appearance:
horizontalAxis = {
labelStyle: {
color: '#333333',
fontFamily: 'Arial',
size: '12px',
fontWeight: 'Bold',
opacity: 0.8
}
}
radialAxis = {
labelStyle: {
color: '#666666',
fontFamily: 'Courier New',
size: '11px'
}
}Available properties:
color- Label text color (hex or named)fontFamily- Font namefontSize- Label size (px, em, etc.)fontWeight- Normal, Bold, BolderfontStyle- font style for textopacity- Transparency (0-1)
Gridlines
Major Gridlines
Lines drawn from label positions:
horizontalAxis = {
majorGridLines: {
visible: true,
width: 1,
dashArray: '0', // '0' = solid, '5,5' = dashed
opacity: 0.8,
color: '#CCCCCC'
}
}
radialAxis = {
majorGridLines: {
visible: true,
width: 1,
color: '#DDDDDD'
}
}Properties:
visible- Show/hide gridlines (default: true)width- Line width in pixels (default: 1)dashArray- Line pattern (solid or dashed)opacity- Transparency 0-1 (default: 1)color- Line color
Minor Gridlines
Secondary gridlines between major gridlines:
radialAxis = {
minorGridLines: {
visible: true,
count: 4, // Minor lines between major lines
width: 0.5,
dashArray: '3,3', // Dashed line pattern
opacity: 0.4,
color: '#EEEEEE'
}
}
horizontalAxis = {
minorGridLines: {
visible: false // Optional for horizontal
}
}Properties:
visible- Enable minor gridlinescount- Number of minor lines between major lines (default: 1)width- Line width in pixelsdashArray- Line patternopacity- Transparencycolor- Line color
Common Gridline Patterns
Solid Lines:
{ dashArray: '0' }Dashed Lines (Medium):
{ dashArray: '5,5' }Dashed Lines (Small):
{ dashArray: '3,3' }Dotted Lines:
{ dashArray: '1,3' }Axis Lines
Customize the axis line itself:
horizontalAxis = {
axisLine: {
visible: true,
width: 1,
dashArray: '0',
color: '#000000'
}
}
radialAxis = {
axisLine: {
visible: true,
width: 2,
color: '#333333'
}
}Properties:
visible- Show/hide the axis linewidth- Line width in pixelsdashArray- Line pattern (solid or dashed)color- Line color
Complete Axis Configuration
Example: Professional Appearance
import { Component, ViewEncapsulation } from '@angular/core';
import { SmithchartModule } from '@syncfusion/ej2-angular-charts';
@Component({
standalone: true,
selector: 'app-container',
imports: [SmithchartModule],
encapsulation: ViewEncapsulation.None,
template: `
<ejs-smithchart
[horizontalAxis]="horizontalAxis"
[radialAxis]="radialAxis">
</ejs-smithchart>
`
})
export class AppComponent {
horizontalAxis = {
labelPosition: 'Outside',
labelIntersectAction: 'Hide',
labelStyle: {
color: '#333333',
size: '12px'
},
majorGridLines: {
visible: true,
width: 1.5,
color: '#CCCCCC'
},
minorGridLines: {
visible: false
},
axisLine: {
visible: true,
width: 2
}
}
radialAxis = {
labelPosition: 'Outside',
labelIntersectAction: 'Hide',
labelStyle: {
color: '#333333',
size: '11px'
},
majorGridLines: {
visible: true,
width: 1,
color: '#DDDDDD'
},
minorGridLines: {
visible: true,
count: 5,
width: 0.5,
opacity: 0.5
},
axisLine: {
visible: true,
width: 1
}
}
}Example: Minimal Gridlines
export class AppComponent {
horizontalAxis = {
majorGridLines: {
visible: true,
width: 0.5,
opacity: 0.4
},
minorGridLines: { visible: false }
}
radialAxis = {
majorGridLines: {
visible: true,
width: 0.5
},
minorGridLines: { visible: false }
}
}Example: Dense Information Display
export class AppComponent {
horizontalAxis = {
majorGridLines: { visible: true, width: 1 },
minorGridLines: {
visible: true,
count: 4
}
}
radialAxis = {
majorGridLines: { visible: true, width: 1 },
minorGridLines: {
visible: true,
count: 4
}
}
}Best Practices
For Circuit Analysis
- Use major gridlines only for clarity
- Position labels outside for readability
For Educational Displays
- Show both major and minor gridlines
- Enable smart labels to prevent overlap
- Use higher opacity for visual hierarchy
For Print/Export
- Increase line widths (especially axis line)
- Use solid gridlines (avoid subtle dashing)
- Ensure sufficient contrast
For Web Display
- Use semi-transparent gridlines (opacity: 0.5-0.8)
- Show minor gridlines sparingly
- Consider responsive label sizing
Common Issues
Issue: Labels too dense or overlapping
- Solution: Set
labelIntersectAction: 'Hide'
Issue: Gridlines too faint
- Solution: Increase
widthproperty - Solution: Increase
opacityproperty
Issue: Gridlines too prominent
- Solution: Decrease
opacity - Solution: Use
dashArrayfor dashed appearance
Getting Started with Smith Chart
Table of Contents
- Installation
- Prerequisites
- Install the Smith Chart Package
- Basic Implementation
- Step 1: Import SmithchartModule
- Step 2: Add HTML Template
- Step 3: Run the Application
- Module Setup
- SmithchartModule
- Optional Services
- Data Binding
- Understanding Resistance and Reactance
- Basic Data Array
- Template Binding
- Using dataSource
- Complete Example
Installation
Prerequisites
Ensure your development environment meets the System Requirements for Syncfusion Angular UI Components.
Install the Smith Chart Package
Syncfusion's Angular component packages are available on npmjs.com. The Smith Chart component is part of the @syncfusion/ej2-angular-charts package.
Install the package using Angular CLI:
ng add @syncfusion/ej2-angular-chartsThis command performs the following:
- Adds
@syncfusion/ej2-angular-chartspackage topackage.json - Installs peer dependencies
- Updates your Angular configuration
For specific version installation:
npm add @syncfusion/ej2-angular-charts@32.1.19Basic Implementation
Step 1: Import SmithchartModule
In your component file (e.g., app.component.ts), import the SmithchartModule:
import { SmithchartModule } from '@syncfusion/ej2-angular-charts'
import { Component, ViewEncapsulation } from '@angular/core'
@Component({
imports: [SmithchartModule],
standalone: true,
selector: 'app-root',
template: `<ejs-smithchart style='display: block;' id='container'></ejs-smithchart>`,
encapsulation: ViewEncapsulation.None
})
export class AppComponent { }Step 2: Add HTML Template
Use the app-root in the index.html instead of default one.
<app-root></app-root>Step 3: Run the Application
Start your Angular development server:
npm startThe smith chart will render as a blank grid with horizontal and radial axes.
Module Setup
SmithchartModule
The SmithchartModule provides the core smith chart functionality. Import it in your standalone component:
import { SmithchartModule } from '@syncfusion/ej2-angular-charts'
@Component({
imports: [SmithchartModule],
standalone: true
})Optional Services
Services are only needed for specific advanced features. By default, SmithchartModule alone is sufficient for most implementations.
| Feature | Service | When Needed |
|---|---|---|
| Tooltips | TooltipRenderService | Only if using tooltip: { visible: true } in series configuration |
| Legend Interaction | SmithchartLegendService | Only if enabling legend clicks to toggle series visibility with custom events |
Example: Using TooltipRenderService Only When Needed
❌ Don't include if not using tooltips:
import { SmithchartModule, TooltipRenderService } from '@syncfusion/ej2-angular-charts'
@Component({
imports: [SmithchartModule],
providers: [TooltipRenderService], // ✗ Unnecessary if no tooltips
standalone: true
})
export class AppComponent {
series = [{ points: [...] }] // No tooltip configuration
}✅ Include only when using tooltips:
import { SmithchartModule, TooltipRenderService } from '@syncfusion/ej2-angular-charts'
@Component({
imports: [SmithchartModule],
providers: [TooltipRenderService], // ✓ Needed for tooltip rendering
standalone: true
})
export class AppComponent {
series = [{
points: [...],
tooltip: { visible: true } // ✓ Tooltip is configured
}]
}Example: Legend Service Only for Advanced Legend Features
import { SmithchartModule, SmithchartLegendService } from '@syncfusion/ej2-angular-charts'
@Component({
imports: [SmithchartModule],
providers: [SmithchartLegendService], // Only for custom legend event handling
standalone: true
})
export class AppComponent {
series = [{ name: 'Line A', points: [...] }]
legendSettings = { visible: true } // Basic legend - service still optional
}Data Binding
Understanding Resistance and Reactance
The Smith Chart uses two parameters:
- Resistance (R) - Real part of impedance (horizontal axis)
- Reactance (X) - Imaginary part of impedance (vertical axis)
Each data point represents a position on the smith chart corresponding to an impedance value.
Basic Data Array
Create a data array with resistance and reactance values:
export class AppComponent {
series = [{
points: [
{ resistance: 10, reactance: 10 },
{ resistance: 20, reactance: 15 },
{ resistance: 30, reactance: 5 },
{ resistance: 40, reactance: -5 },
{ resistance: 50, reactance: -15 }
]
}]
}Template Binding
Bind the series to the smith chart component:
<ejs-smithchart [series]="series"></ejs-smithchart>Using dataSource
Alternatively, use the dataSource property with property name mappings:
export class AppComponent {
data = [
{ r: 10, x: 10 },
{ r: 20, x: 15 },
{ r: 30, x: 5 }
]
series = [{
dataSource: this.data,
resistance: 'r',
reactance: 'x'
}]
}Complete Example
Here's a complete working example with tooltips enabled:
import { SmithchartModule, TooltipRenderService } from '@syncfusion/ej2-angular-charts';
import { Component, ViewEncapsulation } from '@angular/core';
@Component({
standalone: true,
selector: 'app-root',
imports: [SmithchartModule],
providers: [TooltipRenderService],
encapsulation: ViewEncapsulation.None,
template: `
<ejs-smithchart id="smithchart-container">
<e-seriesCollection>
<e-series
[points]="points"
[marker]="marker"
[tooltip]="tooltip">
</e-series>
</e-seriesCollection>
</ejs-smithchart>
`,
styles: [`
ejs-smithchart {
height: 400px;
width: 100%;
display: block;
}
`]
})
export class AppComponent {
points = [
{ resistance: 10, reactance: 25 },
{ resistance: 8, reactance: 6 },
{ resistance: 6, reactance: 4.5 },
{ resistance: 4.5, reactance: 2 },
{ resistance: 3.5, reactance: 1.6 },
{ resistance: 2.5, reactance: 1.3 },
{ resistance: 2, reactance: 1.2 },
{ resistance: 1.5, reactance: 1 },
{ resistance: 1, reactance: 0.8 },
{ resistance: 0.5, reactance: 0.4 },
{ resistance: 0.3, reactance: 0.2 },
{ resistance: 0, reactance: 0.15 }
];
marker = { visible: true };
tooltip = { visible: true };
}Legend and Interaction
Table of Contents
- Legend Overview
- Legend Purpose
- Enabling Legends
- Basic Legend Display
- Legend with Series Names
- Legend Positioning
- Position Property
- Top Position
- Right Position
- Custom Position
- Legend Alignment
- Alignment Property
- Examples
- Legend Customization
- Legend Shape
- Shape Examples
- Legend Size
- Legend Padding and Margin
- Legend Border
- Series Visibility Toggle
- Click to Toggle
- Control toggle visibility
- Programmatic Visibility Control
- Show/Hide All Series
- Common Patterns
- Pattern 1: Multi-Series with Legend
- Pattern 2: Right-Side Legend
- Pattern 3: Interactive Series Control
- Pattern 4: Legend with Custom Position
- Pattern 5: Impedance vs Admittance Display
- User Interaction Patterns
- Series Selection
- Troubleshooting
Legend Overview
A legend identifies series by displaying their names and visual indicators (shapes and colors). It helps users understand what each series represents in the smith chart.
Legend Purpose
- Series identification - Name and color mapping
- User interaction - Click to toggle series visibility
- Visual clarity - Distinguishes between multiple series
- Professional presentation - Required for multi-series charts
Enabling Legends
Basic Legend Display
Enable the legend with default settings:
import { Component, ViewEncapsulation } from '@angular/core';
import { SmithchartModule, SmithchartLegendService } from '@syncfusion/ej2-angular-charts';
@Component({
standalone: true,
selector: 'app-container',
imports: [SmithchartModule],
providers: [SmithchartLegendService],
encapsulation: ViewEncapsulation.None,
template: `
<ejs-smithchart [legendSettings]="legendSettings" id="container">
<e-seriesCollection>
<e-series [dataSource]='seriesdata1' name='Transmission1' reactance='reactance' resistance='resistance'> </e-series>
</e-seriesCollection>
</ejs-smithchart>
`
})
export class AppComponent {
legendSettings = {
visible: true
}
public seriesdata1: object[] = [
{ resistance: 10, reactance: 25 }, { resistance: 8, reactance: 6 },
{ resistance: 6, reactance: 4.5 }, { resistance: 4.5, reactance: 2 },
{ resistance: 3.5, reactance: 1.6 }, { resistance: 2.5, reactance: 1.3 },
{ resistance: 2, reactance: 1.2 }, { resistance: 1.5, reactance: 1 },
{ resistance: 1, reactance: 0.8 }, { resistance: 0.5, reactance: 0.4 },
{ resistance: 0.3, reactance: 0.2 }, { resistance: 0, reactance: 0.15 },
];
}Legend with Series Names
Each series must have a name property to appear in the legend:
export class AppComponent {
series = [
{
points: [...],
name: 'Device A'
},
{
points: [...],
name: 'Device B'
}
]
legendSettings = { visible: true }
}Legend Positioning
Position Property
Place the legend at different locations:
legendSettings = {
visible: true,
position: 'Bottom' // Default
}Available positions:
'Top'- Above the chart'Bottom'- Below the chart (default)'Left'- Left side of the chart'Right'- Right side of the chart'Custom'- Custom X/Y coordinates
Top Position
legendSettings = {
visible: true,
position: 'Top'
}Use case: Limited vertical space or wide charts
Right Position
legendSettings = {
visible: true,
position: 'Right'
}Use case: Preserve horizontal chart space
Custom Position
Place the legend anywhere on the chart:
legendSettings = {
visible: true,
position: 'Custom',
location: {
x: 200, // Pixels from left
y: 100 // Pixels from top
}
}Legend Alignment
Alignment Property
Control legend alignment within its position:
legendSettings = {
visible: true,
position: 'Top',
alignment: 'Center' // Default
}Available alignments:
'Near'- Align to start of position (top-left for top position)'Center'- Center within position (default)'Far'- Align to end of position (top-right for top position)
Examples
Near Alignment (Top-Left):
legendSettings = {
visible: true,
position: 'Top',
alignment: 'Near'
}Far Alignment (Bottom-Right):
legendSettings = {
visible: true,
position: 'Bottom',
alignment: 'Far'
}Legend Customization
Legend Shape
Change the visual indicator shape:
legendSettings = {
visible: true,
shape: 'Circle' // Default
}Available shapes:
'Circle'- Circle indicator (default)'Rectangle'- Square/rectangular indicator'Triangle'- Triangle indicator'Diamond'- Diamond indicator'Cross'- Cross indicator
Shape Examples
// Rectangular legend items
legendSettings = { shape: 'Rectangle' }
// Triangle indicators
legendSettings = { shape: 'Triangle' }
// Diamond indicators
legendSettings = { shape: 'Diamond' }Legend Size
Control legend dimensions:
legendSettings = {
visible: true,
width: 300, // Width (default: auto)
height: 50 // Height (default: auto)
}Sizing notes:
- Percentage-based sizing (e.g., '50%') supported
- 'auto' for automatic sizing
- Horizontal legend: width is primary constraint
- Vertical legend: height is primary constraint
Legend Padding and Margin
Control spacing around legend:
legendSettings = {
visible: true,
itemPadding: 5, // spacing between legend item
shapePadding: 10 // Padding between the legend shape and text
}Legend Border
Add border around legend:
legendSettings = {
visible: true,
border: {
color: '#CCCCCC',
width: 1
}
}Series Visibility Toggle
Click to Toggle
By default, clicking a legend item hides/shows the series:
export class AppComponent {
series = [
{ points: [...], name: 'Series 1' },
{ points: [...], name: 'Series 2' }
]
legendSettings = { visible: true, toggleVisibility: true }
// User clicks legend item → series visibility toggles automatically
}Control toggle visibility
export class AppComponent {
series = [
{ points: [...], name: 'Series 1' },
{ points: [...], name: 'Series 2' }
]
legendSettings = { visible: true, toggleVisibility: false }
}Programmatic Visibility Control
Manually control series visibility:
export class AppComponent {
series = [
{
points: [...],
name: 'Series 1',
visibility: 'visible' // Visible
},
{
points: [...],
name: 'Series 2',
visibility: 'hidden' // Hidden
}
]
toggleSeries(seriesName: string): void {
this.series = this.series.map(s => {
if (s.name === seriesName) {
return {
...s,
visibility: s.visibility === 'visible' ? 'hidden' : 'visible'
};
}
return s;
});
}
}Show/Hide All Series
showAllSeries() {
this.series = this.series.map(s => ({
...s,
visibility: 'visible'
}));
}
hideAllSeries() {
this.series = this.series.map(s => ({
...s,
visibility: 'hidden'
}));
}Common Patterns
Pattern 1: Multi-Series with Legend
Compare multiple devices with clear identification:
export class AppComponent {
series = [
{
points: [{ resistance: 10, reactance: 10 }, ...],
fill: '#0066CC',
name: 'Device A'
},
{
points: [{ resistance: 15, reactance: 12 }, ...],
fill: '#FF6633',
name: 'Device B'
},
{
points: [{ resistance: 8, reactance: 8 }, ...],
fill: '#00CC66',
name: 'Device C'
}
]
legendSettings = {
visible: true,
position: 'Bottom',
shape: 'Rectangle'
}
}Pattern 2: Right-Side Legend
Preserve horizontal chart space:
legendSettings = {
visible: true,
position: 'Right',
alignment: 'Center'
}HTML template:
<div style="display: flex;">
<div style="flex: 1;">
<ejs-smithchart [legendSettings]="legendSettings"></ejs-smithchart>
</div>
</div>Pattern 3: Interactive Series Control
Enable/disable series visibility with buttons:
import { Component, ViewEncapsulation } from '@angular/core';
import { SmithchartModule, SmithchartLegendService } from '@syncfusion/ej2-angular-charts';
@Component({
standalone: true,
selector: 'app-container',
imports: [SmithchartModule],
providers: [SmithchartLegendService],
encapsulation: ViewEncapsulation.None,
template: `
<div class="toolbar">
<button (click)="toggleDevice(0)">Toggle Device 1</button>
<button (click)="toggleDevice(1)">Toggle Device 2</button>
<button (click)="toggleDevice(2)">Toggle Device 3</button>
</div>
<ejs-smithchart
[series]="series"
[legendSettings]="legendSettings"
style="display:block;height:400px">
</ejs-smithchart>
`,
styles: [`
.toolbar {
margin-bottom: 10px;
}
button {
margin-right: 8px;
}
`]
})
export class AppComponent {
legendSettings = {
visible: true
};
series = [
{
name: 'Line 1',
visibility: 'visible',
marker: { visible: true },
points: [
{ resistance: 0.2, reactance: 0.2 },
{ resistance: 0.4, reactance: 0.3 }
]
},
{
name: 'Line 2',
visibility: 'visible',
marker: { visible: true },
points: [
{ resistance: 0.3, reactance: 0.25 },
{ resistance: 0.5, reactance: 0.15 }
]
},
{
name: 'Line 3',
visibility: 'hidden', // Initially hidden
marker: { visible: true },
points: [
{ resistance: 0.4, reactance: 0.2 },
{ resistance: 0.6, reactance: 0.1 }
]
}
];
toggleDevice(index: number): void {
this.series = this.series.map((s, i) => {
if (i === index) {
return {
...s,
visibility: s.visibility === 'visible' ? 'hidden' : 'visible'
};
}
return s;
});
}
}Pattern 4: Legend with Custom Position
Place legend in upper-right corner:
legendSettings = {
visible: true,
position: 'Custom',
location: { x: 350, y: 30 },
alignment: 'Far'
}Pattern 5: Impedance vs Admittance Display
Distinguish render types in legend:
@Component({
standalone: true,
selector: 'app-container',
imports: [SmithchartModule],
providers: [SmithchartLegendService],
encapsulation: ViewEncapsulation.None,
template: `
<!-- Impedance Smith Chart -->
<ejs-smithchart
renderType="Impedance"
[series]="impedanceSeries"
[legendSettings]="legendSettings">
</ejs-smithchart>
<!-- Admittance Smith Chart -->
<ejs-smithchart
renderType="Admittance"
[series]="admittanceSeries"
[legendSettings]="legendSettings">
</ejs-smithchart>
`,
})
export class AppComponent {
impedanceSeries = [
{
name: 'Impedance View',
fill: '#0066CC',
marker: { visible: true },
points: [
{ resistance: 0.3, reactance: 0.2 },
{ resistance: 0.5, reactance: 0.1 },
{ resistance: 0.7, reactance: -0.1 }
]
}
];
admittanceSeries = [
{
name: 'Admittance View',
fill: '#FF6633',
marker: { visible: true },
points: [
{ resistance: 0.3, reactance: 0.2 },
{ resistance: 0.5, reactance: 0.1 },
{ resistance: 0.7, reactance: -0.1 }
]
}
];
legendSettings = {
visible: true,
shape: 'Rectangle'
}
}User Interaction Patterns
Series Selection
Track which series are currently visible:
export class AppComponent {
selectedSeries = new Set<string>();
onLegendClick(seriesName: string) {
if (this.selectedSeries.has(seriesName)) {
this.selectedSeries.delete(seriesName);
} else {
this.selectedSeries.add(seriesName);
}
}
}Troubleshooting
Issue: Legend doesn't appear
- Check:
legendSettings.visible = true - Check: Each series has
nameproperty - Check: At least one series is visible
Issue: Legend items for hidden series
- Note: This is expected behavior - hidden series can be toggled via legend click
Issue: Legend overlaps chart
- Solution: Use
position: 'Top','Bottom','Left', or'Right' - Solution: Use
Customposition with appropriate x/y values
Issue: Legend text truncated
- Solution: Adjust
widthproperty - Solution: Shorten series names
Markers and Data Labels
Table of Contents
- Markers Overview
- Basic Marker Display
- Marker Characteristics
- Marker Configuration
- Basic Marker Properties
- Marker Shapes
- Multiple Markers per Series
- Marker Opacity and Border
- Data Labels Overview
- Enable Data Labels
- Label Content
- Label Styling
- Font and Color
- Border and Background
- Combined Styling
- Common Patterns
- Pattern 1: Highlight Key Points
- Pattern 2: Impedance and Admittance Comparison
- Pattern 3: Dense Data with Smart Labels
- Pattern 4: Minimal Display
- Edge Cases and Gotchas
- Overlapping Labels
- Performance
Markers Overview
Markers are visual indicators at each data point on the smith chart. They help identify individual points and emphasize important values.
Basic Marker Display
Enable markers on all data points:
export class AppComponent {
series = [{
points: [...],
marker: {
visible: true
}
}]
}Marker Characteristics
- Shape - Circle (default), Square, Triangle, Diamond
- Fill - Fill color for each marker
- Height - Height in pixels
- Width - Width in pixels
- Border - Optional outline
- Opacity - Transparency level
- Visible - Visibility of the marker
Marker Configuration
Basic Marker Properties
marker = {
visible: true,
width: 10, // Marker width in pixels
height: 10, // Marker height in pixels
fill: '#0066CC', // Marker fill color
border: {
color: '#000000', // Border color
width: 1 // Border width in pixels
},
opacity: 1 // Transparency 0-1
}Marker Shapes
Available marker shapes:
// Circle (default)
marker = { shape: 'Circle' }
// Square
marker = { shape: 'Rectangle' }
// Triangle
marker = { shape: 'Triangle' }
// Diamond
marker = { shape: 'Diamond' }Multiple Markers per Series
Apply markers to different series with different styles:
export class AppComponent {
series = [
{
points: [...],
marker: {
visible: true,
fill: '#0066CC',
width: 8,
height: 8
}
},
{
points: [...],
marker: {
visible: true,
fill: '#FF6633',
shape: 'Rectangle',
width: 10,
height: 10
}
}
]
}Marker Opacity and Border
Combine opacity with borders for emphasis:
marker = {
visible: true,
fill: '#CCCCFF',
opacity: 0.6,
border: {
color: '#0066CC',
width: 2
}
}Data Labels Overview
Data labels display numeric values directly on or near the marker points. They provide precise information without requiring tooltips.
Enable Data Labels
Display labels for all data points:
export class AppComponent {
series = [{
points: [...],
marker: {
dataLabel: {
visible: true
}
}
}]
}IMPORTANT: dataLabel must be nested INSIDE the `marker` object, NOT at the series level.
// ✓ CORRECT - dataLabel inside marker
marker: {
visible: true,
dataLabel: { visible: true }
}
// ✗ WRONG - dataLabel at series level
series: [{
dataLabel: { visible: true },
marker: { visible: true }
}]Label Styling
Font and Color
Customize label text appearance:
marker ={
dataLabel : {
visible: true,
textStyle: {
color: '#333333',
fontFamily: 'Arial',
size: '12px',
fontWeight: 'Bold',
opacity: 1
}
}
}Available properties:
color- Text color (hex or named)fontFamily- Font namesize- Text size (px, em, etc.)fontWeight- Normal, Bold, Bolderopacity- Transparency 0-1fontStyle- Font style for text
Border and Background
Add visual emphasis with borders:
marker = {
dataLabel: {
visible: true,
border: {
color: '#CCCCCC',
width: 1
},
fill: '#FFFFFF' // Background color
}
}Combined Styling
marker = {
dataLabel : {
visible: true,
fill: '#FFFFCC',
textStyle: {
color: '#000000',
size: '11px',
fontWeight: 'Bold'
},
border: {
color: '#FF6633',
width: 1
}
}
}Common Patterns
Pattern 1: Highlight Key Points
Show markers and labels for important measurements:
export class AppComponent {
series = [{
points: [
{ resistance: 0.16, reactance: 0.24 },
{ resistance: 0.36, reactance: 0.36 },
{ resistance: 0.56, reactance: 0.16 }
],
marker: {
visible: true,
fill: '#0066CC',
width: 8,
dataLabel: {
visible: true,
}
},
}]
}Pattern 2: Impedance and Admittance Comparison
Different markers for different render types:
@Component({
imports: [
SmithchartModule
],
standalone: true,
selector: 'app-container',
template: `
<!-- Impedance Smith Chart -->
<ejs-smithchart renderType="Impedance" [series]="impedanceSeries"></ejs-smithchart>
<!-- Admittance Smith Chart -->
<ejs-smithchart renderType="Admittance" [series]="admittanceSeries"></ejs-smithchart>
`
})
export class AppComponent {
impedanceSeries = [
{
name: 'Impedance View',
points: [
{ resistance: 0.3, reactance: 0.2 },
{ resistance: 0.5, reactance: 0.1 },
{ resistance: 0.7, reactance: -0.1 }
],
marker: {
visible: true,
fill: '#0066CC',
dataLabel: { visible: true }
}
}
];
admittanceSeries = [
{
name: 'Admittance View',
points: [
{ resistance: 0.3, reactance: 0.2 },
{ resistance: 0.5, reactance: 0.1 },
{ resistance: 0.7, reactance: -0.1 }
],
marker: {
visible: true,
fill: '#FF6633',
shape: 'Rectangle',
dataLabel: { visible: true }
}
}
];
}Pattern 3: Dense Data with Smart Labels
Show all values without visual clutter:
export class AppComponent {
series = [{
points: generateDenseData(), // Many points
marker: {
visible: true,
width: 5,
height: 5,
opacity: 0.7,
dataLabel: {
visible: true,
}
},
enableSmartLabels: true
}]
}Pattern 4: Minimal Display
Hide markers but show labels:
export class AppComponent {
series = [{
points: [...],
marker: {
visible: false, // No markers
dataLabel: {
visible: true,
}
},
}]
}Edge Cases and Gotchas
Overlapping Labels
Problem: Many points with labels create visual clutter
Solution 1: Smart Labels
enableSmartLabels: truePerformance
Problem: Many labels impact rendering performance
Solution 1: Disable Markers
marker: { visible: false }Solution 2: Reduce Data Points Aggregate or sample data before display:
const sampledData = data.filter((d, i) => i % 5 === 0)Common Mistakes
Mistake 1: Putting dataLabel at Series Level
WRONG:
series = [{
points: [...],
dataLabel: { visible: true }, // ✗ Wrong place!
marker: { visible: true }
}]CORRECT:
series = [{
points: [...],
marker: {
visible: true,
dataLabel: { visible: true } // ✓ Inside marker
}
}]Mistake 2: Binding dataLabel Separately in Template
WRONG HTML:
<e-series [dataLabel]="s.dataLabel" [marker]="s.marker"></e-series>
<!-- ✗ This binds dataLabel at series level -->CORRECT HTML:
<e-series [marker]="s.marker"></e-series>
<!-- ✓ Just bind marker, dataLabel is already inside -->Mistake 3: Missing dataLabel Object in TypeScript
WRONG:
marker: {
visible: true,
dataLabel: true // ✗ Should be an object
}CORRECT:
marker: {
visible: true,
dataLabel: { visible: true } // ✓ Object with visible property
}Series and Data Management
Table of Contents
- Series Concepts
- Data Formats
- Points Format
- DataSource Format
- Dynamic Data Binding
- Impedance vs Admittance
- Impedance (Default)
- Admittance
- Single Series
- Basic Single Series
- With Styling
- Multiple Series
- Side-by-Side Comparison
- Series Array with Different Data Sources
- Series Customization
- Fill Color
- Line Width and Opacity
- Series Visibility
- Series Name
- Data Label Management
- Enable Data Labels
- Smart Labels (Prevent Overlap)
- Label Styling
- Common Patterns
- Pattern 1: Multiple Series Comparison
- Pattern 2: Impedance with Smart Labels
- Pattern 3: Dynamic Series Update
- Troubleshooting
Series Concepts
A series in a smith chart represents a single transmission line or impedance curve. Each series consists of:
- Points array - Collection of (resistance, reactance) data points
- Visual properties - Color (fill), line width, opacity
- Markers - Visual indicators at each data point
- Data labels - Text labels showing values
- Name - Series identifier for legends
Multiple series allow comparison of different transmission lines or network parameters.
Data Formats
Points Format
Define data inline as an array of objects with resistance and reactance properties:
series = [{
points: [
{ resistance: 0.1, reactance: 0.1 },
{ resistance: 0.3, reactance: 0.2 },
{ resistance: 0.5, reactance: 0.16 },
{ resistance: 0.7, reactance: -0.1 }
]
}]Each point represents a location on the smith chart grid.
DataSource Format
Bind data from an external array with property name mappings:
import { Component } from '@angular/core';
import { SmithchartModule } from '@syncfusion/ej2-angular-charts';
@Component({
imports: [ SmithchartModule ],
standalone: true,
selector: 'app-container',
template: `<ejs-smithchart style='display: block;' id='container' height='350px' [series]="series>
</ejs-smithchart>`
})
export class AppComponent {
transmissionData = [
{ impedance_r: 10, impedance_x: 10 },
{ impedance_r: 20, impedance_x: 15 },
{ impedance_r: 30, impedance_x: 5 }
]
series = [{
dataSource: this.transmissionData,
resistance: 'impedance_r',
reactance: 'impedance_x'
}]
}Use resistance and reactance properties to map your data field names.
Dynamic Data Binding
Update series data dynamically:
export class AppComponent {
series = [{
points: [
{ resistance: 10, reactance: 10 }
]
}]
addDataPoint() {
this.series[0].points.push({ resistance: 25, reactance: 12 })
}
loadFromAPI() {
// Fetch data from your backend
this.transmissionService.getData().subscribe(data => {
this.series = [
{
name: 'Updated',
points: data,
marker: { visible: true }
}
];
})
}
}Impedance vs Admittance
The renderType property determines how data is interpreted:
Impedance (Default)
Plots resistance and reactance directly on the smith chart:
<ejs-smithchart renderType="Impedance">
<e-seriesCollection>
<e-series
[points]="points"
[marker]="marker">
</e-series>
</e-seriesCollection>
</ejs-smithchart>- Horizontal axis - Resistance values
- Vertical axis - Reactance values
- Use case - Standard impedance matching analysis
Admittance
Transforms impedance data to admittance (inverse of impedance) for analysis:
<ejs-smithchart renderType="Admittance">
<e-seriesCollection>
<e-series
[points]="points"
[marker]="marker">
</e-series>
</e-seriesCollection>
</ejs-smithchart>- Use case - Admittance network analysis
- Transform - Y = 1/Z (automatic conversion)
Single Series
Basic Single Series
series = [{
points: [
{ resistance: 0.1, reactance: 0.1 },
{ resistance: 0.3, reactance: 0.2 },
{ resistance: 0.5, reactance: 0.16 },
{ resistance: 0.7, reactance: -0.1 }
],
}]With Styling
series = [{
points: [...],
fill: '#0066CC', // Series line color
width: 3, // Line width in pixels
opacity: 0.8, // Transparency (0-1)
visibility: 'visible', // Show/hide series
name: 'Transmission Line 1' // Legend name
}]Multiple Series
Side-by-Side Comparison
Display multiple transmission lines for comparison:
export class AppComponent {
series = [
{
points: [
{ resistance: 0.2, reactance: 0.2 },
{ resistance: 0.4, reactance: 0.3 },
{ resistance: 0.9, reactance: 0.1 }
],
fill: '#0066CC',
name: 'Line A'
},
{
points: [
{ resistance: 0.16, reactance: 0.24 },
{ resistance: 0.36, reactance: 0.36 },
{ resistance: 0.56, reactance: 0.16 }
],
fill: '#FF6633',
name: 'Line B'
},
{
points: [
{ resistance: 0.24, reactance: 0.16 },
{ resistance: 0.44, reactance: 0.24 },
{ resistance: 0.64, reactance: 0.04 }
],
fill: '#00CC66',
name: 'Line C'
}
]
}Series Array with Different Data Sources
export class AppComponent {
measurementData = [...]
simulationData = [...]
series = [
{
dataSource: this.measurementData,
resistance: 'measured_r',
reactance: 'measured_x',
fill: '#0066CC',
name: 'Measured'
},
{
dataSource: this.simulationData,
resistance: 'simulated_r',
reactance: 'simulated_x',
fill: '#FF6633',
name: 'Simulated'
}
]
}Series Customization
Fill Color
Set series line color:
series = [{
points: [...],
fill: '#0066CC' // Hex color code
}]Line Width and Opacity
Control line appearance:
series = [{
points: [...],
width: 2.5, // Line width in pixels (default: 2)
opacity: 0.7 // Transparency 0-1 (default: 1)
}]Series Visibility
Toggle series display:
series = [{
points: [...],
visibility: 'hidden' // Hide this series initially
}]Hidden series still appear in legends but aren't displayed on the chart.
Series Name
Set series name for legends:
series = [{
points: [...],
name: 'RF Transmission Line'
}]Use meaningful names for easy identification in legends.
Data Label Management
Enable Data Labels
Display value labels at each data point:
export class AppComponent {
series = [{
points: [...],
marker:{ dataLabel:{ visible:true } }
}]
}Smart Labels (Prevent Overlap)
Enable smart label positioning to avoid overlapping:
series = [{
points: [...],
enableSmartLabels: true,
marker: { dataLabel: { visible:true }}
}]The chart automatically repositions labels to prevent overlap.
Label Styling
Customize label appearance:
marker:{
dataLabel : {
visible: true,
fill: '#000000',
textStyle: {
color: '#FFFFFF',
fontFamily: 'Arial',
size: '12px'
},
border: {
color: '#999999',
width: 1
}
}
}Common Patterns
Pattern 1: Multiple Series Comparison
export class AppComponent {
series = [
{ points: [...], fill: '#0066CC', name: 'Device 1' },
{ points: [...], fill: '#FF6633', name: 'Device 2' },
{ points: [...], fill: '#00CC66', name: 'Device 3' }
]
}Pattern 2: Impedance with Smart Labels
<ejs-smithchart renderType="Impedance">
<e-seriesCollection>
<e-series
[points]="points"
[marker]="marker"
[enableSmartLabels]="true">
</e-series>
</e-seriesCollection>
</ejs-smithchart>Pattern 3: Dynamic Series Update
export class AppComponent {
series = [{ points: [] }]
loadMeasurement(deviceId: string) {
this.api.getMeasurement(deviceId).subscribe(data => {
this.series = [
{
name: data.name,
points: data.points,
marker: { visible: true }
}
];
})
}
}Troubleshooting
Issue: Data points not appearing
- Check: Ensure
resistanceandreactanceproperties exist in data - Check: Verify values are within reasonable range (-∞ to +∞)
Issue: Series not showing in legend
- Check: Set
nameproperty on each series - Check: Verify
legendSettings.visible = true
Troubleshooting
Table of Contents
- Installation Issues
- Package Installation Fails
- Module Not Found Error
- Module and Import Errors
- SmithchartModule Not Available
- Missing Service Injection
- ViewEncapsulation Issue
- Unnecessary Imports
- Data Display Issues
- No Data Appears on Chart
- Points Not Rendering
- Series Not Appearing in Legend
- Rendering Issues
- Chart Not Displaying
- Chart Partially Visible
- Performance Problems
- Slow Rendering with Large Datasets
- Memory Usage Growing
- Styling and Visual Issues
- Theme Not Applied
- Colors Not Changing
- Feature-Specific Issues
- Tooltips Not Showing
- Print Not Working
- Legend Click Doesn't Toggle Series
- Template Element Naming
- e-series-collection Not Recognized
- Browser Compatibility
- Chart Not Working in Specific Browser
- Getting More Help
- Debug Information
- Resources
Installation Issues
Package Installation Fails
Problem: npm add @syncfusion/ej2-angular-charts fails or times out
Solutions:
1. Clear npm cache:
npm cache clean --force2. Try installing with specific version:
npm install @syncfusion/ej2-angular-charts@32.1.193. Use yarn instead:
yarn add @syncfusion/ej2-angular-charts4. Check npm registry:
npm config get registry
# Should output: https://registry.npmjs.org/Module Not Found Error
Problem: "Cannot find module '@syncfusion/ej2-angular-charts'"
Solutions:
1. Reinstall package:
rm -rf node_modules package-lock.json
npm install2. Verify installation:
npm list @syncfusion/ej2-angular-charts3. Check package.json:
{
"dependencies": {
"@syncfusion/ej2-angular-charts": "^32.1.19"
}
}Module and Import Errors
SmithchartModule Not Available
Problem: "SmithchartModule is not exported from @syncfusion/ej2-angular-charts"
Solution: Verify the correct import:
// ✓ CORRECT
import { SmithchartModule } from '@syncfusion/ej2-angular-charts'
// ✗ WRONG
import { SmithchartComponent } from '@syncfusion/ej2-angular-charts'Missing Service Injection
Problem: Tooltips don't work
Solution: Inject required service in providers:
import { TooltipRenderService } from '@syncfusion/ej2-angular-charts'
@Component({
imports: [SmithchartModule],
providers: [TooltipRenderService], // ← Add this
standalone: true
})Services by feature:
- Tooltips:
TooltipRenderService
ViewEncapsulation Issue
Problem: Styling not applied, theme not working
Solution: Add ViewEncapsulation.None:
import { ViewEncapsulation } from '@angular/core'
@Component({
encapsulation: ViewEncapsulation.None, // ← Add this
template: `<ejs-smithchart></ejs-smithchart>`
})Unnecessary Imports
Problem: Importing modules/services that aren't used adds bundle size and confusion
Solutions:
1. Don't import CommonModule in standalone components:
// ✗ WRONG - CommonModule not needed for standalone
import { CommonModule } from '@angular/common'
@Component({
imports: [SmithchartModule, CommonModule],
standalone: true
})
// ✓ CORRECT - Only SmithchartModule needed
import { SmithchartModule } from '@syncfusion/ej2-angular-charts'
@Component({
imports: [SmithchartModule],
standalone: true
})2. Don't import services you're not using:
// ✗ WRONG - TooltipRenderService not needed without tooltips
import { TooltipRenderService } from '@syncfusion/ej2-angular-charts'
@Component({
providers: [TooltipRenderService], // ← Unnecessary
standalone: true
})
export class AppComponent {
series = [{ points: [...] }] // No tooltip configuration
}
// ✓ CORRECT - Add service only when using tooltips
import { TooltipRenderService } from '@syncfusion/ej2-angular-charts'
@Component({
providers: [TooltipRenderService], // ← Used for tooltip rendering
standalone: true
})
export class AppComponent {
series = [{
points: [...],
tooltip: { visible: true } // ← Tooltips configured
}]
}3. SmithchartLegendService usage:
// ✗ WRONG - Service not needed for basic legend display
import { SmithchartLegendService } from '@syncfusion/ej2-angular-charts'
@Component({
providers: [SmithchartLegendService], // ← Not needed
standalone: true
})
export class AppComponent {
series = [{ name: 'Line A', points: [...] }]
legendSettings = { visible: true } // Basic legend
}
// ✓ CORRECT - Only add if handling legend click events
import { SmithchartLegendService } from '@syncfusion/ej2-angular-charts'
@Component({
providers: [SmithchartLegendService], // ← For custom event handling
standalone: true
})
export class AppComponent {
series = [...]
legendSettings = { visible: true }
// Custom legend interaction logic
onLegendClick(event: any) { }
}| Import | Use Only When | Reason |
|---|---|---|
CommonModule | Never in standalone | Standalone doesn't need it |
TooltipRenderService | tooltip: { visible: true } | Renders tooltip content |
SmithchartLegendService | Custom legend events | Handles legend click interactions |
Data Display Issues
No Data Appears on Chart
Problem: Chart renders but no series visible
Checklist:
1. Verify data array exists:
series = [{
points: [
{ resistance: 0.4, reactance: 0.2 }
]
}]
// ✓ Check: Array not empty
// ✓ Check: Properties named 'resistance' and 'reactance'2. Ensure series binding:
<ejs-smithchart [series]="series"></ejs-smithchart>3. Check data type:
// ✓ CORRECT - array of objects
points: [{ resistance: 0.4, reactance: 0.2 }]
// ✗ WRONG - array of primitives
points: [10, 20, 30]Points Not Rendering
Problem: Series exists but data points don't show
Solutions:
1. Verify property names:
// If data has different property names:
series = [{
dataSource: data,
resistance: 'r_value', // Map correct properties
reactance: 'x_value'
}]2. Check property values:
// ✓ Valid values
{ resistance: 10, reactance: 10 }
{ resistance: -5, reactance: 15 }
{ resistance: 0, reactance: 0 }
// ✗ Invalid values
{ resistance: undefined, reactance: null }
{ resistance: 'abc', reactance: 'xyz' }3. Enable markers to verify data:
series = [{
marker: {
visible: true, // Shows points more clearly
dataLabel: { visible: true }
},
}]Series Not Appearing in Legend
Problem: Multiple series created but legend empty
Solutions:
1. Add series names:
series = [{
points: [...],
name: 'Device A' // ← Add name property
}]2. Enable legend:
legendSettings = { visible: true } // ← Make sure it's true3. Check series visibility:
// Hidden series won't show in legend
visibility: 'hidden' // ← Might be hiding the seriesRendering Issues
Chart Not Displaying
Problem: Empty container, no chart visible
Solutions:
1. Set container dimensions:
<ejs-smithchart style="width: 100%; height: 400px;"></ejs-smithchart>2. Check component selector:
<!-- Template must include component -->
<ejs-smithchart></ejs-smithchart>3. Verify styles loaded:
/* In styles.css */
@import 'node_modules/@syncfusion/ej2-angular-base/styles/material3.css';
@import 'node_modules/@syncfusion/ej2-angular-inputs/styles/material3.css';Chart Partially Visible
Problem: Only part of chart renders or cuts off
Solutions:
1. Adjust container size:
<div style="width: 100%; height: 500px;">
<ejs-smithchart style="width: 100%; height: 100%;"></ejs-smithchart>
</div>2. Check parent layout:
/* Ensure parent has dimensions */
.chart-container {
width: 100%;
height: 500px;
position: relative;
}3. Enable responsive:
// Chart auto-resizes with containerCan't Bind to 'tooltip' Property
Problem: Can't bind to 'tooltip' since it isn't a known property of 'ejs-smithchart'
Solution:
Define the tooltip inside the SmithChart series instead of the chart:
// ✗ WRONG - tooltip on chart
<ejs-smithchart [tooltip]="{ visible: true }"></ejs-smithchart>
// ✓ CORRECT - tooltip in series
series = [{
tooltip: { visible: true },
marker: { visible: true },
points: [...]
}]Performance Problems
Slow Rendering with Large Datasets
Problem: Chart lags with 1000+ data points
Solutions:
1. Reduce data points:
// Sample every nth point
const sampledData = data.filter((d, i) => i % 10 === 0)2. Disable markers and labels:
series = [{
marker: {
visible: false
dataLabel: { visible: false }
},
}]3. Disable smart labels:
series = [{
enableSmartLabels: false
}]4. Use data aggregation:
function aggregateData(data: any[], bucketSize: number) {
const result = []
for (let i = 0; i < data.length; i += bucketSize) {
result.push(data[i])
}
return result
}Memory Usage Growing
Problem: Memory increases over time
Solutions:
1. Unsubscribe from observables:
private destroy$ = new Subject<void>()
ngOnInit() {
this.dataService.getData()
.pipe(takeUntil(this.destroy$))
.subscribe(data => this.series = data)
}
ngOnDestroy() {
this.destroy$.next()
this.destroy$.complete()
}2. Limit data history:
updateData(newPoint: any) {
if (this.series[0].points.length > 1000) {
this.series[0].points.shift() // Remove oldest point
}
this.series[0].points.push(newPoint)
}Styling and Visual Issues
Theme Not Applied
Problem: Chart shows default colors instead of theme
Solutions:
1. Add ViewEncapsulation.None:
import { ViewEncapsulation } from '@angular/core'
@Component({
encapsulation: ViewEncapsulation.None
})2. Check CSS load order:
<!-- In index.html -->
<link rel="stylesheet" href="styles.css">Colors Not Changing
Problem: Fill color on series doesn't update
Solutions:
1. Update series reference:
// Instead of mutating:
this.series[0].fill = '#0066CC'
// Use new reference:
this.series = [{...this.series[0], fill: '#0066CC'}]2. Check CSS specificity:
/* May need !important for overrides */
::ng-deep .e-smithchart-series {
stroke: #0066CC !important;
}Feature-Specific Issues
Tooltips Not Showing
Problem: Hover doesn't display tooltip
Solutions:
1. Inject service:
import { TooltipRenderService } from '@syncfusion/ej2-angular-charts'
@Component({
providers: [TooltipRenderService]
})2. Enable tooltip:
series = [{
tooltip: { visible: true },
marker: { visible: true },
points: [...]
}]3. Bind in template:
<ejs-smithchart [series]="series"></ejs-smithchart>Print Not Working
Problem: Print button doesn't open print dialog
Solutions:
1. Get reference to chart:
@ViewChild('smithchart')
smithchart: any
print() {
this.smithchart.print()
}Legend Click Doesn't Toggle Series
Problem: Clicking legend doesn't hide/show series
Solutions:
1. Verify legend visible:
legendSettings = { visible: true }2. Check series visibility property:
series = [{
name: 'Device',
visibility: "visible"
}]3. Handle click event:
onLegendItemClick(args: any) {
console.log('Series toggled:', args.series.name)
}Template Element Naming
e-series-collection Not Recognized
Problem: Error: 'e-series-collection' is not a known element
'e-series-collection' is not a known element:
1. If 'e-series-collection' is an Angular component, then verify that it is included in the '@Component.imports' of this component.
2. If 'e-series-collection' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@Component.schemas' of this componentRoot Cause: Using kebab-case (e-series-collection) instead of camelCase (e-seriesCollection) for Syncfusion template elements.
Solution: Use camelCase element names in templates
WRONG:
<e-seriesCollection>
<e-series></e-series>
</e-seriesCollection>CORRECT:
<e-series-collection>
<e-series></e-series>
</e-series-collection>Key Points:
- Syncfusion Angular components use camelCase element names (not kebab-case)
- Common element names:
e-seriesCollection(note-series-collection)e-series(note-series- this one is already correct)e-legendSettings(note-legend-settings)e-markerSettings(note-marker-settings)
Example - Correct Template Structure:
@Component({
template: `
<ejs-smithchart [series]="series">
<e-seriesCollection> <!-- ✓ camelCase -->
<e-series
*ngFor="let s of series"
[name]="s.name"
[points]="s.points">
</e-series>
</e-seriesCollection>
</ejs-smithchart>
`
})
export class AppComponent {
series = [...]
}Browser Compatibility
Chart Not Working in Specific Browser
Problem: Works in Chrome but not in Firefox/Safari
Solutions:
1. Check browser support:
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
2. Test in different browser:
# Use BrowserStack or local testing3. Check console for errors:
// Open DevTools → Console tab
// Look for JavaScript errorsGetting More Help
Debug Information
When reporting issues, include:
1. Angular version:
ng version2. Syncfusion version:
npm list @syncfusion/ej2-angular-charts3. Browser information:
- Browser name and version
- Operating system
4. Minimal reproduction:
- Small code example showing the issue
- Sample data