Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图制作浮点堆积图以在数组 x1,x2,x3... 和 y1,y2,y3... 中输入数据
我的折线图数据是这样制作的,所以我复制了它的 js 并做了一些更改,但条形图的宽度仍然与折线图相同。有什么建议吗?
http://jsfiddle.net/TXPWK/67/
问题是barWidth: 0.4。x1由于您在 x 轴上使用日期,因此x2、等之间的数值x3将是相对较大的值。如果您希望条形图比轴线宽得多,则必须设置barWidth为:
barWidth: 0.4
x1
x2
x3
barWidth
barWidth:1000 * 60 * 60 * 24 * 15 //Half month: 1000 ms * 60 sec *60 min * 24 hour * 15 days
我从您的 jsfiddle 示例创建了一个分支,其中我修改了 barWidth:
http://jsfiddle.net/6TaQt/1