Ask Your Question

Can I have two X Axis in a chart?

asked 2019-05-18 23:51:27 +0200

benchrest gravatar image

This question has been around for many years, but now that I am on 6.3 of calc I was hoping for a different answer. I have many sets of economic and investment data that I would like to be able to compare data. All the data is for the same time period, but a different date scale. Some is daily, some monthly and some quarterly. I would like to have monthly on the bottom and quarterly on the top. Has there been a way to do this added to calc? It would seem to define a 2nd X axis would require a 2nd category in the Data Ranges define. Its not there. I can create a 2nd copy of the x axis one at bottom and one at top but they are the same.

edit retag flag offensive close merge delete


Would it make sense to rotate the chart 90° to exchange axis? Calc offers 2 Y-axis on which you can spread series (as bar charts). This is just a suggestion, I haven't checked it.

ajlittoz gravatar imageajlittoz ( 2019-05-19 08:04:28 +0200 )edit

Of cause you can have two x-axes. That has been always possible. Perhaps you use a line chart instead of an XY-chart, in case you cannot format the secondary x-axis as you like.

Regina gravatar imageRegina ( 2019-05-19 19:22:54 +0200 )edit

Yes, there can be two X axes but my experience has been that they can only be the same. By contrast, the Y axis can have a secondary axis with data aligned to it with a different scale. Do you know otherwise?

catbill gravatar imagecatbill ( 2019-07-13 21:37:24 +0200 )edit

The scale of the secondary x-axis can be different. But the data series points are always drawn in respect to the primary x-axis and the grid is always in respect to the primary x-axis. For me the main purpose of a secondary x-axis is to show the same values in different units.

Regina gravatar imageRegina ( 2019-07-13 22:17:42 +0200 )edit

Good to know but how do we show different units? I don't see where to change the scale for a secondary X axis.

catbill gravatar imagecatbill ( 2019-07-14 02:39:21 +0200 )edit

Keep in mind, that this is about XY-charts. Bring chart in edit mode. Menu Format > Axis > Secondary X axis > tab Scale. Or select "Secondary X axis" from the selection drop-down-list and then click on "Format Selection" button at the right side of the drop-down-list.

Regina gravatar imageRegina ( 2019-07-14 13:27:11 +0200 )edit

Oh, thought I had checked that. Thank you. But now I see another problem. It looks like we can only set the units to be a minimum of 0 and a maximum of 100. Is there a way to get around that?

catbill gravatar imagecatbill ( 2019-07-14 15:55:26 +0200 )edit

I do not see that problem. Which LibreOffice version do you use? I have attached an example to my answer below

Regina gravatar imageRegina ( 2019-07-14 20:04:38 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2019-07-14 20:12:18 +0200

Regina gravatar image

Here an example of two x-axis with different scale.Two X-Axis.ods

edit flag offensive delete link more


I think I was not clear enough. I can change the scale on a secondary X axis, yes. But the scale page only allows minimum and maximum numbers between 0 and 100. Yet you were able to show numbers on the secondary X axis that are below 0 and higher than 100. So clearly it is possible. How do you do that?

catbill gravatar imagecatbill ( 2019-07-14 20:38:08 +0200 )edit

Therefore my question about your LibreOffice version. I have used a current developer version and an older LibreOffice 6.1.4. Perhaps you test the 6.3 RC1? And for the question 'How do you do that?': I simply write the value -360 in the minimum and 540 in the maximum field.

Regina gravatar imageRegina ( 2019-07-14 20:52:03 +0200 )edit

That is an excellent question. I was using I thought I had tested it in other versions but it looks like I did not. I have now tested with versions 5.4,, 6.3, and It works properly in all of them. So it looks like I just happened to be using one of the few (or only) versions that does not work properly. Thank you for bearing with me and clarifying. This is a great help.

catbill gravatar imagecatbill ( 2019-07-14 21:42:32 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-05-18 23:51:27 +0200

Seen: 975 times

Last updated: Jul 14 '19