Ported coffee charts to js


Signed-off-by: Sheik Hassan <solergiga@yahoo.com>
Remove `idx` and just assign `x = xLabels.push(x.toString()) - 1;` inside the `if` block