Why are the images not working for certain markers in this chart?

Kyle Rosenberg 171 Reputation points
2021-05-25T16:33:33.51+00:00

I have two documents - one where the image set in the chart.xml for the marker is showing in the chart (markers_show.docx), and one where its just showing the "automatic" marker (markers_dont_show.docx). In both charts, the c:marker node for the "Aggressive Model No 2" series is under a c:dPt node and are identical. Also in both charts, the Marker Options shows the "Automatic" option checked rather than "Built-in" with the image type. Why is markers_show.docx rendering the marker with the image and markers_dont_show.docx not? Is there somewhere else in the ooxml that this is set?

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
{count} vote

Accepted answer
  1. Tom Jebo 1,996 Reputation points Microsoft Employee
    2021-05-27T00:00:49.307+00:00

    Hi @Kyle Rosenberg ,

    Digging into this further, I found that when row 8 that is inserted to the backing data sheet (Windward_ChartData_1.xlsx), creating that extra blank row with "5.5" in the row header (i.e. first column), I see the following which seems to be closer to the problem:

        <c:ser>  
          <c:idx val="12"/>  
          <c:order val="12"/>  
          <c:tx>  
            <c:strRef>  
              <c:f>Windward_ChartData_1!$N$1</c:f>  
              <c:strCache>  
                <c:ptCount val="1"/>  
                <c:pt idx="0">  
                  **<c:v>Moderately Aggressive Model No 2</c:v>**  
                </c:pt>  
              </c:strCache>  
            </c:strRef>  
          </c:tx>  
          <c:spPr>  
            <a:ln w="25400">  
              <a:noFill/>  
            </a:ln>  
          </c:spPr>  
          <c:dPt>  
            **<c:idx val="16"/>**  
            <c:marker>  
    

    Notice in particular the bolded <c:idx val="16"/>.

    Now look at the y value reference:

          <c:yVal>  
            <c:numRef>  
              <c:f>Windward_ChartData_1!$N$2:$N$23</c:f>  
              <c:numCache>  
                <c:formatCode>General</c:formatCode>  
                <c:ptCount val="22"/>  
                **<c:pt idx="17">**  
                  <c:v>14.69</c:v>  
                </c:pt>  
              </c:numCache>  
            </c:numRef>  
          </c:yVal>  
    

    Notice again the bolded <c:pt idx="17">.

    I believe these should be the same index values.
    The first is the <c:dPt><c:idx> or single data point index and is where the marker is defined.
    The second is <c:yVal><c:numCache> value cache for the corresponding data index and contains the last displayed value or "14.92".
    However, they don't match. The correct index should be 17 and this allows the point to plot on the chart. But the index used in the <c:dPt><c:idx> element where the marker is defined is not correct. Therefore the marker doesn't show. When I correct the <c:dPt><c:idx> value to be "17", the marker shows.

    So I think what's happening, still not sure exactly how, is that when the extra row was added, numCache points are adjusted to account for the extra row of data. But the <c:dPt><c:idx> is not adjusted.

    I hope this makes sense to you. Let me know if you have further questions.

    Tom


0 additional answers

Sort by: Most helpful