Flot Example

Flot is a pure Javascript plotting library for jQuery. It produces graphical plots of arbitrary datasets on-the-fly client-side. The focus is on simple usage (all settings are optional), attractive looks and interactive features like zooming and mouse tracking. The plugin works with Internet Explorer 6+, Firefox 2.x+, Safari 3.0+, Opera 9.5+ and Konqueror 4.x+ with the HTML canvas tag (the excanvas Javascript emulation helper is used for IE < 9).

HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/flot/0.8.2/jquery.flot.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/flot/0.8.2/jquery.flot.categories.min.js"></script>
<!-- flot CDN : http://ko.cdnjs.com/libraries/flot -->
<h1>Flot Examples</h1> 
 
<div id="placeholder" style="width:600px;height:300px;"></div>

JavaScript

var d2 = [["aaa", 3], ["bbbb", 8], ["vvvv", 5], ["ddsdsd", 13]];

$.plot($("#placeholder"), [ d2 ],{
    xaxis: {
        mode: 'categories',
        tickFormatter: function(v, axis) {
            return '[' + v + ']';
        }
    }
});