epezent / epezent/implot

Pie chart colours flickering if data labels change, even with static `##` IDs

Open
#466 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
6.2k
Forks
693
PR merge metrics
No merged PRs in 30d

Description

I have a simple pie chart with 4 pieces of data. I also wanted to display some percentage as part of the legend (as I am unsure how to do it on hover with pie-chart, or if it's even doable).

However, changing the data label, causes the colours to change. For example, here's one set of colours.

![1](https://user-images.githubusercontent.com/893115/231037147-bc6b72fb-7d57-42ed-a8dd-406367c07301.png)

Then when data changes, so does the label: and I get a new set of colours.

![2](https://user-images.githubusercontent.com/893115/231037154-be6f9d61-66ce-45d6-a127-86bd14bf197c.png)

I confirmed that if I remove the percentage display from label, colours stay static. So one may think that this is because of changing label IDs.

So I did what I usually do: assign static label IDs with `##`. As expected, the `##some_id` is not displayed: however, it does not solve the issue and the problem persists. On the screenshots above, you can see the data being fed in at the bottom and the static labels.

Is there some way to achieve what I'm describing? Is this just an oversight in `implot`?

I apologise for no code sample as my code is in Rust, using `implot` via some bindings. If you need, I can try to replicate in C++, it should be very simple...

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.