question

DavidThielen-0658 avatar image
0 Votes"
DavidThielen-0658 asked DavidThielen-3337 commented

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

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


openspecs-office-fileformats
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

HungChunYu-3579 avatar image
0 Votes"
HungChunYu-3579 answered HungChunYu-3579 commented

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



· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Hung-Chun;

My question is not to change the order in a chart in my DOCX file. I need to read the DOCX in my program and then render it the same in the generated PDF. So I need to know what the Z-order is for rendering what on top of what.

So what is <c:order val='2'/> or as you call it plotting order used for? I know if I change the values for the series in a line and bar chart, that will change their z order.

But within a lineChart it does appear to work as you said, the order is ignored and it renders them in the order they are declared. Is that how it is supposed to work for series within a chart?

And is it supposed to be that the order of the first series in a chart determines the z order of the charts?

thanks - dave

0 Votes 0 ·

Hi again;

Please take a look at ATE-4988_bottommost_inverse.docx. I reversed the order values, and that reversed the z-order of the lines. So the order val is setting the z-order. But in the flipped order within a chart.

??? - thanks - dave


0 Votes 0 ·

Hi David

You are correct, with the ATE-4988_bottommost_inverse.docx, one would think that line showing for Alfreds should appeared on top, because that should be last data series to be plotted on the chart. I will forward the question to product group to see exactly why that is.

0 Votes 0 ·
HungChunYu-3579 avatar image
0 Votes"
HungChunYu-3579 answered HungChunYu-3579 commented

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.







image.png (16.2 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi HungChun;

If you look at the files I uploaded ATE-4988_topmost.docx, ATE-4988_bottommost.docx, & ATE-4988_bottommost_inverse.docx those show that the order property is being followed.

So I think your explanation is incorrect. It definitely does not match the samples I uploaded. Am I not understanding something?

I think it would help if you could upload a file that is not using the order property and instead uses the order of the node in the chart.xml. Because I can't get that, everything I try follows the order property (either as expected, or inverse).

thanks - dave

0 Votes 0 ·

Hi Dave

I will bring the issue back to the product group.

0 Votes 0 ·
HungChunYu-3579 avatar image
0 Votes"
HungChunYu-3579 answered HungChunYu-3579 commented

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."


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Hung;

But that does not answer the original examples I posted above of:

If you look at the files I uploaded ATE-4988_topmost.docx, ATE-4988_bottommost.docx, & ATE-4988_bottommost_inverse.docx those show that the order property is being followed.

In addition please look at the following files. They are the same except for the order - and they assign different colors based on the order.

  1. https://www.dropbox.com/s/jaegl1vxtd2wyil/ATE-4988_random_order.docx?dl=1

  2. https://www.dropbox.com/s/wv3r7lhw2f4jl1s/ATE-4988_reverse_order.docx?dl=1

  3. https://www.dropbox.com/s/uodkhsctk8qtr1d/ATE-4988_top_down_order.docx?dl=1
    4.

0 Votes 0 ·

Hi David

I will bring this back to the product group.

0 Votes 0 ·
HungChunYu-3579 avatar image
0 Votes"
HungChunYu-3579 answered DavidThielen-3337 commented

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

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

That makes sense - thanks

0 Votes 0 ·