- create the app
npm install -g @angular/cli
# create a new app
ng new chart-app
cd chart-app
- create boxplot component and install dependencies
# install extra dependencies
npm install @types/chart.js chart.js chartjs-chart-box-and-violin-plot
# create a boxplot component
ng generate component boxplot
- replace the content of
src/app/boxplot/boxplot.component.ts
with the file of this Gist - render the component by adding
<app-boxplot></app-boxplot>
tosrc/app/app.component.html
in my case this results in: