From 26cf412e78be7925cea38fe9c9b39eac332501a2 Mon Sep 17 00:00:00 2001 From: "olau@iola.dk" Date: Fri, 11 Mar 2011 21:21:34 +0000 Subject: [PATCH] Add reverse axis example to API git-svn-id: https://flot.googlecode.com/svn/trunk@305 1e0a6537-2640-0410-bfb7-f154510ff394 --- API.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/API.txt b/API.txt index 392df77..d0c6ac1 100644 --- a/API.txt +++ b/API.txt @@ -249,6 +249,14 @@ into a natural logarithm axis with the following code: inverseTransform: function (v) { return Math.exp(v); } } +Similarly, for reversing the y axis so the values appear in inverse +order: + + yaxis: { + transform: function (v) { return -v; }, + inverseTransform: function (v) { return -v; } + } + Note that for finding extrema, Flot assumes that the transform function does not reorder values (it should be monotone).