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

Migration: Add support for datalabels plugin #40

Closed
SeppPenner opened this issue Sep 30, 2019 · 2 comments
Closed

Migration: Add support for datalabels plugin #40

SeppPenner opened this issue Sep 30, 2019 · 2 comments
Labels
from migration These issues were migrated from Joelius300s repository and more information can be found there

Comments

@SeppPenner
Copy link
Contributor

Migrated from Joelius300/ChartJSBlazor#34:

Maybe support https://github.com/chartjs/chartjs-plugin-datalabels.

I don't have an idea how at the moment, but it must be possible.

@Joelius300 Joelius300 added the from migration These issues were migrated from Joelius300s repository and more information can be found there label Nov 14, 2019
@Joelius300
Copy link
Contributor

As mentioned here you can configure the plugins on a per chart basis from now on (not released on nuget but implemented since #91). This means that all the per chart plugin configurations can be now done directly. You still need to implement the plugin option class youself (or use an anonymous object) and you also need to handle the registration directly via JavaScript (or interop). Also to configure the plugin on dataset level, you will need to subclass the dataset you're using and adding the plugin option there too.

Now this doesn't mean the datalabels plugin is supported, just plugins in general. But now we can start discussing how to implement this plugin. I'm thinking we might want another namespace, something like ChartJs.Blazor.Plugins (these are subject to change in #78), where we put configuration classes for the plugins that can then be used in the plugin options without having to write these classes yourself. For plugins that are very popular and benefit from configuration, this seems like a feature worth implementing.

As already mentioned in the original issue (back in the other repo), plugins have low priority for now. It's best to invest the available time for fixing current issues but I thought I'd update this issue.

@Joelius300
Copy link
Contributor

@larschristensen20 has provided a nice sample so I'll close this for now.

Thank you @larschristensen20!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from migration These issues were migrated from Joelius300s repository and more information can be found there
Projects
None yet
Development

No branches or pull requests

2 participants