Add Charts to your wapka site..

Hi there, today i will teach you to add charts to your wapka site to display data.. today we will create pie chart and will display data in it with labels..

Actually you can't create these charts in wapka, so that for this purpose we will use Google Chart API... The Google API is free and hundred % better than any other codes!!

Lets start our tutorial...

Goto your wapka site and after that navigate to ES > WML/xHTML CODE > insert the following code in it and then save



You should see the following picture...


Wohoooo! we done it. Now let's personalize it with our data..

Just goto the above code and see the following parameters in image URL..

cht=p3: You can change p3 with any other chart formats but this is not the scope of this tutorial.. p3 means Pie Chard with 3d Dimensions

chs=250x100: This parameter declares the chart size.. current is 250x100, you can change it with any other value. i.e. 100x100 etc. The values should be like "width"x"height"

chd=t:60,40: This parameter represents the chart data in numbers, you can add more data by seperating with a comma.. i.e. t:60,40,30,20.

chl=Hello|World: This represents the labels for your data.. In our above example we have two values 60 and 40 and in last we have four values so we can assign four labels.. for 60 we will assign A and for 40 we will assign B, for 30 we will assign C and for 20 we will assign D.. No if we moderate the parameter, the parameter will look like this chl=A|B|C|D notice that we have seperated each labels with | So that way you can assign more labels, but remeber that you should add labels according to your values.. For example: if your values are 4 you must assign 10 labels for them..

Note that, you will have to seperate each parameter with & sign.
Now, lets check our moderated chart below..



code for above chart is


That way you can use charts to display data or display some usefull information.. You can also include it in :userstats: tag.. I will write more tutorials on it that will illustrate use of charts in :userstats: and :filelist: or :forumlist: and more tags.. But that's it for now, enjoy wapka!!

Create your own free wapsite in minutes

5 comments:

You are always welcome to add comments and suggestion about the tutoiral. Please note that, we do not allow misuse and if you have any questions write briefly so that our moderators can understand your message and reply as early as possible.