Skip to content

Add pie chart#357

Merged
hpehl merged 1 commit intopatternfly-java:mainfrom
mskacelik:pie-chart
Feb 3, 2026
Merged

Add pie chart#357
hpehl merged 1 commit intopatternfly-java:mainfrom
mskacelik:pie-chart

Conversation

@mskacelik
Copy link
Contributor

@mskacelik mskacelik commented Jan 29, 2026

Closes #113

  • added pie chart
    Few notes:
  • added a colorScale as part of the PieElement, but it seems that Donut chart can also have color scale.
  • when starting the j2cl instance I always needed to execute the jbang script in the showcase dir:
    i.e.: jbang code.java . && npm run watch for the code snippet to be updated, iirc this was not needed in my component implementations.
  • colors are not dependent on the theme (this is the same way for the Donut chart), but in the react example they are
  • also "tooltip" is a bit different (it overflows), the same way in the Donut chart--this is not happening in the react's example

@hpehl
Copy link
Contributor

hpehl commented Jan 29, 2026

Thanks @mskacelik, will have a look asap.

I think the color/theme issue is probably related to the fact that the React components in PatternFly Java live in the shadow DOM rather than in the 'normal' DOM as in PatternFly React. Thus the CSS variables are unknown. I need to check how this can be fixed.

@hpehl
Copy link
Contributor

hpehl commented Jan 29, 2026

Regarding the theming/colors there's a CSS import missing in showcase/src/web/main.js:

import "@patternfly/patternfly/patternfly-charts.css";

With this in place the theming works.

@mskacelik
Copy link
Contributor Author

Regarding the theming/colors there's a CSS import missing in showcase/src/web/main.js:

import "@patternfly/patternfly/patternfly-charts.css";

With this in place the theming works.

can confirm that did the trick :)

Also rebased the project.

@hpehl hpehl self-requested a review February 3, 2026 10:19
Copy link
Contributor

@hpehl hpehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mskacelik !

@hpehl hpehl merged commit 2233fe5 into patternfly-java:main Feb 3, 2026
1 check passed
@mskacelik mskacelik deleted the pie-chart branch February 3, 2026 11:35
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.

Implement pie chart

2 participants