Requirements
- Be able to see data for 90 days, and the same data but then per week (same graph, just other view).
- Be able to click on a bar and perform some action like retrieving other data based on the selected bar.
- Customizable three code coloring stacked bars.
- Display more details when hovering over a bar.

Comparison

Timeline

This type of graph is very flexible and elaborate in the ways it can display data. It has a "selection bar" below the actual graph so you can determine the values being displayed in the graph above it. See below for a screenshot:

Pros

- The graph is scrollable thus no worries about the bars/lines getting too close to each-other.- You can zoom in and out, also with your mouse.- Different charts (graph modes) provided by default, changeable in one click: line, bar and scatter.- A quick zoom per period (1d, 5d, 1w, 5m etc).

Cons

- Can't attach any action to clicking on a bar. What you can do is react on the area selected with the selection bar, so a work-around might be to have the user select exactly one bar to mimic a kind of "clicking" on that bar. And then take the appropriate action.- You can only show days on the x-axis it seems. You can't show a bar per week for example (thus one bar representing 1 week). A work-around might be to create your own Zoom period for 1 week, which is quite easy to do.- Currently as of this writing there are at least two bugs regarding hovering: the timeline moves down a few pixels when hovering for the first time, and the stacked bars have a hovering problem.

Untested

- Can you also add an hover-over tooltip to the bars?

Chart
This type of graph does not have the fancy zooming possibilities, but has more possibilities regarding customization and reacting to events. See below screenshot for an example:

Pros

- The bars are clickable and that event can be handled, indicating the x and y of the item clicked.- The graph is more customizable; for example the numbers in the bars can be removed.- Different values (like week number) on the x-axis is probably possible (still out for investigating).- All data is always visible in the current view.
- Customizable hover-over tooltip.
- Does not have the two (smaller) timeline bugs.

Cons

- No horizontal scrollbar or similar, thus for example showing 90 days looks quite "cramped", see the above screenshot. When making the browser smaller, day numbers start to overlap. Do-able, but not optimal. A horizontal scrollbar would be great!- No space for showing a full date at the bottom. As a work-around the actual date could be added to the tooltip when hovering over a bar (in the screenshot it only says 26).- No zooming.- No out-of-the-box other graph modes (i.e like in the Timeline those are provided with it always).

Conclusion

For the project we chose the chart because it is a bit more customizable and the ability to click on a bar and do something with that event was most important requirement.

No comments:

About Me

I'm a professional software designer/architect/developer with over 20 years of experience. For many years I've been a Technical Team Lead for complex ICT projects. My main area of focus is Java application architectures and related challenges (scalability, performance etcetera), but I'm interested in any software application architecture. Currently Android has got a lot of my attention. I will be posting lessons learned, and lessons that I'll be learning during the coming years :-)