You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Define custom class inheriting from PieSlice with some custom property to use in the labels (eg. PropertyX)
Create PieSeries where the InsideLabelFormat or OutsideLabelFormat includes the custom property ("... {PropertyX} ...")
Try to render the plot
Expected behaviour
The plot is successfully rendered with the labels containing the values of the custom property.
Actual behaviour
An exception is thrown.
Fix (?)
I'm not familiar with the whole OxyPlot's code, but looking at the PieSeries class, the fix might be really easy: just replacing two string.Format statements in Render method with StringHelper.Format. I can create a pull request if all it takes is really just these small changes.
The text was updated successfully, but these errors were encountered:
sykoram
changed the title
PieChart labels doesn't support extended format string syntax
PieChart labels don't support extended format string syntax
Oct 14, 2023
Steps to reproduce
PropertyX
)InsideLabelFormat
orOutsideLabelFormat
includes the custom property ("... {PropertyX} ..."
)Expected behaviour
The plot is successfully rendered with the labels containing the values of the custom property.
Actual behaviour
An exception is thrown.
Fix (?)
I'm not familiar with the whole OxyPlot's code, but looking at the PieSeries class, the fix might be really easy: just replacing two
string.Format
statements inRender
method withStringHelper.Format
. I can create a pull request if all it takes is really just these small changes.The text was updated successfully, but these errors were encountered: