Skip to main content

jmaki multiple chart

1 reply [Last post]
Joined: 2007-09-25

I've downloaded and tested jmaki charting package from web site.
There is a multiple chart option with PHP.I reviewed the source code and I'd like to know how can i read the excel data dynamically and insert into the array like $args: labels [.......]
$args = "{
xAxis : {
title : 'Months',
labels : ['January', 'February', 'March']
yAxis : {
title : 'Temperature',
tickCount : 3
$value = "{data : [
{color: 'red', values : [10,5, 25] },
{color: 'green', values : [15,65, 35] },
{color: 'yellow', values : [115,55, 25] },
{color: 'blue', values : [5, 20, 10] }

addWidget("jmaki.charting.line", null,$args, $value);
Because I'm working on PHP and Mysql with data from excel sheet and so how can i read the data dynamically from excel.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-07-31

So you can use a service to load the data from an external source.

The service is the third argument to which you point to a URL.

I would suggest you just put the data (same as what was used as the value ) in a php file and then provide the URL to the php as the 2nd argument. You will not need to provide the value argument.

If you are using the latest jMaki 1.0 (released today hurray!) we allow you to pass in the data as associative arrays which is a little easier to read:

addWidget( array("name" => "jmaki.charting.line",
"service => "yourDataPHP.php",
"args" => $args ) );

We plan to update the charting examples soon and I'll make sure we have an example that shows this better.