Open ghost opened 5 months ago
Thanks for pointing this out @samuelhafsteinsson! The problem can be solved by providing a tickValues
array to the Axis component explicitly: https://unovis.dev/docs/auxiliary/Axis#set-ticks-explicitly. We'll need to update the docs to mention it.
cc @reb-dev @lee00678
In the documentation about ordinal values: https://unovis.dev/docs/guides/tips-and-tricks/#displaying-ordinal-values
It is recommended to use a NumericAccessor with a StringAcessor in the
tickFormat
to get an ordinal scale. However the documentation show that the following code snippet should work:A problem with that snippet is, the tick can be a float and thus the code will throw an error as it cannot index the array with a float. The fix I implemented is using
Number.isInteger
as so:Versions: