Question

Now i am using the amcharts to draw a chart in my application.The chart.dataProvider's format is as follows:

var chartData = [
{
    "date": "2012-01-01",
    "duration": {
        "aa" : 534   
    }
},
{
    "date": "2012-01-02",
    "duration": {
        "aa" : 534   
    }
},
{
    "date": "2012-01-04",
    "duration": {
        "aa" : 534   
    }
},
{
    "date": "2012-01-06",
    "duration": {
        "aa" : 534   
    }
},
{
    "date": "2012-01-07",
    "duration": {
        "aa" : 534   
    }
}];

and now i want to set "aa" to graph.valueField, Can be achieved? and if so, how to do?

p.s. I can not change my existing data formats.

Was it helpful?

Solution

You can't use this as a data provider. If you can't change the original, then you'll have to create another object where value is not in a object.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top