Skip to content

feat: Add dot pattern for pie chart#2083

Open
jay-k98 wants to merge 1 commit intoimaNNeo:mainfrom
jay-k98:feature/pie-chart-pattern
Open

feat: Add dot pattern for pie chart#2083
jay-k98 wants to merge 1 commit intoimaNNeo:mainfrom
jay-k98:feature/pie-chart-pattern

Conversation

@jay-k98
Copy link
Copy Markdown
Contributor

@jay-k98 jay-k98 commented Apr 16, 2026

Pattern support for PieCharts was requested in #2082.

This Pull Request will implement this feature.

Solution

Adding a [DotPattern] class to hold required data. Both [PieChartSectionData] and [PieChartStackSegmentData] will accept an optional pattern parameter that defaults to DotPattern.disabled().

When a section is painted, dots are drawn over the full section fill if pattern is enabled. Each stack segment is then painted on top. Segments with their own pattern get dots drawn clipped to that segment's bounds only.

-> Open for optimizations :)

Todo's and Improvements

  • Add more patterns
  • Add tests
  • Add documentation
  • Add patterns to other chart types

Signed-off-by: Jonas Klock <jonas.klock@exxeta.com>
@jay-k98 jay-k98 changed the title [ADD] dot pattern for pie chart feat: Add dot pattern for pie chart Apr 16, 2026
@imaNNeo
Copy link
Copy Markdown
Owner

imaNNeo commented Apr 18, 2026

Hi @jay-k98
Thanks for your solution.
It is similar to #1958
So I would wait until we find a good solution for that.
I don't think having some for loops to have a pattern is efficient and performant.
I suggested using shaders, but I'm still not sure what's the best way to implement it.

Let's see how it goes with #1958

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.

2 participants