使用表中的数据在高图图表上反转轴(Invert axis on highchart diagram with data from table)

编程入门 行业动态 更新时间:2024-10-08 00:26:00
使用表中的数据在高图图表上反转轴(Invert axis on highchart diagram with data from table)

我有一个表格,显示每个月的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.

更多推荐

本文发布于:2023-07-17 10:05:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1142699.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:转轴   图图   表上   数据   Invert

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!