Forum Discussion
MStaindl
Aug 30, 2023Copper Contributor
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:30 | 22 |
05:40 | 25 |
06:50 | 11 |
10:40 | 19 |
11:30 | 12 |
12:25 | 24 |
13:12 | 17 |
15:05 | 28 |
18:00 | 22 |
20:35 | 14 |
22:25 | 10 |
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.
Alternatively, consider an XY Scatter chart. The x-axis of a scatter chart can represent times correctly.
- mathetesSilver Contributor
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.