我有一个表格,显示每个月的Windows日志的EventID计数。
现在我希望在Line-Diagram中有这个,你可以将EventID作为标签,yAxis上的计数和xAxis上的月份。
这是我做的:
的jsfiddle
如何反转轴?
当我这样尝试时,它不起作用:
chart: { inverted: true },任何帮助将非常感激。 :)
I have a table which shows the EventID Count for Windows Logs for every month.
And now I would like to have this in a Line-Diagram where you have the EventIDs as the label, the count on the yAxis and the month on the xAxis.
Here is what I did:
jsFiddle
How do I invert the Axis?
When I try it like this it's not working:
chart: { inverted: true },Any help would be much appreciated. :)
最满意答案
您可以使用数据模块中的switchRowsAndColumns选项来实现此目的。
示例( JFiddle ):
data: { table: document.getElementById('datatable'), switchRowsAndColumns: true }数据模块没有详细记录,但可以在源代码的顶部注释/文档中找到选项。
You can use the switchRowsAndColumns option from the data module to achieve this.
Example (JFiddle):
data: { table: document.getElementById('datatable'), switchRowsAndColumns: true }The data module isn't that well documented, but the options can be found in the source code, in the comments/documentation at the top.
更多推荐
发布评论