y-axis ticks label cannot be fully displayed when there are too many decimals
cnwangjie opened this issue · 4 comments
If the data is so small that ticks have 6 decimal places, this will cause the following situation:
This is the code that will cause this problem: https://jsfiddle.net/wangjie/0zu4L1wn/
Expected Results:
By manually increasing the width of SVG.
@cnwangjie any chance you could come up with a fix? :)
@wlach I didn't notice before that we can solve this problem by setting the left
argument manually.
Its default value is 50
, we can set it to 60 or higher to make the ticks display completely.
I have just seen a similar issue (#838) can be solved this way.
This may be a common problem. If we don't intend to make the ticks appear intact automatically, we should probably tell the user about it.
When not specified, it would be nice if we could calculate the left
argument automatically based on the length of the ticks. This does seem like an ok workaround for now though!