Zen33 / vue-sparklines

Sparkline chart built with Vue.
MIT License
66 stars 23 forks source link

Bar width can become negative #6

Closed agross closed 5 years ago

agross commented 5 years ago

I have 40 data points on the default 100px wide Bar sparkline. When I reach 40 events (also due to limit="40") the bars become invisible and the browser logs errors that it cannot paint a rect that has negative width.

Error: <rect> attribute width: A negative value is not valid. ("-1")

The actual width computed by this statement is -1.5.

Zen33 commented 5 years ago

Could you please provide piece of codes to reproduce this problem? I will follow up and fix it in the next version. Thanks so much.

agross commented 5 years ago
2019-11-17_22-42-13

https://github.com/agross/vue-sparklines-issues/tree/606ee792d4cee6f30b5164f3116530d9ad87e52c

Zen33 commented 5 years ago

I have fixed this issue in version @0.2.1, you could update vue-sparklines, thanks.

agross commented 5 years ago

Thanks!