Overview
The React Line Chart visualizes data using connected line segments to display trends and progressions over equal intervals. Supports smooth animation, zooming, and panning while handling large volumes of data.
Multiple series
Plot multiple series in a single chart to compare different datasets. Legends and tooltips provide additional details about individual series.
Marker
Markers support built-in shapes such as circles, rectangles, ellipses, lines, diamonds, triangles, pentagons, crosses, and pluses. Images can also be used as marker symbols for customized presentations.
Data label
Data labels display information about data points. Templates support custom label content using HTML elements such as images, divs, and spans. Labels can also be rotated to a specified angle.
Multiple axes
Plot different datasets with Multiple Axes when values vary significantly across series.
Zoom and pan
Zoom and pan when dealing with large amounts of data to visualize data points in any region.
Dynamic Line Chart
Create and update the Line Chart with live data that changes over seconds or minutes.
Empty/null data point
React Line Charts handle missing data with empty points support.
Vertical chart
Transpose the chart vertically to view data from a different perspective.
Customization
Customize the appearance of the Line Chart by adjusting color and border properties through built-in APIs.
Multi color line
Dashed line
React Line Chart code example
Get started with the React Line Chart using a few simple lines of TSX code example as demonstrated below. Also explore demo to learn how to render and configure the component.
import { AxisModel, Category, ChartComponent, Inject, LineSeries, SeriesCollectionDirective, SeriesDirective} from'@syncfusion/ej2-react-charts';
import * as React from 'react';
class App extends React.Component<{}, {}> {
public primaryXAxis: AxisModel = { valueType: 'Category'};
public data : any[]= [{ x: 'WW', y: 38.3, text: 'World Wide' },
{ x: 'EU', y: 45.2, text: 'Europe' },
{ x: 'APAC', y: 18.2, text: 'Asia Pacific' },
{ x: 'LATAM', y: 46.7, text: 'Latin America' },
{ x: 'MEA', y: 61.5, text: 'Middle East Africa' },
{ x: 'NA', y: 64, text: 'North America' }];
public render() {
return <ChartComponent id='charts' primaryXAxis={this.primaryXAxis}>
<Inject services={[LineSeries, Category]} />
<SeriesCollectionDirective>
<SeriesDirective dataSource={this.data} xName='x' yName='y' type='Line'/>
</SeriesCollectionDirective>
</ChartComponent>
}
};
ReactDOM.render(
<App />,
document.getElementById('charts') as HTMLElement
);<!DOCTYPE html>
<html>
<body>
<div id="charts"></div>
</body>
</html>Learning resources
Explore all Syncfusion React components
Explore over 140+ React UI components featuring established, and production-ready controls built for modern web app development.
- SMART COMPONENTSDATA VISUALIZATIONDROPDOWNSFILE VIEWERS & EDITORSBUTTONSINTERACTIVE CHATINPUTSNAVIGATIONNOTIFICATIONS

