diff --git a/API.txt b/API.txt index 4ca03da..0df039b 100644 --- a/API.txt +++ b/API.txt @@ -914,6 +914,26 @@ Currently available hooks (when in doubt, check the Flot source): series. If the function fills in datapoints.points with normalized points and sets datapoints.pointsize to the size of the points, Flot will skip the copying/normalization step for this series. + + In any case, you might be interested in setting datapoints.format, + an array of objects for specifying how a point is normalized and + how it interferes with axis scaling. + + The default format array for points is something along the lines of: + + [ + { x: true, number: true, required: true }, + { y: true, number: true, required: true } + ] + + The first object means that for the first coordinate it should be + taken into account when scaling the x axis, that it must be a + 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 + nulls. Beyond these you can also specify "default". If the + coordinate is null and default is set, then default is used for the + value. This is for instance handy for bars where we can omit the + third coordinate (the bottom of the bar) which then defaults to 0. - processDatapoints [phase 3] diff --git a/NEWS.txt b/NEWS.txt index faf886a..df75aa3 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -89,8 +89,8 @@ Changes: - Hooks: you can register functions that are called while Flot is crunching the data and doing the plot. This can be used to modify - Flot without changing the source, useful for writing plugins. At - this point only some hooks are defined. + Flot without changing the source, useful for writing plugins. Some + hooks are defined, more are likely to come. - Threshold plugin: you can set a threshold and a color, and the data points below that threshold will then get the color. Useful for @@ -102,7 +102,9 @@ Changes: - Crosshairs plugin: trace the mouse position on the axes, enable with crosshair: { mode: "x"} (see the new tracking example for a use). - + +- Image plugin: plot prerendered images. + Bug fixes: @@ -140,6 +142,8 @@ Bug fixes: with vertical lines. - Round tick positions to avoid possible problems with fractions (suggestion by Fred, issue 130). +- Made the heuristic for determining how many ticks to aim for a bit + smarter. Flot 0.5 diff --git a/examples/hs-2004-27-a-large_web.jpg b/examples/hs-2004-27-a-large_web.jpg new file mode 100644 index 0000000..a1d5c05 Binary files /dev/null and b/examples/hs-2004-27-a-large_web.jpg differ diff --git a/examples/image.html b/examples/image.html new file mode 100644 index 0000000..177ea88 --- /dev/null +++ b/examples/image.html @@ -0,0 +1,45 @@ + + +
+ +The Cat's Eye Nebula (picture taken with Hubble).
+ +With the image plugin, you can plot images. This is for example + useful for getting ticks on complex prerendered visualizations. + Instead of inputting data points, you put in the images and where + their two opposite corners are supposed to be in plot space.
+ +Images represent a little further complication because you need + to make sure they are loaded before you can use them (Flot skips + incomplete images). The plugin comes with a couple of helpers + for doing that.
+ + + + + diff --git a/examples/index.html b/examples/index.html index 1255948..8d881de 100644 --- a/examples/index.html +++ b/examples/index.html @@ -35,7 +35,8 @@