Forum Discussion

MStaindl's avatar
MStaindl
Copper Contributor
Aug 30, 2023

probably one of the dumbest questions ever here - creating a 24hr bar chart where the times are prop

Hi, I'm embarrassed to ask this, but I'm trying to create a very simple bar chart of events happening at random times over 24 hours. I can plot the events ok, with time labels on the X-axis, but I can't figure out how to make the bar's position on the x-axis actually reflect it's time value.

For example for the figures

02:3022
05:4025
06:5011
10:4019
11:3012
12:2524
13:1217
15:0528
18:0022
20:3514
22:2510
23:05

3

the 2.30, 5.30, and 6.50 values are all equally spaced on the x (time) axis.

All the bars are equidistant apart; I want them to be spaced according to their time of day.

The first column is formatted as "time".

Thanks so much to anyone who can point me in the right direction.

Michael.

 

  • mathetes's avatar
    mathetes
    Silver Contributor

    MStaindl 

     

    Since you know how to create the graph, that's not the real question. It's how to create a source of data for that graph.

     

    We sometimes talk of creating "helper columns" to facilitate solutions. In this case, I'm suggesting a "helper table"

     

    Unless you require precision at the exact level of minutes (you do have one time stamp with 12 minutes), you could create a table of the 24 hours with each five or ten minute interval labeled, and then use VLOOKUP to retrieve from your actual data table the figure that is closest to that five or ten minute interval. Then make the graph from that table instead of the actual randomly recorded one.

Resources