From a4c7fa34fbda4244256fa183a415a30568f9d34b Mon Sep 17 00:00:00 2001 From: "olau@iola.dk" Date: Wed, 1 Apr 2009 15:22:04 +0000 Subject: [PATCH] Clarify how to set tick labels (issue 144) git-svn-id: https://flot.googlecode.com/svn/trunk@149 1e0a6537-2640-0410-bfb7-f154510ff394 --- API.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/API.txt b/API.txt index 3b31050..fb4fc10 100644 --- a/API.txt +++ b/API.txt @@ -232,10 +232,12 @@ an array for "ticks", either like this: ticks: [0, 1.2, 2.4] -Or like this (you can mix the two if you like): +Or like this where the labels are also customized: ticks: [[0, "zero"], [1.2, "one mark"], [2.4, "two marks"]] +You can mix the two if you like. + For extra flexibility you can specify a function as the "ticks" parameter. The function will be called with an object with the axis min and max and should return a ticks array. Here's a simplistic tick