The use of Units does not work with Stacked Bar Chart

I have a bar chart based off time of the day. There is an entry for every 5 minutes of the day. However, I only want lines every hour. I am able to accomplish my goal perfectly with a regular bar chart using a combination of units and a function for the line parameter. However, if I tried to use a stacked bar chart, my X-Axis units completely break.

What am I doing that is wrong?

Thank you

Regular Bar

Failed Attempt to Stack

Attached is the the code for this. (507 KB)

Delete units: there are no units for stackedBar

Is it an issue with the amount of rows of data that stacked can handle? As a work-around, I added entries of data that have zero values for minutes that don’t exist. As shown below.

{ "date" : "2014-04-21T00:00:00", "series1" : "0", "series2" : "0" }, 
{ "date" : "2014-04-21T00:01:00", "series1" : "75", "series2" : "1" }, 
{ "date" : "2014-04-21T00:02:00", "series1" : "0", "series2" : "0" }, 
{ "date" : "2014-04-21T00:03:00", "series1" : "0", "series2" : "0" }, 
{ "date" : "2014-04-21T00:04:00", "series1" : "0", "series2" : "0" }, 

This generates the same problem. The idea is that I have collect number of users for 2 sites at 5 minute intervals. Each site is collected at the same time. I want to see a stacked graph of both sites.

Thank you


It is possible to apply units for stackedChart. But there are more than 1400 units in your chart. And max chart width is 1200px. So, it’s less than 1px per unit to display. Render logic of StackedBar converts float values into integer. Therefore, you got 0 width for a bar.

We have removed float->int formatting from the library that you are using (attached). And probably we will add some solution for such a case in the next version. (26.4 KB)

That solution did the trick. Thank you for patched DHTMLX.