Skip to content

Conversation

@vrg84
Copy link

@vrg84 vrg84 commented Sep 16, 2025

Updates

Core

  • Exposed enums LegendEvent and Roles
  • Exposed helper functions from /packages/core/src/tools.ts.

@vrg84 vrg84 requested review from a team and theiliad as code owners September 16, 2025 13:22
@netlify
Copy link

netlify bot commented Sep 16, 2025

Deploy Preview for carbon-charts-react ready!

Name Link
🔨 Latest commit adb4bb0
🔍 Latest deploy log https://app.netlify.com/projects/carbon-charts-react/deploys/68c964b12ec6a80008516bcd
😎 Deploy Preview https://deploy-preview-2032--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 project configuration.

@netlify
Copy link

netlify bot commented Sep 16, 2025

Deploy Preview for carbon-charts-angular ready!

Name Link
🔨 Latest commit adb4bb0
🔍 Latest deploy log https://app.netlify.com/projects/carbon-charts-angular/deploys/68c964b1bf00360008291b4a
😎 Deploy Preview https://deploy-preview-2032--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 project configuration.

@netlify
Copy link

netlify bot commented Sep 16, 2025

Deploy Preview for carbon-charts-docs ready!

Name Link
🔨 Latest commit adb4bb0
🔍 Latest deploy log https://app.netlify.com/projects/carbon-charts-docs/deploys/68c964b190448600084a0d38
😎 Deploy Preview https://deploy-preview-2032--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 project configuration.

@carbon-bot
Copy link
Collaborator

carbon-bot commented Sep 16, 2025

All contributors have signed the DCO.
Posted by the DCO Assistant Lite bot.

@netlify
Copy link

netlify bot commented Sep 16, 2025

Deploy Preview for carbon-charts-core ready!

Name Link
🔨 Latest commit adb4bb0
🔍 Latest deploy log https://app.netlify.com/projects/carbon-charts-core/deploys/68c964b2bf00360008291b4c
😎 Deploy Preview https://deploy-preview-2032--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 project configuration.

@vrg84
Copy link
Author

vrg84 commented Sep 16, 2025

I have read the DCO document and I hereby sign the DCO.

@vrg84
Copy link
Author

vrg84 commented Sep 16, 2025

Recheck

@theiliad
Copy link
Member

Hi @vrg84, I'm curious why we'd want these functions being exported?
image

these are internal tools that might change at any point

@vrg84
Copy link
Author

vrg84 commented Sep 19, 2025

Hi @vrg84, I'm curious why we'd want these functions being exported?

these are internal tools that might change at any point

The library doesn’t provide a grouped + stacked bar chart. Since we need this feature, we extended Bar and followed the approach in bar-grouped.ts to a version that suits our needs.

The helpers (generateSVGPathString, getProperty, flipSVGCoordinatesBasedOnOrientation, mergeDefaultChartOptions, updateLegendAdditionalItems) have some non-trivial logic. I figured that reimplementing them outside the library risks inconsistencies if they change.

The goal of using the same helpers is keeping our custom chart behavior visually and functionally consistent with the library.

image

@theiliad
Copy link
Member

theiliad commented Sep 19, 2025

The library doesn’t provide a grouped + stacked bar chart. Since we need this feature, we extended Bar and followed the approach in bar-grouped.ts to a version that suits our needs.

@vrg84 why not contribute the grouped stacked bar chart instead?

@vrg84
Copy link
Author

vrg84 commented Sep 19, 2025

The library doesn’t provide a grouped + stacked bar chart. Since we need this feature, we extended Bar and followed the approach in bar-grouped.ts to a version that suits our needs.

@vrg84 why not contribute the grouped stacked bar chart instead?

I wish i could, i just dont have the time right now take it to where it needs to be. Its at a bare minimum to fit our needs.

Having said that, i do realize the exposed tools are only ever used in creating a new chart / extending the functionality... i'll see if i can make time to create a proper issue for it instead and start/share the work, maybe more people can contribute.

@theiliad
Copy link
Member

The library doesn’t provide a grouped + stacked bar chart. Since we need this feature, we extended Bar and followed the approach in bar-grouped.ts to a version that suits our needs.

@vrg84 why not contribute the grouped stacked bar chart instead?

I wish i could, i just dont have the time right now take it to where it needs to be. Its at a bare minimum to fit our needs.

Having said that, i do realize the exposed tools are only ever used in creating a new chart / extending the functionality... i'll see if i can make time to create a proper issue for it instead and start/share the work, maybe more people can contribute.

would you like to share your current code that achieves the grouped+stacked bar functionality? and maybe I could get it into the library, no promises though 🙂

@vrg84
Copy link
Author

vrg84 commented Sep 19, 2025

The library doesn’t provide a grouped + stacked bar chart. Since we need this feature, we extended Bar and followed the approach in bar-grouped.ts to a version that suits our needs.

@vrg84 why not contribute the grouped stacked bar chart instead?

I wish i could, i just dont have the time right now take it to where it needs to be. Its at a bare minimum to fit our needs.
Having said that, i do realize the exposed tools are only ever used in creating a new chart / extending the functionality... i'll see if i can make time to create a proper issue for it instead and start/share the work, maybe more people can contribute.

would you like to share your current code that achieves the grouped+stacked bar functionality? and maybe I could get it into the library, no promises though 🙂

Yes! I have no expectations since it seems like theres still a lot of work to do, but I ported it into my fork:
https://github.com/vrg84/carbon-charts/tree/grouped-stacked-bar-chart

I've taken some steps to make it run with a simple example (located in
https://github.com/vrg84/carbon-charts/blob/grouped-stacked-bar-chart/packages/docs/src/lib/bar/examplesGroupedStacked.ts

image

But like i said, this implementation was tailored to our needs (it was the best i can do in a few days), this is still missing from the top of my head:

  • Extended tooltip, its not clear now which "stack" you are looking at. We've customized it with the customHTML tooltip but i guess there should be a default for it
  • Table view has not been implemented
  • CSV export has not been implemented
  • Only the vertical orientation works like it should
  • Only the labels scaleType has been tested

It was fun diving into the library and d3.js for a bit 😄thanks for your time!

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.

3 participants