-
Notifications
You must be signed in to change notification settings - Fork 42
API Reference
Wiki ▸ API Reference
All functionality within Polychart.js is scoped under polyjs. This object contains three methods:
polyjs.chart(): Chart Construction
This is the primary function in Polychart.js. A chart is created and put into the DOM when polyjs.chart(spec) is called, where spec is the specification object. The function will return a chart object, which can be used to define interaction behaviours.
polyjs.pivot(): Pivot Table Construction
Create a pivot table based on the specification.
polyjs.numeral(): Numeral Construction
Create a single numerical value based on the specification.
polyjs.data(): Data
This function takes a data set in JSON or CSV format or an AJAX endpoint that would return such data, and creates a Polychart.js data object, which is to be used in the specification object. The data object has several functions that makes it easier to add new columns, rename columns, and otherwise interact with the data. See the section data for specifics.
polyjs.interact(): Interactions
Once a chart object is created, interaction handlers may be added to the chart via this method call. See the section on interactions for more details.