[Solved] Calc - how to constrain horizontal/vertical when drawing line on chart?

Question is basically subject line. I have chart in Calc that I want to draw a vertical line on. But when I use the line tool, there seems to be no key combination which forces a “true vertical”.

Is LibO missing this? or am I missing something? Any help appreciated!

Note: I am using Calc 4.2.0.4 on Ubuntu 13.10.

Update: We’re all right. :slight_smile: @Regina’s answser held the key. Here’s what I have found:

  • In Calc, if you click View > Toolbars > Drawing, then select the Line tool from the toolbar, holding down the Shift key will indeed constrain angles to 45 degree increments. These can be “drawn” on the spreadsheet area, or the chart area so long as the chart is not selected.
  • If you double-click on the chart, thus selecting it (frame turns to grey, with selection handles at corners and midpoints on each side) – and the toolbar changes because now the environment seems to be LibO Chart,(anyway, what you get when you open ODC files* - here’s an example) rather than Calc (?) – THEN the Shift key has no effect on the line drawing.

This is still odd behaviour to my mind, but at least now I see what’s going on! Thanks for the patient help.
It was the latter scenario, obviously, that I was using and getting confused by. So the “problem” (if there is one) is with “Chart” (?) rather than Calc itself.

* Notice how the toolbar changes when chart selected, or ODC file “launched”.

So am I correct in understanding your question is: “how do I put a truely vertical line in a chart?”

Yep - you’ve got it!

Good, but it is not exactly what I read from the main question :slight_smile:

Oh, I see where I was wrong: I overlooked “drawing”. I thought you were trying to find a function to plot a vertical line instead of draw. Hence I thought you were only looking for a “true vertical” function and wondered why you refered to both horizontal and vertical. My bad!

If I am right, with Shift key pushed while drawing the line, lets you do it for every 45 degrees.

Hmmm. That’s what I was hoping. But holding down Shift, whether or not before or after “clicking” with the line tool, does nothing to hold the line to 45-degree increments. None of the keys do, in fact. Even worse, it seems the “line” is not being saved in any case! I’m on Calc 4.2.0.4 in Ubuntu 13.10 - maybe I’ll see if there’s a bug report about this. Thanks for checking.
Build ID: 420m0(Build:4)

@mariosv - 45deg lines with shift-key hold down works; you are right.

I see no way to constrain it while drawing when you are inside the chart. But you can draw the line outside in Calc. There the constrain by pressing the shift key works. Then you can copy and paste it into the chart. When you paste it, the line will start in the left top corner and you need to drag it to the place you want. Another way is to draw it inside the chart and then use the item Position&Size from the context menu of the line to set the rotation angle to 0 degrees.

Thanks - I might be forced to us the “Position & Size” options.

LibO 4.1.4.2 on XP/SP3

I can draw lines without any problems starting on the chart or outside the chart. True vertical works with shift-key hold down.
As soon as the chart is selected (green squares around the chart) or chart is in editing mode, drawing of lines does not work at all.

image description

45 deg - works in all directions while holding the shift key down. Even starting in a certain 45 deg pitch direction, I can pull the line around to change the angle in 45deg steps. (Not shown in the chart above!)

On Ubuntu with LibO 4.2, shift key does nothing. Also, I can only “draw” on the chart area itself. The “crosshairs” disappear when in the normal spreadsheet area. Also, one ODS will not save the lines on the chart (odd - if on SMB drive, not saved; copy file to normal home filespace - it does save!); another one will.

@dajare - I unfortunately don’t know Ubuntu. Hope that an Ubuntu specialist provides you the answer. What does the help file (for Ubuntu) state?

Or you do as @Regina proposed.