0

I'm using angular5 with library "@swimlane/ngx-charts": "^8.0.0"

I need to add a library to use combo-chart because in ngx-charts the default install not include combo-chart .

This is a demo of ngx combo charts.

This is the source code of combo-chart.

I need to use the combo chart in my project.

Please how do I integrate the combo chart inside an angular5 project?

kdiouri1994
  • 13
  • 1
  • 7
  • what have you tried so far? please post your thought process, and in the best case provide a stackblitz if something does not work. also I'd recommend to have a look at the ngx-charts documentation https://swimlane.gitbook.io/ngx-charts/v/docs-test/ or the source code of the example – Nicolas Gehlert May 25 '18 at 12:52

1 Answers1

0

This post in a github discussion explains why components like combo-chart (useful but a bit more complex) aren't included in the ngx-charts library. Instead, those use cases are featured in the demo section, where you can view the source code and the final look and feel.

As far as I can tell, the best way to integrate the combo-chart is to create a combo-chart.component in your own project and copy the source code into it. You will need to include the ngx-charts library and change any imports that rely on the local structure of the demo to point to that library instead.

For example, in combo-chart.component.ts

import { NgxChartsModule, <other imports> } from '../../src';

would become

import { NgxChartsModule, <other imports> } from '@swimlane/ngx-charts';
Maya Sol
  • 391
  • 4
  • 10