Skip to main content


Chart.js is an open-source library that permits us to draw various kinds of diagrams like Line, Bar, Radar utilizing the Canvas Element. How to use chart.js in Application: You can implement Chart.js in a simple way with the following instructions: Create a new project with angular-cli,we can use the command as below:ng new sample-chartjs Install Chart.js in your projectnpm install chart.js Import Chart into its componentimport Chart from ‘chart.js’; Use Chart in your view and component :Chart.js requires an element containing the unique id of the chart for the data to render in the HTML template. We can set height and width for the linechart. A Chart has 3 main sections: Type Of Chart: type Plotting the data Features of Chart