来自Datable的json groupby数据
我希望从这里使用这个amCharts库来实现一些可视化。 我已经序列化了我的datatable,但它似乎不起作用,我不确定如何按4个类别/区域分组 任何帮助/建议都会大有帮助来自Datable的json groupby数据,json,sql-server,amcharts,Json,Sql Server,Amcharts,我希望从这里使用这个amCharts库来实现一些可视化。 我已经序列化了我的datatable,但它似乎不起作用,我不确定如何按4个类别/区域分组 任何帮助/建议都会大有帮助 var groupData = [ { "name": "EU member before 2004", "color": chart.colors.getIndex(0), "data": [ {
var groupData = [
{
"name": "EU member before 2004",
"color": chart.colors.getIndex(0),
"data": [
{
"title": "Austria",
"id": "AT", // With MapPolygonSeries.useGeodata = true, it will try and match this id, then apply the other properties as custom data
"customData": "1995"
}, {
"title": "Ireland",
"id": "IE",
"customData": "1973"
}, {
"title": "Denmark",
"id": "DK",
"customData": "1973"
}, {
"title": "Portugal",
"id": "PT",
"customData": "1986"
}
]
},
{
"name": "Joined at 2004",
"color": chart.colors.getIndex(1),
"data": [
{
"title": "Lithuania",
"id": "LT",
"color": chart.colors.getIndex(1),
"customData": "2004",
"groupId": "2004"
}, {
"title": "Latvia",
"id": "LV",
"color": chart.colors.getIndex(1),
"customData": "2004",
"groupId": "2004"
}
},
{
"name": "Joined at 2007",
"color": chart.colors.getIndex(3),
"data": [
{
"title": "Romania",
"id": "RO",
"customData": "2007"
}, {
"title": "Bulgaria",
"id": "BG",
"customData": "2007"
}
]
},
{
"name": "Joined at 2013",
"color": chart.colors.getIndex(4),
"data": [
{
"title": "Croatia",
"id": "HR",
"customData": "2013"
}
]
}
];