Mitcheljager/svelte-tiny-linked-charts

Minimum bar height to make it visible that value is not zero?

Closed this issue ยท 8 comments

Thanks for this tiny library! ๐Ÿ˜ƒ

Is there a way I can tell svelte-tiny-linked-charts to draw at least a pixel for the bar, so it's visible something is there?

svelte-tiny-linked-charts_marker

With high fluctuation, sometimes very low numbers are not shown, you can't see that something happened.

It would be great to have something like barMinHeight when the value is > 0.

Just an additional thought, fully optional: if you want to be more flexible than >0, an additional barMinHeightValue=1 could be used to trigger barMinHeight to be drawn.

Hi! It's not currently possible but I will see what I can do!

Fixed with 7ca2436. You can use the barMinHeight property to specify a minimum height in pixels.

That is really awesome, thank you! ๐ŸŽ‰

@Mitcheljager: minBar is even showing when the value is absolutely zero.

svelte-tiny-linked-charts_zero

The idea was to show the barMinHeight when value is > 0.

Zero: show nothing. Larger zero: make sure to show something.

By the way: typo "Mimumum" in the docs

@bluepuma77 I see what you mean, I didn't quite understand that from your original issue. I will see what I can do!

@bluepuma77 I've added a new hideBarBelow prop, which when set to 1 will hide bars with 0 as a value. However I also fixed your question in a different way. Bars will now always round up, so your original set up might now work even without the 2 new props.

@Mitcheljager Thanks you soo much! Sounds very promising.

Can you update https://www.npmjs.com/package/svelte-tiny-linked-charts ? Thanks again ๐Ÿฅณ