21.2.2.128 order - is 0 top-most or bottom-most

David Thielen 61 Reputation points
2021-03-21T16:19:26.96+00:00

Hi all;

I'm trying to figure out how the c:lineChart/c:ser/c:order@val is applied. If you look at ATE-4988_topmost.docx the line chart with order=0 is top-most. But if you look at ATE-4988_bottommost.docx the line series with order=0 is bottommost.

So how is the z-order set from this?

thanks - dave

Office Open Specifications
Office Open Specifications
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Open Specifications: Technical documents for protocols, computer languages, standards support, and data portability. The goal with Open Specifications is to help developers open new opportunities to interoperate with Windows, SQL, Office, and SharePoint.
127 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Hung-Chun Yu 976 Reputation points Microsoft Employee
    2021-03-21T21:03:49.04+00:00

    Hi David
    Thank you for contacting Microsoft Open Specifications Support.

    Regarding

    <c:order val="0"/>
    

    With value of 0 indicated that its first data series in the dataset, by default it will be first in the plotting order. This is not related to z-order, where z-order of an object determines whether the object is in front of or behind another overlapping object. By default, the z-order of objects within a Panel is determined by the sequence in which they are declared.

    Here is an article that talks about how user can Change the plotting order of categories, values, or data series - Office Support (microsoft.com)
    Regarding when it would appear at the top or bottom of legend, it’s all depends on which Chart Type was selected. Here is an article that talks about Order of Series and Legend Entries in Excel Charts

    Did this help?

    Hung-Chun Yu
    Microsoft Open Specifications


  2. Hung-Chun Yu 976 Reputation points Microsoft Employee
    2021-04-02T18:19:40.153+00:00

    Hi David

    Here is what I found out.

    • How can customer get the consistent z-order between Chart and rendered in PDF.

    I understand that the rendering order is important for the customer's scenario. I don't believe that this "order" attribute is relevant though, as it only seems to matter for series which are filtered out (and hence, invisible). The order the series should be rendered in is the order in which they appear in the file.

    • How does chart really handle <c:order val="0"/>, it appeared it would get ignore under some scenarios.

    The bug is found in the Office15, interaction between order and filtered/non-filtered series:

    " HrCommitFilteredSeries:
    This function commits all the filtered out series loaded from all the graphs
    in this plot, in the order of their saved-out plot-order index (saved as
    "xmltkOrder" on the series). This logic is necessary due to the following
    scenario:

    Consider a chart with 4 series in a combo-chart with column and line type
    (2 Graphs : Graph 0 = Column, Graph 1 = Line). We filter out some series, and
    save this file. Then we re-open it in o14 and save again. The original plot
    orders when saving in o15 and then re-saving in o14 are summarized in the
    table below.

    84142-image.png

    Thus, we can't really load the entire column graph (Graph 0), before the line
    graph, because then there would be a conflict in the plot order of Ser3 and Ser4.
    What we do is load all the visible series from all the graphs, resulting
    in a partially filled m_vserXLOrder array in the Plot.

    For the above case, it would be:
    0 : Ser1
    1 : Ser2
    2 : Ser3

    Then we call this function to insert the filtered out series in their
    expected location, starting from the one with lowest plot-order and going
    in ascending order. At the end of this, our m_vserXLOrder would look like this:
    0 : Ser1
    1 : Ser2
    2 : Ser3
    3 : Ser4
    because it will insert "Ser3" at index 2.

    Let me know if this helped.


  3. Hung-Chun Yu 976 Reputation points Microsoft Employee
    2021-04-06T18:49:22.207+00:00

    Hi David

    Attached is a version of bottommost_inverse 'ATE-4988_random_order.docx' which demonstrates what our developer was talking about. "I swapped the values of the 'order' for the two middle series, but the order of rendering did not change. They stayed the same because I didn't change the position of the 'ser' elements in the file. All three files provided fit my understanding:
    When filtering is not involved, the series are rendered in the order that the 'ser' elements appear in the file. Series rendered later are rendered on top of the ones rendered earlier."


  4. Hung-Chun Yu 976 Reputation points Microsoft Employee
    2021-05-19T18:52:00.11+00:00

    Hi David

    Per our PG

    The color selection for each series is based on 'c:idx' and not 'c:order'. I'm attaching a copy of the random order file with the 'idx' adjusted to be sequential without changing the 'order'. You can see that this file adjusts the color selections. I think the confusion in the example files comes from 'c:idx' always matching 'c:order', making it unclear which value is important.

    See the updated example file ATE-4988_random_order_ADJUSTED_IDX.docx