new JqPlot()
- Source:
Members
getNextSeriesColor
Function to safely return colors from the color array and wrap around at the end.
- Source:
Methods
activateTheme(name)
Set the theme name on the plot.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | theme name. |
- Source:
bindCustomEvents()
Bind events attached to canvas.
- Source:
computePlotData()
- Source:
destroy()
method: destroy
Releases all resources occupied by the plot
- Source:
doFillBetweenLines()
- Source:
draw()
method: draw
Draws all elements of the plot into the container.
Does not clear the container before drawing.
- Source:
drawSeries(options, idx)
method: drawSeries
Redraws all or just one series on the plot. No axis scaling
is performed and no other elements on the plot are redrawn.
options is an options object to pass on to the series renderers.
It can be an empty object {}. idx is the series index
to redraw if only one series is to be redrawn.
Parameters:
Name | Type | Description |
---|---|---|
options |
object | options' series |
idx |
number | Optional index of the serie to redraw. |
- Source:
init(target, data, options)
Group: methods
method: init
sets the plot target, checks data and applies user
options to plot.
Parameters:
Name | Type | Description |
---|---|---|
target |
object | html id of the html element which chart is inserted into. |
data |
Array.<number> | data - chart data |
options |
object | options of the chart. |
- Source:
moveSeriesToBack(idx)
method: moveSeriesToBack
This method requires jQuery 1.4+
Moves the specified series canvas behind all other series canvases.
Parameters:
Name | Type | Description |
---|---|---|
idx |
string | index of the serie to move to back. 0 based index of the series to move. This will be the index of the series as it was first passed into the jqplot function. |
- Source:
moveSeriesToFront(idx)
method: moveSeriesToFront
This method requires jQuery 1.4+
Moves the specified series canvas in front of all other series canvases.
This effectively "draws" the specified series on top of all other series,
although it is performed through DOM manipulation, no redrawing is performed.
Parameters:
Name | Type | Description |
---|---|---|
idx |
string | index of the serie to move to front. 0 based index of the series to move. This will be the index of the series as it was first passed into the jqplot function. |
- Source:
onClick(ev)
Event handler onClick on event canvas.
Parameters:
Name | Type | Description |
---|---|---|
ev |
object | event |
- Source:
onDblClick(ev)
Event handler onDblClick on event canvas.
Parameters:
Name | Type | Description |
---|---|---|
ev |
object | event |
- Source:
onMouseDown(ev)
Event handler onMouseDown on event canvas.
Parameters:
Name | Type | Description |
---|---|---|
ev |
object | event |
- Source:
onMouseEnter(ev)
Event handler onMouseEnter on event canvas.
Parameters:
Name | Type | Description |
---|---|---|
ev |
object | event. |
- Source:
onMouseLeave(ev)
Event handler onMouseLeave on event canvas.
Parameters:
Name | Type | Description |
---|---|---|
ev |
object | event |
- Source:
onMouseMove(ev)
Event handler onMouseMove on event canvas.
Parameters:
Name | Type | Description |
---|---|---|
ev |
object | event |
- Source:
onMouseUp(ev)
Event handler onMouseUp on event canvas.
Parameters:
Name | Type | Description |
---|---|---|
ev |
object | event |
- Source:
onRightClick(ev)
Event handler onRightClick on event canvas.
Parameters:
Name | Type | Description |
---|---|---|
ev |
object | event |
- Source:
parseOptions(options)
Parameters:
Name | Type | Description |
---|---|---|
options |
object | options object to parse. |
- Source:
populatePlotData(series, index)
Populates the _stackData and _plotData arrays for the plot and the series.
Parameters:
Name | Type | Description |
---|---|---|
series |
Array.<object> | array object. |
index |
number | index of the serie. |
- Source:
quickInit()
method: quickInit
Quick reinitialization plot for replotting.
Does not parse options ore recreate axes and series.
not called directly.
- Source:
redraw(clear)
method: redraw
Empties the plot target div and redraws the plot.
This enables plot data and properties to be changed
and then to comletely clear the plot and redraw.
redraw *will not* reinitialize any plot elements.
That is, axes will not be autoscaled and defaults
will not be reapplied to any plot elements. redraw
is used primarily with zooming.
Parameters:
Name | Type | Description |
---|---|---|
clear |
boolean | false to not clear (empty) the plot container before redrawing (default: true). |
- Source:
reInitialize(data, opts)
method: reInitialize
reinitialize plot for replotting.
not called directly.
Parameters:
Name | Type | Description |
---|---|---|
data |
Array.<number> | data of plot. |
opts |
object | options of plot. |
- Source:
replot(clear, resetAxes)
method: replot
Does a reinitialization of the plot followed by
a redraw. Method could be used to interactively
change plot characteristics and then replot.
Parameters:
options - Options used for replotting.
Properties:
Parameters:
Name | Type | Description |
---|---|---|
clear |
boolean | false to not clear (empty) the plot container before replotting (default: true). |
resetAxes |
boolean | true to reset all axes min, max, numberTicks and tickInterval setting so axes will rescale themselves. optionally pass in list of axes to reset (e.g. ['xaxis', 'y2axis']) (default: false). |
- Source:
resetAxesScale(axes, options)
method: resetAxesScale
Reset the specified axes min, max, numberTicks and tickInterval properties to null
or reset these properties on all axes if no list of axes is provided.
Parameters:
Parameters:
Name | Type | Description |
---|---|---|
axes |
boolean | Boolean to reset or not reset all axes or an array or object of axis names to reset. |
options |
object | Options to reset. |
- Source:
restoreOriginalSeriesOrder()
method: restoreOriginalSeriesOrder
This method requires jQuery 1.4+
Restore the series canvas order to its original order
when the plot was created.
- Source:
restorePreviousSeriesOrder()
method: restorePreviousSeriesOrder
This method requires jQuery 1.4+
Restore the series canvas order to its previous state.
Useful to put a series back where it belongs after moving
it to the front.
- Source: