简体   繁体   English

如何使用给定的表格在 Apache Superset 中显示折线图?

[英]How to display line chart in Apache Superset with given table?

I am completely new to Apache Superset.我对 Apache Superset 完全陌生。 I am trying to display one respectively several countries as line chart.我想分别显示一个几个国家作为折线图。 However, with the given structure of my table, I don't get it how the parameters must be set in order to achieve this.但是,对于我的表的给定结构,我不明白必须如何设置参数才能实现这一点。

I have a table which looks like this ( here is the complete CSV file ):我有一个看起来像这样的表(这是完整的 CSV 文件):

Albania   1995  251
Albania   1996  313.96
Albania   1997  376.93
Albania   1998  439.89
Albania   1999  502.86
Albania   2000  565.82

I have »Time Series Line Chart« selected.我选择了»时间序列折线图«。 It should clearly depict the years on the x-axis and the values on the y-axis.它应该清楚地描绘 x 轴上的年份和 y 轴上的值。 Not sure what the »Metrics« should be set to.不确定应该将»Metrics« 设置为什么。 (I always wonder as well why there are only »SUM«, »AVG« etc. as default, and not the »real«, distinct value). (我也一直想知道为什么只有 »SUM«、»AVG« 等作为默认值,而不是 »real« 不同的值)。

在此处输入图片说明

Thanks for any advice!感谢您的任何建议!

Please check the link . 请检查链接 It has a video created by Amit Singh on how to create time series line chart in Apache Superset. 它有一个由Amit Singh创建的关于如何在Apache Superset中创建时间序列折线图的视频。

If you chose aggregated data, Superset must know how to show data on repeated keys.如果选择聚合数据,Superset 必须知道如何在重复键上显示数据。 There is an option in the current version of Superset (1.0.1) to choose whether you want to show aggregated data or raw records.当前版本的 Superset (1.0.1) 中有一个选项可以选择是要显示聚合数据还是原始记录。 In addition, I could say that if you have a date column you can choose a time grain for it (month, year, etc.).另外,我可以说,如果你有一个日期列,你可以为它选择一个时间粒度(月、年等)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM