0

I've got a chart to display data from the current quarter and previous quarter, but I also show it to the month. Here is an image of what I'm trying to do:enter image description here

I'm not sure how to do this or if it's even possible. I'm currently using ng2-charts (which is based off of Chart.js) but I'm open to any open-source charting platform that works with Angular 2

Sebastian Bochan
  • 37,348
  • 3
  • 49
  • 75
Alex Kibler
  • 4,674
  • 9
  • 44
  • 74

2 Answers2

1

This library is what you are looking for angular2-chartjs2

https://github.com/evoila/angular2-chartjs2

null canvas
  • 10,201
  • 2
  • 15
  • 18
  • That seems very similar to ng2-charts. Can chartjs do what I'm looking for though? I'm reading their docs now and don't see anything. – Alex Kibler Jun 29 '16 at 16:54
0

If you want to use highcharts with Angular2 then refer this- https://www.npmjs.com/package/angular2-highcharts

PrimeNG charts can be an alternative- http://www.primefaces.org/primeng/#/barchart

Another option is Google Charts. Refer this - Angular2 + Google Charts. How to integrate Google Charts in Angular2?

Community
  • 1
  • 1
Sanket
  • 19,295
  • 10
  • 71
  • 82
  • Interesting, thank you. I'm currently trying to get highcharts to load but I'm getting an error about `highcharts/highstock.src.js` not found. I've looked at PrimeNG but haven't found anything about the nested labels like I asked in the question. Google Charts looks great too but I can't find anything about nested labels. – Alex Kibler Jun 29 '16 at 16:55
  • For highcharts error, you need to refer highcharts as well as highstocks. hence make sure you have added below map in your systemjs.config.js 'angular2-highcharts': 'https://cdn.rawgit.com/gevgeny/angular2-highcharts/0.1.0/dist', 'highcharts/highstock.src': 'https://cdn.rawgit.com/highcharts/highcharts-dist/v4.2.1/highstock.js' – Sanket Jun 29 '16 at 17:33
  • For Google charts, available configuration options are here - https://developers.google.com/chart/interactive/docs/gallery/barchart#configuration-options – Sanket Jun 29 '16 at 17:36