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

Make datalabels property optional in PluginOptionsByType interface #381

Closed
wants to merge 1 commit into from

Conversation

cluzier
Copy link

@cluzier cluzier commented May 15, 2023

This pull request addresses an error in the code by making the datalabels property optional in the PluginOptionsByType interface. The change allows for more flexibility in configuring the datalabels plugin for different chart types.

Changes Made:

  • Modified the PluginOptionsByType interface to make the datalabels property optional.
  • Updated the relevant TypeScript declarations and typings.

Testing Done:

  • Tested the modified code with various chart types and verified that the datalabels plugin works as expected.
  • Ensured the existing functionality and compatibility with other parts of the codebase were not affected.

@stockiNail
Copy link
Contributor

See PR #376

@cluzier
Copy link
Author

cluzier commented May 15, 2023

See PR #376

Is there a fix for those of us who are using TS? I read through the comments but doesn't seem like there was any sort of solution.

@stockiNail
Copy link
Contributor

See PR #376

Is there a fix for those of us who are using TS? I read through the comments but doesn't seem like there was any sort of solution.

The both PRs are going to apply the same change which is a workaround to solve the issue #374.
Therefore the answer is yes but there are some doubts if this change makes really sense (setting default type) or if not better to fix it (if possible) in main repo of Chart.js.

@stockiNail
Copy link
Contributor

@cluzier the issue is not related to the plugin but is in CHART.JS. See comment chartjs/Chart.js#11288 (comment) and PR which is fixing this issue: chartjs/Chart.js#11309

The bug fixing will be released in next CHART.JS version and nothig to do in datalabels. I think you could close this PR.

@cluzier cluzier closed this May 26, 2023
@cluzier
Copy link
Author

cluzier commented May 26, 2023

@cluzier the issue is not related to the plugin but is in CHART.JS. See comment chartjs/Chart.js#11288 (comment) and PR which is fixing this issue: chartjs/Chart.js#11309

The bug fixing will be released in next CHART.JS version and nothig to do in datalabels. I think you could close this PR.

Thank you for clearing this up for me!

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.

None yet

2 participants