Reputation: 67
I tried to make flot stacked chart to input data in array x1,x2,x3... and y1,y2,y3...
My line chart data is made like that so I duplicated its js and did some changes but the width of bar still same as line chart. Any advise?
Upvotes: 0
Views: 2063
Reputation: 597
The problem is barWidth: 0.4
. Since you are using Dates on the xaxis, the numeric values between x1
, x2
, x3
and so on, will be relatively large values. If you wish the bars to be significantly wider than the axis lines, you would have to set barWidth
to something like:
barWidth:1000 * 60 * 60 * 24 * 15 //Half month: 1000 ms * 60 sec *60 min * 24 hour * 15 days
I have created a fork from your jsfiddle example where I have modified the barWidth:
Upvotes: 4