[Solved] Horizontal line in chart

Discuss the spreadsheet application
Locked
Stulensmelvin
Posts: 1
Joined: Fri Jun 20, 2025 8:26 pm

[Solved] Horizontal line in chart

Post by Stulensmelvin »

I want to draw a horizontal line in a chart.
I want to do this without entering the same value in different cells.
So I want to draw a line across the entire length of a chart based on 1 value.
Is this possible?
Last edited by MrProgrammer on Fri Jun 27, 2025 6:04 pm, edited 3 times in total.
Open office 4.1;5 on windows 10
User avatar
Zizi64
Volunteer
Posts: 11481
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Horizontal line in a chart

Post by Zizi64 »

Open office 4.1;5 on windows 10
Your AOO 4.1.5 is a very obsolete version. Maybe my sample file (created in the LibreOffice 7.6.8) wil not work in the AOO 4.1.5...

My sample file contains two workaround tips:

One for a line with constant data values referenced from a DataValidity cell (you not need fill the source range, nor enter the lots of constant values manually - if you want to modify them).

The other tip: Usage of the secondary X axis positioned to the desired Y value, and formatted to your needs.
Horizontal line.ods
(19.54 KiB) Downloaded 5 times
Last edited by Zizi64 on Sat Jun 21, 2025 6:43 am, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
cwolan
Posts: 180
Joined: Sun Feb 07, 2021 3:44 pm

Re: Horizontal line in a chart

Post by cwolan »

Zizi64 wrote: Sat Jun 21, 2025 4:54 am One for a line with constant data values referenced from a DataValidity cell (you not need fill the source range, nor enter the lots of constant values manually - if you want to mofify them).
To draw a horizontal line, only two data points are needed, i.e. the start and the end (no need to apply the formula for all points).

A horizontal line drawn as the mean value line or linear trend line extends over the entire scale of the chart, like your secondary X axis.
Attachments
Horizontal line AOO.ods
(21.25 KiB) Downloaded 5 times
OpenOffice 1.1.5 – 4.1.15
LibreOffice 3.3.0.4 – 25.2
Windows 7,10,11 64-bit
Locked