chartjs-funnel is not supported?
(npm install chartjs-funnel --save)
Thanks
You should be able to register the chartjs-funnel plugin and use it as documented.
Here's how to register a plugin:
Import Chart from chart.js at the top of your file, as well as the funnel plugin:
import { BaseChartDirective } from 'ng2-charts';
import * as funnelPlugin from 'chartjs-funnel';
Then in your constructor (or other initialization function), register the plugin:
BaseChartDirective.registerPlugin(funnelPlugin);
@paviad the way you described above will register plugin for every chart in the component. It does not work well with "chartjs-plugin-datalabels" where you only want a specific chart has the label.
There is a property on the chart directive called plugins in which you can pass a set of plugins to be used only for that chart and not globally. See this line at the demo app
public lineChartPlugins = [pluginAnnotations]
In the case of chartjs-plugin-datalabels it registers itself automatically globally, so you have to unregister it specifically at startup, for example, like this:
export class AppModule {
constructor() {
BaseChartDirective.unregisterPlugin(pluginDataLabels);
}
}
@paviad it work. thanks : )
You should be able to register the chartjs-funnel plugin and use it as documented.
Here's how to register a plugin:
Import
Chartfromchart.jsat the top of your file, as well as the funnel plugin:import { BaseChartDirective } from 'ng2-charts'; import * as funnelPlugin from 'chartjs-funnel';Then in your constructor (or other initialization function), register the plugin:
BaseChartDirective.registerPlugin(funnelPlugin);
Hi, Could you show me the documentation, I cannot find any more about ng-charts with funnelPugin