Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
F
flot
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HS-public
flot
Commits
151e96fb
Commit
151e96fb
authored
Jan 10, 2013
by
David Schnur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expand documentation of the point format options.
parent
1e685b04
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
10 deletions
+30
-10
API.md
API.md
+30
-10
No files found.
API.md
View file @
151e96fb
...
@@ -1247,9 +1247,21 @@ hooks in the plugins bundled with Flot.
...
@@ -1247,9 +1247,21 @@ hooks in the plugins bundled with Flot.
In any case, you might be interested in setting datapoints.format,
In any case, you might be interested in setting datapoints.format,
an array of objects for specifying how a point is normalized and
an array of objects for specifying how a point is normalized and
how it interferes with axis scaling.
how it interferes with axis scaling.
It accepts the following options:
The default format array for points is something along the lines of:
```js
{
x, y: boolean,
number: boolean,
required: boolean,
defaultValue: value,
autoscale: boolean
}
```
"x" and "y" specify whether the value is plotted against the x or y axis,
and is currently used only to calculate axis min-max ranges. The default
format array, for example, looks like this:
```js
```js
[
[
...
@@ -1258,14 +1270,22 @@ hooks in the plugins bundled with Flot.
...
@@ -1258,14 +1270,22 @@ hooks in the plugins bundled with Flot.
]
]
```
```
The first object means that for the first coordinate it should be
This indicates that a point, i.e. [0, 25], consists of two values, with the
taken into account when scaling the x axis, that it must be a
first being plotted on the x axis and the second on the y axis.
number, and that it is required - so if it is null or cannot be
converted to a number, the whole point will be zeroed out with
If "number" is true, then the value must be numeric, and is set to null if
nulls. Beyond these you can also specify "defaultValue", a value to
it cannot be converted to a number.
use if the coordinate is null. This is for instance handy for bars
where one can omit the third coordinate (the bottom of the bar)
"defaultValue" provides a fallback in case the original value is null. This
which then defaults to 0.
is for instance handy for bars, where one can omit the third coordinate
(the bottom of the bar), which then defaults to zero.
If "required" is true, then the value must exist (be non-null) for the
point as a whole to be valid. If no value is provided, then the entire
point is cleared out with nulls, turning it into a gap in the series.
"autoscale" determines whether the value is considered when calculating an
automatic min-max range for the axes that the value is plotted against.
-
processDatapoints
[
phase 3
]
-
processDatapoints
[
phase 3
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment