Stat: Refactor sparkline js.

- Reuse drawing logic for drawing all bars in the beginning
- Better naming
Stats: Style views label.

Style the views label in sparkline.