calc chart does not retain data ranges

Using Version:
I’ve opened and edited a spreadsheet that I have maintained for many years. Suddenly, the chart won’t retain the settings. Primarily, the “data ranges” opens up with BOTH “first row as label” and “first column as label” selected. This is incorrect, as the data are in columns. “First column as label” should be checked, but “first row as label” should NOT be checked. I can’t deselect that option.
As a result, the Range for Name contents have moved to the end of the “Categories” field. Here is the contents of these two data boxes:
Range for Name: [empty]
Categories: $W$2:$W$366,$C$1
As you can see, “$C$1” is the cell that holds the Name for this data series. (The error is the same for all three data series in the chart.)

I don’t know what’changed. In particular, this spreadsheet document has two sheets, with analogous data on both sheets. The identical chart on Sheet 2 is fine, but I cannot get the chart on Sheet 1 corrected. I can put is back, but every time I do, the “First row as label” check box self-selects, the “Range for Name” field data move to “Categories,” and stays that way. Because the quantity of data are unbalanced, the display of the chart goes haywire.

What is going on?

More information: by trial and error I have determined the following. Screen shots are included.
The chart intends to display three values (in columns X, Y, and Z) against a horizontal axis (in column W).
Data range names are in cells C1:E1.
Now observe the following →

First, the chart displays normally, as long as the data values for all three ranges are X16:X366, Y16:Y366, Z16:Z366. This is so even though the y-axis is populated from W2:W366.

But if any of the data ranges are changed to a row number less than 16, the chart scrunches up. The one that is changed gets a large horizontal line while the other two are truncated. If all three are changed to values less than 16, all three get trailing horizontal lines. This error persists even when the three data ranges match the y-axis, e.g., X2:X366, Y2:Y366, and Z2:Z366, along with W2:W366.

What’s going on here? (As I said earlier, I have maintained this spreadsheet for years. I update it every other month or so. All was well until the update as of last night.)