-
Notifications
You must be signed in to change notification settings - Fork 526
API Reference
Vladimir Vuksan edited this page Apr 6, 2015
·
29 revisions
Wiki ▸ API Reference
Everything in Cubism is scoped under the cubism
namespace. To get started, see cubism.context.
- cubism.context - create a new context.
- cubism.option - parse the query string for an optional parameter.
- cubism.options - parse the query string for optional parameters.
- cubism.version - determine the current semantic version number.
- context.step - get or set the context step in milliseconds.
- context.size - get or set the context size in number of values.
- context.serverDelay - get or set the context server-side delay in milliseconds.
- context.clientDelay - get or set the context client-side delay in milliseconds.
- context.on - add, get or remove a listener for context events.
- context.graphite - create a source for Graphite metrics.
- context.cube - create a source for Cube metrics.
- context.librato - create a source for Librato metrics.
- context.constant - create a constant-value metric.
- context.horizon - create a horizon chart.
- context.comparison - create a comparison chart.
- context.axis - create an axis.
- context.rule - create a rule.
- context.focus - focus the specified index (for mousemove interaction).
- context.scale - get the x-scale.
- context.stop - stop the context, pausing any events.
- context.start - restart the context.
- context.metric - define a new metric implementation.
- gangliaWeb.metric - create a Ganglia metric.
- gangliaWeb.toString - returns title of the metric.
- graphite.metric - create a Graphite metric.
- graphite.find - query the Graphite server to find metrics.
- graphite.toString - get the Graphite host URL.
- cube.metric - create a Cube metric.
- cube.toString - get the Cube host URL.
- librato.metric - create a Librato metric.
- metric.valueAt - get the value of the metric at the given index.
- metric.extent - get the minimum and maximum metric value.
- metric.add - add another metric or constant to this metric.
- metric.subtract - subtract another metric or constant from this metric.
- metric.multiply - multiply this metric by another metric or constant.
- metric.divide - divide this metric by another metric or constant.
- metric.shift - time-shift this metric.
- metric.on - add, get or remove a listener for "change" events.
- metric.context - get the metric's parent context.
- metric.toString - get the metric's associated expression, if any.
- horizon - apply the horizon chart to a D3 selection.
- horizon.mode - get or set the horizon mode ("offset" or "mirror").
- horizon.height - get or set the chart height in pixels.
- horizon.metric - get or set the chart metric.
- horizon.scale - get or set the y-scale.
- horizon.extent - get or set the chart extent (if not automatic).
- horizon.title - get or set the chart title.
- horizon.format - get or set the chart's value format function.
- horizon.colors - get or set the horizon layer colors.
- horizon.remove - remove the horizon chart from a D3 selection.
- comparison - apply the comparison chart to a D3 selection.
- comparison.height - get or set the chart height in pixels.
- comparison.primary - get or set the primary metric.
- comparison.secondary - get or set the comparison metric.
- comparison.scale - get or set the y-scale.
- comparison.extent - get or set the chart extent (if not automatic).
- comparison.title - get or set the chart title.
- comparison.formatPrimary - get or set the primary value format function.
- comparison.formatChange - get or set the percentage change format function.
- comparison.colors - get or set the comparison colors (positive and negative).
- comparison.stroke - get or set the primary metric's stroke color.
- comparison.strokeWidth - get or set the primary metric's stroke width.
- comparison.fill - get or set the primary metric's fill color.
- comparison.remove - remove the chart from a D3 selection.
- axis - apply an axis generator to a D3 selection.
- axis.orient - get or set the axis orientation.
- axis.ticks - control how ticks are generated for the axis.
- axis.tickSubdivide - optionally subdivide ticks uniformly.
- axis.tickSize - specify the size of major, minor and end ticks.
- axis.tickPadding - specify padding between ticks and tick labels.
- axis.tickFormat - override the tick formatting for labels.
- axis.remove - remove the axis from a D3 selection.
- rule - apply a rule generator to a D3 selection.
- rule.metric - generate rules at each non-zero value for the given metric.
- rule.remove - remove the rule from a D3 selection.