From 1fd4de1b25398954e9ab43e54d0d0fdf1b5cfce0 Mon Sep 17 00:00:00 2001 From: Frank Wuerthwein Date: Sat, 14 Mar 2009 20:01:55 -0400 Subject: flot-0.6pre@147 --- examples/basic.html | 2 +- examples/dual-axis.html | 2 +- examples/graph-types.html | 12 +++++- examples/index.html | 6 +-- examples/interacting.html | 2 +- examples/selection.html | 6 ++- examples/setting-options.html | 4 +- examples/thresholding.html | 52 +++++++++++++++++++++++++ examples/time.html | 2 +- examples/tracking.html | 90 +++++++++++++++++++++++++++++++++++++++++++ examples/turning-series.html | 2 +- examples/visitors.html | 4 +- examples/zooming.html | 8 ++-- 13 files changed, 174 insertions(+), 18 deletions(-) create mode 100644 examples/thresholding.html create mode 100644 examples/tracking.html (limited to 'examples') diff --git a/examples/basic.html b/examples/basic.html index afd7ac1..fde8def 100644 --- a/examples/basic.html +++ b/examples/basic.html @@ -4,7 +4,7 @@ Flot Examples - + diff --git a/examples/dual-axis.html b/examples/dual-axis.html index d97fa8a..03a94e6 100644 --- a/examples/dual-axis.html +++ b/examples/dual-axis.html @@ -4,7 +4,7 @@ Flot Examples - + diff --git a/examples/graph-types.html b/examples/graph-types.html index 64aa0e9..b3c3818 100644 --- a/examples/graph-types.html +++ b/examples/graph-types.html @@ -4,7 +4,7 @@ Flot Examples - + @@ -36,7 +36,11 @@ $(function () { var d5 = []; for (var i = 0; i < 14; i += 0.5) d5.push([i, Math.sqrt(i)]); - + + var d6 = []; + for (var i = 0; i < 14; i += 0.5 + Math.random()) + d6.push([i, Math.sqrt(2*i + Math.sin(i) + 5)]); + $.plot($("#placeholder"), [ { data: d1, @@ -58,6 +62,10 @@ $(function () { data: d5, lines: { show: true }, points: { show: true } + }, + { + data: d6, + lines: { show: true, steps: true } } ]); }); diff --git a/examples/index.html b/examples/index.html index 36ae0a1..3f116ed 100644 --- a/examples/index.html +++ b/examples/index.html @@ -4,7 +4,7 @@ Flot Examples - + @@ -16,11 +16,11 @@ diff --git a/examples/interacting.html b/examples/interacting.html index b5c8003..5cb59d0 100644 --- a/examples/interacting.html +++ b/examples/interacting.html @@ -4,7 +4,7 @@ Flot Examples - + diff --git a/examples/selection.html b/examples/selection.html index 4a745d7..56cb3db 100644 --- a/examples/selection.html +++ b/examples/selection.html @@ -4,7 +4,7 @@ Flot Examples - + @@ -90,6 +90,10 @@ $(function () { xaxis: { min: ranges.xaxis.from, max: ranges.xaxis.to } })); }); + + placeholder.bind("plotunselected", function (event) { + $("#selection").text(""); + }); var plot = $.plot(placeholder, data, options); diff --git a/examples/setting-options.html b/examples/setting-options.html index 31dd798..b0570b2 100644 --- a/examples/setting-options.html +++ b/examples/setting-options.html @@ -4,7 +4,7 @@ Flot Examples - + @@ -53,7 +53,7 @@ $(function () { max: 2 }, grid: { - backgroundColor: "#fffaff" + backgroundColor: { colors: ["#fff", "#eee"] } } }); }); diff --git a/examples/thresholding.html b/examples/thresholding.html new file mode 100644 index 0000000..7d29294 --- /dev/null +++ b/examples/thresholding.html @@ -0,0 +1,52 @@ + + + + + Flot Examples + + + + + + +

Flot Examples

+ +
+ +

You can apply a specific color to the part of a data series + below a threshold. This is can be useful for highlighting negative + values, e.g. when displaying net results or what's in stock.

+ +

+ + + +

+ + + + + diff --git a/examples/time.html b/examples/time.html index f810a28..d1dd4e3 100644 --- a/examples/time.html +++ b/examples/time.html @@ -4,7 +4,7 @@ Flot Examples - + diff --git a/examples/tracking.html b/examples/tracking.html new file mode 100644 index 0000000..722f960 --- /dev/null +++ b/examples/tracking.html @@ -0,0 +1,90 @@ + + + + + Flot Examples + + + + + + +

Flot Examples

+ +
+ +

You can add crosshairs that'll track the mouse position, either + on both axes or as here on only one.

+ +

If you combine it with listening on hover events, you can use + it to track the intersection on the curves by interpolating + the data points.

+ +

+ + + + + diff --git a/examples/turning-series.html b/examples/turning-series.html index 83fb134..7b25479 100644 --- a/examples/turning-series.html +++ b/examples/turning-series.html @@ -4,7 +4,7 @@ Flot Examples - + diff --git a/examples/visitors.html b/examples/visitors.html index 919f903..13440fa 100644 --- a/examples/visitors.html +++ b/examples/visitors.html @@ -4,7 +4,7 @@ Flot Examples - + @@ -60,7 +60,7 @@ $(function () { lines: { show: true, lineWidth: 1 }, shadowSize: 0, xaxis: { ticks: [], mode: "time" }, - yaxis: { ticks: [], min: 0, max: 4000 }, + yaxis: { ticks: [], min: 0, autoscaleMargin: 0.1 }, selection: { mode: "x" } }); diff --git a/examples/zooming.html b/examples/zooming.html index 0f3284b..d74f065 100644 --- a/examples/zooming.html +++ b/examples/zooming.html @@ -4,7 +4,7 @@ Flot Examples - + @@ -31,8 +31,10 @@ $(function () { // setup plot function getData(x1, x2) { var d = []; - for (var i = x1; i < x2; i += (x2 - x1) / 100) - d.push([i, Math.sin(i * Math.sin(i))]); + for (var i = 0; i <= 100; ++i) { + var x = x1 + i * (x2 - x1) / 100; + d.push([x, Math.sin(x * Math.sin(x))]); + } return [ { label: "sin(x sin(x))", data: d } -- cgit v1.2.3-2-g168b