spectre.console icon indicating copy to clipboard operation
spectre.console copied to clipboard

Adding ValueFormatter and LabelColor to BarChart

Open jsheely opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. The BreakdownChart has the ability to do ValueFormatter but Barchart does not.

Describe the solution you'd like I 've added the ValueFormatter to the Barchart so that you can format numbers like 1234 -> 1,234

Additional context I've also the ability to color the label of the Barchart label using a property

I have a PR ready for this but opening an issue as per request.


Please upvote :+1: this issue if you are interested in it.

jsheely avatar Nov 26 '23 23:11 jsheely

I can split these into two separate issues if needed but for my project needs I wanted them both.

  • The ValueFormatter seems inline with how the other class works and seems straight forward.
  • The colorization using a property instead of relying on the [green] notation is a little more subjective.

Let me know your thoughts and I will adjust accordingly.

jsheely avatar Nov 28 '23 20:11 jsheely