Topic: Charts using Json data
Damian Gemza staff answered 5 years ago
Dear @lucky_11
Your JSON data has to be in a format which our charts accepts - `[{data: [], label: ' '}]. Please take a look at the below variable which holds the data:
public chartDatasets: Array<any> = [
{ data: [65, 59, 80, 81, 56, 55, 40], label: 'My First dataset' },
{ data: [28, 48, 40, 19, 86, 27, 90], label: 'My Second dataset' }
];
After that, you have to get the data from the JSON (for example with Angular HttpClient via get call).
After getting the data you have to pass it to the variable which is used in our charts. And that's all.
Best Regards,
Damian
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: 7.5.1
- Device: Laptop
- Browser: crome
- OS: Windows 10
- Provided sample code: No
- Provided link: No