I have a DevExpress SunburstControl displaying folders and their byte sizes, were the sizes are used as the values for the control. Hence, the text in the center displays "Root: 162781888417" (meaning 152 GB) when CenterLabel.TextPattern is set to "Root: {TV}".
However, I want to display this size differently depending on, well, the size...
- Root size in byte => Shown text
- 162781888417 => 152 GB
- 8234489 => 7,85 MB
- 1047552 => 1 023 kB
- 40584 => 39,6 kB
I already have code converting between bytes and other units, what I miss is a way to tell the center label to use that conversion code.
So in short: How do I make the center label show different texts based on the value?