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

Update types to add missing arguments and return types #4772

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

cyrilf
Copy link
Contributor

@cyrilf cyrilf commented Oct 25, 2024

Fixing types

1️⃣

The dataLabels formatter can return an array. It will display both string on a separate line.
You can see this usage in this demo: Treemap color range

dataLabels: {
  ...
  formatter: function(text, op) {
    return [text, op.value]
  },
  ...
},

We can see further down in the code that the function is handling the case where text is an array:

if (Array.isArray(text)) {


2️⃣

The tooltip y formatter, accepts a second arguments (like many other formatter). It's opts?: any and is missing.
This one fixes #4762

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings

@junedchhipa junedchhipa merged commit d41a0cd into apexcharts:main Oct 25, 2024
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.

Type from the tooltip y title formatter is missing arguments
2 participants