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

feat(tooltip): pass datum to customHTML callback function #1879

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

SMassola
Copy link
Contributor

@SMassola SMassola commented Aug 23, 2024

Updates

  • updated handler for tooltip show event to extract the datum from the event details and pass it as an argument to the customHTML callback function if one was specified within the chart options

Close #1518

Details

The raw data point/points provided to the chart is not what gets propagated to the tooltip's customHTML callback function.

This PR tries to address that issue by providing the "datum" associated with the hovered element as an argument to the customHTML callback, however, this solution still does not propagate the raw data point/points passed to the chart as certain charts will modify the datum with extraneous properties.

This solution was chosen due to its unobtrusiveness rather than its preciseness. Ideally, the raw data would be passed as an argument to the customHTML callback but it was unclear how to accomplish this without the solution getting more involved.

Other issues

#774
#1426

- updated handler for tooltip show event to extract the datum
from the event details and pass it as an argument to the customHTML
callback function if one was specific within the chart options

Close carbon-design-system#1518

Signed-off-by: Steven Massola <steven.massola@ibm.com>
@SMassola SMassola requested review from theiliad and a team as code owners August 23, 2024 21:48
Copy link

netlify bot commented Aug 23, 2024

Deploy Preview for carbon-charts-react ready!

Name Link
🔨 Latest commit ff86d01
🔍 Latest deploy log https://app.netlify.com/sites/carbon-charts-react/deploys/66c903a89dce5d0009cbc32f
😎 Deploy Preview https://deploy-preview-1879--carbon-charts-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Aug 23, 2024

Deploy Preview for carbon-charts-angular ready!

Name Link
🔨 Latest commit ff86d01
🔍 Latest deploy log https://app.netlify.com/sites/carbon-charts-angular/deploys/66c903a89b2050000837e47a
😎 Deploy Preview https://deploy-preview-1879--carbon-charts-angular.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Aug 23, 2024

Deploy Preview for carbon-charts-docs ready!

Name Link
🔨 Latest commit ff86d01
🔍 Latest deploy log https://app.netlify.com/sites/carbon-charts-docs/deploys/66c903a8eac9580008b0b071
😎 Deploy Preview https://deploy-preview-1879--carbon-charts-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Aug 23, 2024

Deploy Preview for carbon-charts-core ready!

Name Link
🔨 Latest commit ff86d01
🔍 Latest deploy log https://app.netlify.com/sites/carbon-charts-core/deploys/66c903a8eff9ab0008fc2b70
😎 Deploy Preview https://deploy-preview-1879--carbon-charts-core.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@theiliad theiliad merged commit 9a76784 into carbon-design-system:master Aug 28, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants