July 2017
Intermediate to advanced
384 pages
8h 23m
English
The chart type is defined through the type property. It supports seven different types of charts with an option for customizations:
Each type has it's own format of data, and it can be supplied through the data property. For example, in the doughnut chart, the type should refer to doughnut and the data property should bind to the data options, as shown here:
<p-chart type="doughnut" [data]="doughnutdata"></p-chart>
The component class has to define data with the options labels and datasets, as shown here:
this.doughnutdata = { labels: ['PrimeNG', 'PrimeUI', 'PrimeReact'], datasets: [ { data: [3000, 1000, 2000], backgroundColor: [ "#6544a9", "#51cc00", "#5d4361" ], hoverBackgroundColor ...
Read now
Unlock full access