using jqbargraph to create beautiful graphs

You are viewing revision #1 of this wiki article.
This is the latest version of this article.

If you are about to create a graph, the best option i would suggest is the jqbargraph.

The advantages of jqbargraph is

  1. its very easy to install
  2. it is very simple to use.
  3. it contains 3 types of graph (simple multi and stacked)
  4. easy customization like colors spaces etc..

So to begin with..

First you need to download the extension and put this is your extensions folder

Now like most of the other widgets you need to configure it in config/main file


Now you can use the jqbargraph by calling the widget


Now the parameters may vary based on the type of graph you need lets start with the simple graph.

this one is the most commonly used graph


if you are using simple graph

you should give the first parameter

  • type => simple

The other parameters are

  1. color1: color of the first bar.

  2. color2:color of the second bar.

  3. width:width of each bar.

  4. space:space between each bar.

  5. title:title of the graph, will be shown on the top of the graph.

  6. values: Most important, should be an multidimensional array like this.


so the final code will be

'title'=>'simple graph'));

Now second type of graph is the multigraph


In order to use multigraph the type you should give is

  • type=>multi

the other attributes are much similar except we need to give arrays for the colors and legends .

the final code will be like this

'title'=>'multi graph'));

The third type of graph is stacked graph.


This has the same parameters as the multigraph except the type

the type should be

  • type => stacked

so the final code will be like this

'title'=>'stacked graph'));

you can see the live demo here


Mahesh E.U

5 0
Viewed: 10 975 times
Version: Unknown (update)
Category: Tips
Written by: MAHESH.E.U
Last updated by: MAHESH.E.U
Created on: Mar 19, 2013
Last updated: 9 years ago
Update Article


View all history

Related Articles