Ask Your Question

Is it possible to have a Bar Chart with Time values plotted accurately?

asked 2020-10-01 16:15:09 +0200

Alex Kemp gravatar image

updated 2020-11-23 22:09:24 +0200

C:\fakepath\barometer.csv.ods (rename to .CVS)
C:\fakepath\ (rename to .ZIP)

I cannot seem to format the x-axis (horizontal, DateTime-based) of a chart to have the data-points placed at the actual point indicated by the date-time of collection rather than evened out throughout the day. I'm very much hoping that this is a setup/format mistake by me rather than a bug.

LO Help on Chart-Types

This is what the current chart looks like:- image description

This chart is based on 3 days of barometer readings. There are approx 18 readings per day in this set, but the precise time of collection varies for each value (it is collected when the barometer value moves up-or-down by at least 1 mBar from the previous value). In spite of that, each bar is shown evenly across the x-axis.

Using menu: format | Axis | X-Axis | Scale I have to choose a Type of “Text” to get the arrangement shown above. Alternative values are “Automatic” or “Date”, and either of those gives the chart as below:-

image description

Only an XY Scatter chart seems to plot the time-values correctly, as below:-

image description

I would prefer to have a Bar chart (the 1st example above) but with the X-Values plotted at the correct, exact place rather than evened out across the axis. Is that possible?

Collected via a Conky

The barometer readings have been exported via a Conky. That was originally written by myself, and recently modified to export the Barometer values. I'll upload those relevant files here soonish so that others can experiment with it, if they want.

Nov 23 update:
Changes tested in situ for 2 days.
Small error fixed: (“missing text block in configuration”, due to no ‘TEXT’ declaration in original before update/conversion to modern LUA config).
All files re-uploaded.

(zip-file at top)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2020-11-21 12:40:00 +0200

keme gravatar image

For bar charts, the values for the x axis are taken as data labels, not as numeric coordinates.

You can get a similar visual representation to what you requested by using stepped line on an x/y chart. By combining that with some calculated values, you can also create the bars.

I'd say that the stepped line visualizes the data better than the bars.

edit flag offensive delete link more


I tried again to get a stepped-line & this time managed to do so (prefer the points + mean-average, myself). I'll add that image below:

Many thanks for your response.

(Added later:)
Since my error was misunderstanding the intention of Bar charts I've read up on that + added the help-link to my question. And again, many thanks, keme.

Alex Kemp gravatar imageAlex Kemp ( 2020-11-21 14:36:59 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-10-01 16:15:09 +0200

Seen: 54 times

Last updated: Nov 23 '20