我需要开发一个基于时间间隔的堆叠图:
基本上,我有10个不同的时间间隔,我想要显示在此时间间隔上堆叠的所有值,例如:
绘制图形的数据集示例:
Time interval - Name of the group - Number of jobs
2 minutes Group A 5
2 minutes Group B 10
2 minutes Group C 15
4 mi
我有一个具有以下结构的数据集
[
[
[ product 1 ,shelf number, position on the tray, time of stay on the shelf, was sold?], # Hour 1
[ product 1 ,shelf number, position on the tray, time of stay on the shelf, was sold?], # Hour 2
[ product 1 ,shelf number, position on the tray, time of stay on the shelf, was
我有一个堆叠的条形图,它非常适合我正在寻找的东西。我的问题是如何处理标签。 我可以用它的值(number)来标记每个堆叠的条形图,但我希望用它的名称(在图例上)来标记它。 有没有人有办法解决这个问题? 附言:不幸的是,我还不能上传图片。 I have something like this:
####
#15#
####
oooo ####
oooo #35#
o55o ####
oooo ####
oooo o12o
And need like this
我为美国每个州的4个数据值绘制了一个堆叠的条形图。我一直在处理的CSV文件如下所示: ? 下面是我为堆叠条形图编写的JS代码: // Read the data from CSV
d3.csv('https://raw.githubusercontent.com/krithikaragha/ResPy/master/Flask%20App/static/data/tobacco_use_by_state.csv', function(data) {
var chartData = []; // Array containing all the trace