How do I assign values to x-axis in calc 6.4.6.2

I have a list of names in column c that I want to assign to the x-axis in an x-y line chart with two data lines. I can assign values and ranges to each of the two y axes with no problem, but I cannot change the values of the x-axis from the default 1,2,3, etc.

I am running Calc 6.4.6.2 on Ubuntu 20.04.

=======================================

PS I wish someone would get rid of all the old posts that refer to ancient versions of Calc ond other Libre Office applications that are no longer in use; or else specify the version number to which the post applies. It’s really annoying trying umpteen different solutions that are not applicable because programmers make changes with each version.

Hello

but I cannot change the values of the x-axis from the default 1,2,3, etc.

That’s probably because you are using a line chart (and have not set option [x] First column as label) , while you in fact need a XY(Scatter) type chart (Line charts are based on categories and if you do not define a range (i.e. a column) for categories, you simply get a numbering (which are in fact not numbers and must be interpreted as follows: 1 means: category 1, 2 means: category 2, and so on).

Please see the following sample file showing the differences: LineVsScatter.ods

You have to options:

  • Use a XY-Scatter, which is the natural chart type for numerical data on both axis
  • Double click the chart -> Right click -> Data Ranges ... an set option [x] First column as label. But be aware: The chart still does not have numerical data on the x-axis. Just categories get a new label (name). The consequence of that is important in case of labels to do not translate into equidistant numbers (see chart titled “Line Chart of Columns XLabel / Y -Xlabel Colum As Label”)

Hope that helps

1 Like

Actually, you can set the x-axis for line charts as well as XY scatter grams. You can also set it for column charts as well and the process is similar for all of them. The trick is finding the secret hand shake. I found it by using the following steps:
Click anywhere in the graph space, then right click in the same area and select “edit”

Then click on the “data ranges” icon in the tool bar at the top. (Beware, it won’t be there if you are not in the “edit graph” mode.)

Click on the data you want to be displayed and enter the name and range.

Then enter the range of cells containing the data you want for the x-axis in the “categories” window. The data can be numbers, dates, text or whatever you want. These data will then show up just below the x-axis.

This works for version 6.2.4.2 running on Ubuntu 20.04. I won’t guarantee it will work on any other version.