square / cubism

Cubism.js: A JavaScript library for time series visualization.

Home Page:https://square.github.com/cubism/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to start to use Cubism

lagrwilson opened this issue · comments

I am new to cube and to cubism. and new to Javascript.
I've successfully gotten quite a few collections and metrics running in Cube. I'd like to use Cubism now to send cube queries and have Cubism graphically show the data.

If II have a cube query like below, how do I write a cubism html page which will graph the results?

http://127.0.0.1:1081/1.0/metric/get?expression=sum(cubePerformanceMeter(queryTime))/sum(cubePerformanceMeter)&start=2014-06-10&stop=2014-06-11&step=864e5

Have a look at the random example is Cube's static folder: https://github.com/square/cube/blob/master/static/random/index.html

You should be able to replace/add/remove calls to cube.metric in that file to start working with your own metrics.