Apex Charts
Code
<app-apex *ngIf="dashboardData?.statistics" [id]="'revenue'" [data]="dashboardData?.statistics"></app-apex>
Required Chart Data
[data] input takes data to generate chart. For Example:
{
"chartData": {
"chart": {
"height": 258,
"type": "bar",
"redrawOnParentResize": true,
"toolbar": {
"show": false
}
},
"plotOptions": {
"bar": {
"horizontal": false,
"columnWidth": "30%",
"endingShape": "rounded"
}
},
"dataLabels": {
"enabled": false
},
"stroke": {
"show": false,
"width": 1,
"colors": [
"transparent"
]
},
"grid": {
"show": true
},
"series": [
{
"name": "Current Year",
"data": [
35,
44,
55,
57,
56,
61,
75,
108,
60,
35,
98,
88
]
},
{
"name": "Previous Year",
"data": [
52,
76,
85,
101,
98,
87,
120,
54,
40,
70,
110,
65
]
}
],
"xaxis": {
"categories": [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"July",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
]
},
"legend": {
"fontFamily": "Nunito Sans, sans-serif",
"labels": {
"colors": [
"#505d69",
"#505d69"
]
}
},
"colors": [
colors.primary,
colors.success
],
"fill": {
"opacity": 1
}
},
"formatter": {
"axis": "y",
"type": "tooltip",
"pre": "$",
"post": " thousands"
}
}



