I have been reading a number of posts here and still am struggling with the proper method for binding series to the "columns" of a datasource.
The issue I am running up against is that I don't have control over the datasource (generic webservice call), but I need to be able to put it into the proper chart structure.
Assume my web service call returns the following:
rows: [
{ Dept: "Shoes", Q1: 100, Q2: 200, Q3: 220, Q4: 180 },
{ Dept: "Shirts", Q1: 140, Q2: 160, Q3: 390, Q4: 200 },
{ Dept: "Pants", Q1: 180, Q2: 190, Q3: 400, Q4: 320 },
{ Dept: "Tops", Q1: 520, Q2: 600, Q3: 425, Q4: 570 }
]
What I am looking for is to create a line chart where the each department is a category and the series is Q1 - Q4. The problem is, I don't know in advance that I will get for the "columns" (i.e Q1 - Q4). It might be a range of years from 2005 - 2013, or it may be a set of months Jan - Dec.
Is there a way to do this generically?
The issue I am running up against is that I don't have control over the datasource (generic webservice call), but I need to be able to put it into the proper chart structure.
Assume my web service call returns the following:
rows: [
{ Dept: "Shoes", Q1: 100, Q2: 200, Q3: 220, Q4: 180 },
{ Dept: "Shirts", Q1: 140, Q2: 160, Q3: 390, Q4: 200 },
{ Dept: "Pants", Q1: 180, Q2: 190, Q3: 400, Q4: 320 },
{ Dept: "Tops", Q1: 520, Q2: 600, Q3: 425, Q4: 570 }
]
What I am looking for is to create a line chart where the each department is a category and the series is Q1 - Q4. The problem is, I don't know in advance that I will get for the "columns" (i.e Q1 - Q4). It might be a range of years from 2005 - 2013, or it may be a set of months Jan - Dec.
Is there a way to do this generically?