Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PieChart labels don't support extended format string syntax #2046

Open
sykoram opened this issue Oct 14, 2023 · 0 comments
Open

PieChart labels don't support extended format string syntax #2046

sykoram opened this issue Oct 14, 2023 · 0 comments

Comments

@sykoram
Copy link

sykoram commented Oct 14, 2023

Steps to reproduce

  1. Define custom class inheriting from PieSlice with some custom property to use in the labels (eg. PropertyX)
  2. Create PieSeries where the InsideLabelFormat or OutsideLabelFormat includes the custom property ("... {PropertyX} ...")
  3. 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.

@sykoram 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
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

No branches or pull requests

1 participant