Blog Archive for May 15, 2011

Unique Tooltips per Point using Flot

May 15, 2011

I wanted to have unique tooltips on my points on a line chart generated using flot. I achieved this using the following code.

Data

My data series includes matching tooltips in the label field. These were in the same order as the data items.

{
    label: [
        ["21st …

Tags: flot tooltip

JavaScript Charts with Flot

May 15, 2011

Here's a simple line chart built with flot. The data is hardcoded into the page and is generated using a Django template.

HTML

We need to import jquuery and flot, and also excanvas for ie support.

<!--[if lte IE 8]><script type="text/javascript" src="/site_media/flot/excanvas.min.js"></script><![endif]-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>
<script src= …