Skip to content
leonardoeloy edited this page Sep 14, 2010 · 5 revisions

Introduction

This is a fork of Value Labels, a Flot plugin originally developed by Petr Blahos.

The main purpose here is to be able to show the y-axis value inside the canvas, providing a better understanding of the graph. Petr’s version did this by appending DIVs to the canvas, which works perfectly. But when printing the page, these DIVs lose their absolute position, and that’s when we hear clients screaming!

Since the chart prints nicely and Flot uses HTMLCanvasElement, I thought that giving the canvas’ fillText function a try I could print these charts the way I needed. It worked.

Also, I had a requirement in which I needed to show only the last value of the series inside the chart. Check it out in the Usage section below.

Examples

Here’s how Value Labels orginally works:

Clone this wiki locally