[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Modified range bar chart

Posted on 2014-08-07
Medium Priority
Last Modified: 2014-08-11
I've successfully created a range bar chart (Gantt chart, though that may be abusing the term), very similar to the attached sample.

I would like to alter it so that for the green "Running" segments, it actually uses a line chart to indicate the running rate, as in the second attachment.

I've read conflicting statements as to whether or not you can combine a line chart with a bar chart. Any suggestions on how to best accomplish this?

One idea I had was to manually construct the timeseries data in SQL - basically slice and dice the start/end intervals into timeseries data, assigning a magnitude (100% for all except the Running state, which would observe the running rate) and presenting the data to be used with a column chart - but that seems like it could get ugly and more importantly slow to query.
Question by:jdallen75
  • 3
  • 2
LVL 49

Accepted Solution

PortletPaul earned 2000 total points
ID: 40247819
>>"assigning a magnitude (100% for all except the Running state"

I think that is probably the only way. Basically you want non-green to be full height (100%) but green to vary (<=100%)

It might add complexity to the underlying query, but it may be acceptable. (Hard to tell without any insight into the current query.)

Author Comment

ID: 40247888
Paul, thanks for the comment. Just imagine the current query returning a set of back-to-back events - with start and end times - and one of the fields is one of four states. Additionally available is time series data representing the run rate (which is zero in a non-running state).
LVL 49

Expert Comment

ID: 40247909
I can picture some data in my head but it won't mean much to you :)

Let's say the run-rate data has an absolute max value of 1000 (full range 0 to 1000)
then the non-run-rate data would need to be plotted at a "rate" of 1000

I pretty sure we both agree on that technique, but how you "trick" this assumed rate into your data I'm not sure. It may not be difficult (it might even be trivial) - but I can't offer any specific advice without the existing queries to look at. Even then I might not know the answer.

Author Closing Comment

ID: 40253348
It was actually quite straightforward: join the MachineState interval data with the timeseries RunningRate data, and bump up the non-running RunRates to the maximum across the set.
LVL 49

Expert Comment

ID: 40254790
great! thought it might be simple ("it might even be trivial") -  you never know if you never try :)

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question