[Solved] Creating/adding a Vertical Line

Discuss the spreadsheet application

[Solved] Creating/adding a Vertical Line

Postby trj » Fri Nov 20, 2009 1:46 pm

I have a graph with the date along the bottom as the y axis. I want t o add a Bold or color vertical line at one particular date that appears on the chart. Any ideas how to do this?
Thanks
Last edited by Hagar Delest on Wed Aug 10, 2011 6:20 pm, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 2.2 on Mac 10.5
trj
 
Posts: 2
Joined: Fri Nov 20, 2009 1:42 pm

Re: Creating/adding a Vertical Line

Postby Hagar Delest » Fri Nov 20, 2009 2:51 pm

What I usually do (in MS Excel, never tried it with Calc) is that I add another data set and for the Y value, I take the highest value of all other series (so that the upper limit of the Y axis is not increased). As I often get the lines linking to the previous and next point, I remove the line and use the error bar (the min being 100%) so that it fakes a line.

Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.

Edit: here is my proposal together with r4zoli's one below, based on his attachment (the advantage of my method is that you can put several vertical lines. But his method is quicker if you need only one.
Attachments
Chart_with_red_line.ods
(12.32 KiB) Downloaded 225 times
AOO 4.0.1 on Windows 7 and Xubuntu 13.10 (Saucy Salamander)
User avatar
Hagar Delest
Moderator
 
Posts: 25071
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Creating/adding a Vertical Line

Postby r4zoli » Fri Nov 20, 2009 2:57 pm

It can be done in OOo 3.2 versions or later (3.1.x not support secondary axis edit).
Select whole chart, right click, select "Insert/Delete Secondary axis".
Add secondary axis.
Select new axis to edit.
Select positioning tab, "Cross other axis" to "Value" or "Category" set what you want, uncheck interval marks.
On Line tab change line color and width.
On Label tab, unselect "Show labels".

It works with such Charts that not use secondary axis.
I did it in Develeopment version of OOo 3.2 which is not for everyday use, it will be out in December this year or later.
Attachments
Chart_with_red_line.ods
example file
(13.57 KiB) Downloaded 266 times
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
User avatar
r4zoli
Volunteer
 
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: Creating/adding a Vertical Line

Postby trj » Fri Nov 20, 2009 4:10 pm

Thanks much! I will try both and post results.
:)
OpenOffice 2.2 on Mac 10.5
trj
 
Posts: 2
Joined: Fri Nov 20, 2009 1:42 pm

Re: Creating/adding a Vertical Line

Postby CanadianISP » Mon Jun 28, 2010 11:25 pm

This was a perfect solution - *exactly* what I was looking for.
Thanks, r4zoli!
OpenOffice 3.2 on Windows Vista
CanadianISP
 
Posts: 1
Joined: Mon Jun 28, 2010 11:23 pm

Re: Creating/adding a Vertical Line

Postby tedballou » Wed Aug 10, 2011 5:48 pm

The secondary axis "positioning" is great for highlighting a particular time that an event occurred. Is there any way to pull the value from a data cell, instead of typing it explicitly in the dialogue box?

Thanks a lot -- Ted
OpenOffice 3.1 windows XP
tedballou
 
Posts: 2
Joined: Thu May 06, 2010 5:00 pm

Re: Creating/adding a Vertical Line

Postby tedballou » Wed Aug 10, 2011 6:18 pm

Well, after posting my question I realized it's easy to use a data cell value to place a vertical line marker, for an xy plot: just add a data series with two points: the "x" values are links to the cell with the event time to be marked, and the "y" values are the y-range of the chart. Then format this data series with "icon" as "no symbol" and pick the "line properties" to your heart's content.

Cheers, Ted
OpenOffice 3.1 windows XP
tedballou
 
Posts: 2
Joined: Thu May 06, 2010 5:00 pm


Return to Calc

Who is online

Users browsing this forum: No registered users and 30 guests