Created attachment 188316 [details] Screenshot with problem description If we use the chart type 'XY (Scatter)' with X values that are not ordered (ascending nor descending) and we connect the data points with a line for readability, the line connects the data points in the given order, typically showing 'zig-zags'. This may be desired, but the checkbox 'Sort by X value' is there to prevent this behaviour if it is not desired. By activating this checkbox, the connecting line takes into account the X-values and the connecting line is left-to-right. This works fine. However, activating this checkbox 'Sort by X value' has the erroneous side-effect that categories in data labels are incorrectly re-assigned to the data points. (Not so with values in data labels, they remain in place. Resulting in data labels with values and categories that do not belong together.)
Created attachment 188317 [details] Spreadsheet showing problem
Thank you for the detailed explanation and the attachment. The issue is long-standing and already tracked in bug 37407. Please feel free to add to the conversation there. Cheers! *** This bug has been marked as a duplicate of bug 37407 ***