A Pareto chart is a type of chart that contains both bars and a line graph, where individual values are represented in descending order by bars, and the cumulative total is represented by the line.
Represents the cumulative percentage of the total number of occurrences, total cost, or total of the particular unit of measure.
Mark data points with built-in shapes such as circles, rectangles, ellipses, vertical lines, horizontal lines, diamonds, triangles, pentagons, crosses, and pluses. In addition to these shapes, use images to make the points more attractive.
Data labels display information about data points. Add a template to display data labels with HTML elements such as images, DIV, and spans for more informative data labels. You can rotate a data label by its given angle.
The React Pareto Chart can be transposed vertically to view the data in a different perspective.
Customize the color, border, marker and dash array for the pareto column and line series using built-in APIs to make it visually unique.
Easily get started with React Pareto Chart by using a few simple lines of TSX code, as demonstrated below. Also explore our React Pareto Chart Example that shows how to render and configure the chart.
import {ChartComponent, SeriesCollectionDirective, SeriesDirective, Inject, Category, ColumnSeries, Legend, Tooltip, ParetoSeries, LineSeries, Highlight} from'@syncfusion/ej2-react-charts';
import * as React from 'react';
let data = [
{ x: 'Button Defect', y: 23 }, { x: 'Pocket Defect', y: 16 },
{ x: 'Collar Defect', y: 10 }, { x: 'Cuff Defect', y: 7 },
{ x: 'Sleeve Defect', y: 6 }, { x: 'Other Defect', y: 2}
];
class App extends React.Component<{}, {}> {
public primaryXAxis: AxisModel = { valueType: 'DateTime'};
public render() {
return <ChartComponent id='charts' primaryXAxis={this.primaryXAxis}>
<Inject services={[Category, ColumnSeries, Legend, LineSeries, Tooltip, ParetoSeries, Highlight]}/>
<SeriesCollectionDirective>
<SeriesDirective dataSource={data} xName='x' yName='y' type='Pareto' paretoOptions={{ marker: { visible: true, isFilled: true, width: 7, height: 7 }, dashArray: '3,2', width: 2 }}/>
</SeriesCollectionDirective>
</ChartComponent>
}
};
ReactDOM.render(
<App />,
document.getElementById('charts') as HTMLElement
);
<!DOCTYPE html>
<html>
<body>
<div id="charts"></div>
</body>
</html>
Learn the available options to customize React Pareto chart.
Explore the React Pareto Chart APIs.