【发布时间】:2022-01-06 08:13:26
【问题描述】:
在上面的例子中,我使用下面的代码创建了 highchart 表。
Highcharts.chart('container', {
title: {
text: 'Solar Employment Growth by Sector, 2010-2016'
},
subtitle: {
text: 'A demo of displaying a data table in Highcharts'
},
credits: {
text: 'Source: thesolarfoundation.com'
},
chart: {
borderWidth: 1,
borderColor: '#ccc',
spacingBottom: 30
},
yAxis: {
title: {
text: 'Number of Employees'
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle'
},
plotOptions: {
series: {
pointStart: 2010
}
},
series: [{
name: 'Installation',
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
}, {
name: 'Manufacturing',
data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434]
}, {
name: 'Sales & Distribution',
data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387]
}, {
name: 'Project Development',
data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227]
}, {
name: 'Other',
data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]
}],
exporting: {
showTable: true
}
});
以上部分,
exporting: {
showTable: true
}
这部分负责生成highchart数据表。我得到的表应该恢复,即行到列,列到行。
我已经尝试使用 javascript dom 操作来转换它,但我需要一些特定的方法只用于 highchart。
【问题讨论】:
标签: javascript angular highcharts