Add a prop to HTML Axis components to use pixels and not percentages
Closed this issue · 2 comments
mhkeller commented
Currently, the Axis components use percentages so they can be used in server-side charts. But you may want to use them also in normal charts that don't use percentRange
if, for example, you want an easy to way to make a multi-line label in HTML.
All you have to do is change %
to px
and we could expose this a prop to make it easy for people.
mhkeller commented
This could also be done dynamically looking at the percentRange
prop at first:
export let units = $percentRange === true ? '%' : 'px';