Suppose you have a PivotTable with at least two rows and two columns of data. If you create a PivotChart for that table - say, a Stacked Columns chart - and then change the row sort order using Data... > Sort - the data series in the chart will retain the same order. They should be reordered according to the change to the PivotTable.
Please attach a sample file, reduce the size as much as possible without private information.
Created attachment 196459 [details] Document with data, a PivotTable and a PivotChart Try sorting by either rows or columns, so that the order actually needs to change; the PivotTable will change, the PivotChart will not.
If I change the order for the 'Status' field, it is updated on the pivot chart. PT has their own way to sort, so sorting out of the PT do nothing, because nothing is changed in the PT, and nothing change for the PT-Chart.
Whether PT are supposed to work as ordinary charts is discussed in bug 162968. If changing the data series is possible, meaning there is no good reason to prevent this, we should also allow to manipulate the chart details. So kind of depends on.
(In reply to m_a_riosv from comment #3) > If I change the order for the 'Status' field, it is updated on the pivot > chart. Only if you use the PivotTable control for doing so, not if you sort the data, and probably not if you otherwise change the order. > PT has their own way to sort, so sorting out of the PT do nothing, because > nothing is changed in the PT, and nothing change for the PT-Chart. That could have been true, except that LibreOffice is willing to take a Data > Sort... request from within a PT - and moreover, selects the PivotTable, indicating that it recognizes the action: "Oh, you must want to change the PivotTable sort order; let us do that then". Now, you could say: I would rather the Sort command just fail outright for PTs. And that would at least guarantee consistent behavior and not confuse the user. However, it is not currently possible (correct me if I'm wrong) to sort the PT based on data columns; or to control a complex sort order at once (as opposed to setting the sort order separately for each column. So there is need/benefit for using the sort dialog - and it is better IMNSHO to make sure it behaves properly and the resort results propagate. Note that even though bug 162968 mentions rows and columns and data series, it's about something quite different; they are independent: Even if one could change the sort order, that does not mean one can have charts with row rather than column data series, and vice-versa.
Created attachment 196487 [details] Sorting by Sum - This Year
(In reply to m_a_riosv from comment #6) How was the sort triggered?
Editing the row field properties.
(In reply to m_a_riosv from comment #8) > Editing the row field properties. 1. How, exactly? 2. Ok, so - applying Data > Sort... should have the same result