Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support plugins for chartjs #643

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

bchekuri
Copy link

@bchekuri bchekuri commented Jun 15, 2017

Hi Jerome,

Good afternoon. In my project I was planning to use chartjs plugins. but I could not, so I added new directive to support that on the top of your code. I know I have to create issue, but its not an issue, It's kind of enhancement

@ngotoandev
Copy link

we have need for this too - can this get merged?

@sanderboom
Copy link

sanderboom commented Oct 19, 2017

I'm also looking for support for plugins. Any advice on how to implement/combine angular-chart.js with chartjs-plugin-datalabels (e.g.: https://chartjs-plugin-datalabels.netlify.com/samples/charts/bar.html)? Especially when packaging with webpack. Thanks!

@jasonfah
Copy link

@jtblin any chance this could be merged? Nice and simple but adds a huge amount of functionality and access to all the plugin events.

@abhinav1602
Copy link

abhinav1602 commented May 30, 2018

@bchekuri If I am using your version of the library, how can I apply plugins now? If it is through a directive then, what is the directive name to be used in the canvas?

@jasonfah
Copy link

@abhinav1602 there's a somewhat hacky way to do what you need with the current version. This is how I've done it.

this.$scope.$on('chart-create', (event, chart) => {
  chart.config.plugins = {
    afterDraw: this.drawRelativeBand,
  };
  chart.update();

  this.chartInstance = chart;
});

geoffreak added a commit to geoffreak/angular-chart.js that referenced this pull request May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants