-
Notifications
You must be signed in to change notification settings - Fork 631
Description
Feature description
Hey! Some time ago I made a sorting visualizer by utilizing this great library and I'd like to add support for visualizing via pie plots, but I can't exactly do this as I'd like because:
- I can't specify what color I'd like an element to have (see photo 1)
- I can't hide the element's text (see photo 2)
Additionally, if it's possible I'd like to be able to set the weight/size of each element to be an equal amount to each (this is very visible in photo 1, the 12'o'clock right element is bigger than the left one).
Feature videos/screenshots
Below I have attached some context screenshots amongst with some very ugly and hacky changes I attempted to made.
Photo 1: Can't specify colors for the pie elements.

Fix: Called a custom function here to generate a color based on the element's value.
Line 2302 in 81b8b19
| ImU32 col = GetCurrentItem()->Color; |
Photo 2: Can't hide element's text

Fix: removed these lines
Lines 2363 to 2364 in 81b8b19
| ImU32 col = CalcTextColor(ImGui::ColorConvertU32ToFloat4(item->Color)); | |
| draw_list.AddText(pos - size * 0.5f, col, buffer); |
Photo 3: With both limits mitigated, this is something I'd like to have (note that the additional request I mentioned isn't that visible now).

The first problem (and the additional one) could maybe be solved via a flag, but for the second I'm not sure what the best solution would be.
These requests sound a bit odd for a normal pie chart usecase but if these are not fit to be made for this library that's fine.
If this issue could have better been split into separate ones please mention to do so and close this one.
I'm sorry if I missed the obvious, haven't touched implot/imgui for a long while, thanks for the wonderful library and welcome new maintainer (: