ClassNames for the custom values made with segmentValueFormatter() #195
Replies: 2 comments 5 replies
-
|
Hi ... Can you share an example snippet of what behaviour your are looking for and a comparison with current behaviour? If you can share an example snippet outlining your needs, it would be easy for me to get the context. |
Beta Was this translation helpful? Give feedback.
-
|
My suggestion is to directly make use of DOM classnames You could then target these DOM elements and change them as per your requirements. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello :)
Was making some speedometers and was looking to style the values from segmentValueFormatter(). but it doesn't seem like it's possible to return a className to the custom value, because the function only returns a string.
So currently i'm using a hook to call a useEffect after it's rendered to add a className. was wondering if you're open to a PR to make it possible to return className to the custom values.
I see that the current open PRs are kind of old, so i'll drop this discussion here to see if it's something you'd want :)
the speedometer components looking clean 👍
Will also drop a picture of how it currently looks. It's a visualization of energy usage. and i wanted the Δ% to just be styled differently so it doesn't look the same. The Δ% is the % increase over the average usage.
Beta Was this translation helpful? Give feedback.
All reactions