diff --git a/API.txt b/API.txt index 8f5c351..67b9705 100644 --- a/API.txt +++ b/API.txt @@ -53,14 +53,15 @@ not connected. The format of a single series object is as follows: { - color: color or number, - data: rawdata, - label: string, - lines: specific lines options, - bars: specific bars options, - points: specific points options, - xaxis: 1 or 2, - yaxis: 1 or 2, + color: color or number + data: rawdata + label: string + lines: specific lines options + bars: specific bars options + points: specific points options + threshold: specific threshold options + xaxis: 1 or 2 + yaxis: 1 or 2 clickable: boolean hoverable: boolean shadowSize: number @@ -429,6 +430,11 @@ Customizing the data series shadowSize: number + threshold: { + below: number + color: color + } + The most important options are "lines", "points" and "bars" that specifies whether and how lines, points and bars should be shown for each data series. In case you don't specify anything at all, Flot will @@ -477,6 +483,10 @@ extra colors by lightening and darkening colors in the theme. "shadowSize" is the default size of shadows in pixels. Set it to 0 to remove shadows. +"threshold" specifies that the data points below "below" should be +drawn with the specified color. This makes it easy to mark points +below 0, e.g. for budget data. + Customizing the grid ==================== diff --git a/NEWS.txt b/NEWS.txt index ed8afe3..f2b1478 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -46,7 +46,12 @@ Changes: data (and fixes issue 112). - Step-wise charting: line charts have a new option "steps" that when - set to true connects the points with steps instead of diagonal lines. + set to true connects the points with horizontal/vertical steps + instead of diagonal lines. + +- Thresholding: you can set a threshold and a color, and the data + points below that threshold will then get the color. Useful for + marking data below 0, for instance. Bug fixes: diff --git a/examples/index.html b/examples/index.html index a3ccdf7..3f116ed 100644 --- a/examples/index.html +++ b/examples/index.html @@ -16,7 +16,7 @@