Mike Bostock edited this page Apr 16, 2013 · 9 revisions

WikiAPI ReferenceCube

A source for Cube metrics. To create a source, first create a context. Then, use context.cube to specify the URL of the Cube evaluator. For example:

var context = cubism.context(), // a default context
    cube = context.cube("http://cube.example.com");

# cube.metric(expression)

Creates a new metric for the given Cube expression. For example, if you were using Cube to collect "request" events, you could query the number of request events by saying:

var requests = cube.metric("sum(request)");

For more information on metric expressions, see Cube's documentation.

# cube.toString()

Returns the URL of the Cube server; the first argument to the constructor.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.