-
Notifications
You must be signed in to change notification settings - Fork 42
Numeral
Wiki ▸ API Reference ▸ Numeral
The function polyjs.numeral()
takes a specification object spec
and renders a single number. This number could be the value of some statistical operation on one of the data columns. This page explains the attributes that can be set through the spec
object. The attributes fall into the following categories:
Actually, there is only one aesthetic var
. It should be mapped to the data column (or statistics) whose value you would like displayed.
Type | Aesthetic Mapping Object |
Statistical Aggregation | Allowed |
Type | Polyjs Data Object |
Required | Yes |
This should be a Polychart.js data object that is used to created the numeral. See the data section of the API reference for more details.
Type | Filter Object |
Required | No (Optional) |
This is an optional attribute that could be defined if not all data points are to be visualized. See more at Filter.
Type | String |
Required | Yes |
A DOM element or an identifier of a DOM element to plot the numeral in.
Type | Int |
Required | No (Optional) |
Default | 200 |
The width of the numeral in pixels.
Type | Int |
Required | No (Optional) |
Default | 100 |
The height of the numeral in pixels.
Type | String |
Required | No (Optional) |
Default | The aesthetic mapped to `spec.var` |
The title of the numeral.