-1

I'm trying to create an array of data from the MySQL database to make a dynamic FusionChart, but not how to create the data array, any help?

This is a static example of what I want to do

http://jsfiddle.net/fusioncharts/fumzvpw3/

"categories": [
    {
        "category": [
            {
                "label": "Central AC"
            },
            {
                "label": "Computers"
            },
            {
                "label": "Bar-code Scanners"
            },
            {
                "label": "Packaging Machines"
            },
            {
                "label": "Chilling Compartments"
            }
        ]
    }
],
"dataset": [
    {
        "seriesname": "Daly City Serramonte",
        "data": [
            {
                "value": "8",
                "errorvalue": "2"
            },
            {
                "value": "3",
                "errorvalue": "0.5"
            },
            {
                "value": "2",
                "errorvalue": "1"
            },
            {
                "value": "6",
                "errorvalue": "1.8"
            },
            {
                "value": "8",
                "errorvalue": "1.2"
            }
        ]
    },
    {
        "seriesname": "Bakersfield Central",
        "data": [
            {
                "value": "7",
                "errorvalue": "1"
            },
            {
                "value": "4",
                "errorvalue": "0.5"
            },
            {
                "value": "2",
                "errorvalue": "1"
            },
            {
                "value": "4",
                "errorvalue": "0.8"
            },
            {
                "value": "7",
                "errorvalue": "1"
            }
        ]
    },
    {
        "seriesname": "Garden Groove harbour",
        "data": [
            {
                "value": "9",
                "errorvalue": "2"
            },
            {
                "value": "3",
                "errorvalue": "0.7"
            },
            {
                "value": "3",
                "errorvalue": "1"
            },
            {
                "value": "6",
                "errorvalue": "1.8"
            },
            {
                "value": "7",
                "errorvalue": "1.2"
            }
        ]
    }
]

1 Answers1

0

You can check out this similar sample: https://www.dropbox.com/s/ruk3hth9xs6ejou/mschart_php-sql.rar?dl=0

Vishalika
  • 94
  • 4