Skip to content

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 strings 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 argument (like many other formatters), 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
@cyrilf cyrilf deleted the patch-1 branch October 26, 2024 23:22
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