简体   繁体   English

以年份为横轴的时间堆栈图

[英]Time Stack Chart with years as horizontal axis

I want to add a stacked chart but could not find a way to customize the time-axis.我想添加一个堆叠图表,但找不到自定义时间轴的方法。

Currently my x-axis refers to days, however, I search for a way to display years.目前我的 x 轴指的是天,但是,我正在寻找一种显示年份的方法。 Since I want a stacked chart that changes over time, I believe I need to use the 'Time Stack Chart' (see screenshot).由于我想要一个随时间变化的堆叠图表,我相信我需要使用“时间堆叠图表”(见截图)。 I would also be happy with simply several stacked bars next to each other (each bar represents one year), but the 'Bar Chart' only supports one bar (I believe).我也会很高兴有几个堆叠在一起的条形图(每个条形图代表一年),但“条形图”只支持一个条形图(我相信)。

My model collects data from different sources on the last day of the year and then my chart should display this value for the year, categorized by source.我的 model 在一年的最后一天从不同来源收集数据,然后我的图表应该显示该年度的值,按来源分类。 I have tried with different data sets, both where the time is the horizontal value and where it is not.我尝试过使用不同的数据集,无论时间是水平值还是不是水平值。

When I use a dataset where one value is 'Years' (through the getYear() function) this works fine for plots, but not when I want to have a stacked chart (which by default depends on the time).当我使用一个值为“年”的数据集(通过 getYear() 函数)时,这适用于绘图,但当我想要堆叠图表时(默认情况下取决于时间)则不行。

Is there a solution to this?有针对这个的解决方法吗? Please let me know if you need further information!如果您需要更多信息,请告诉我!

在此处输入图像描述

You need to go to the appearance part, time axis format, set it to yyyy .你需要 go 到外观部分,时间轴格式,设置为yyyy Also in the scale section, you need to change model time units to years.同样在刻度部分,您需要将 model 时间单位更改为年。

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

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