Skip to content

Make datalabels property optional in PluginOptionsByType interface - #381

Closed
cluzier wants to merge 1 commit into
chartjs:masterfrom
cluzier:master
Closed

cluzier wants to merge 1 commit into
chartjs:masterfrom
cluzier:master

Conversation

@cluzier

@cluzier cluzier commented May 15, 2023

Copy link
Copy Markdown

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
Copy Markdown
Contributor

See PR #376

@cluzier

cluzier commented May 15, 2023

Copy link
Copy Markdown
Author

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
Copy Markdown
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
Copy Markdown
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

cluzier commented May 26, 2023

Copy link
Copy Markdown
Author

@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.

2 participants