none
More chart weirdness RRS feed

  • Question

  • Please take a look at http://www.windwardreports.com/temp/ChartDiff.zip

    Windward Trucking 2 - Template.docx was created in Word. report.docx was created by taking the chart in the first file, changing some parts, and writing it out in our program. I've compared the files using XmlSpy diff and I can't find any differences that would be why:

    1. The original has straight lines while report.docx has curved lines. Why?
    2. The original has the legend to the right while report.docx has the legend overlaying the chart. Why?
    3. report.docx shifts the axis to be left/bottom and bottom/right. But now no axis are displayed, not even the original left/bottom. Why?

    We build report.docx from the template.docx so we need to know how to pull across what it is set to. If the answer is add some elements to chart1.xml, we need to know when to add them based on what is in the original.

    Help please.

    thanks - dave


    Very funny video - Reporting as a Metaphor
    Thursday, July 1, 2010 11:12 PM

Answers

  • Hi David,

    As I mentioned, it seems to be problematic and I will submit it though our internal channels. As a workaround, you can use "Microsoft Office Word".

    Thanks,
    Ankush 


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Ankush Microsoft Online Community Support
    • Proposed as answer by Ankush_Bhatia Tuesday, August 24, 2010 8:55 PM
    • Marked as answer by DavidThi808 Wednesday, August 25, 2010 3:58 PM
    Tuesday, August 24, 2010 8:55 PM

All replies

  • Hi Dave,

    Let me have a look at the attachment and see why it happens in this way.

    Thanks
    Ankush

     

     

     

    Thursday, July 8, 2010 12:57 AM
  • Hi Dave,

    I have looked at both the files and I understand why you see this behavior. Let me explain them:

    Q 1. The original has straight lines while report.docx has curved lines. Why?
    A 1. In report.docx, goto "Format Data Series" -> "Line Style" and you will see that "Smoothed Line" option is checked hence the problem.
    Fix: You need to define  <c:smooth val="0"/> element in chart1.xml. Basically you can uncheck  "Smoothed Line" and analyze the document in OpenXmlSdkTool to see where it needs to be inserted. You can defined them explicitly in your template (chart1.xml).

    Q 2. The original has the legend to the right while report.docx has the legend overlaying the chart. Why?
    A 2. In report.docx, right click on the Legend , select "Format Legend", and in the "Legend Options", check "Show the legend without overlapping the chart". It will resolve this problem.

    Fix: You need to define <c:overlay val="0"/> element in chart1.xml. Basically you can check "Show the legend without overlapping the chart" and analyze the document in OpenXmlSdkTool to see where it needs to be inserted. You can defined them explicitly in your template (chart1.xml). This element will go as

      <c:legend>
          <c:legendPos val="r"/>
          <c:overlay val="0"/>
        </c:legend>

    Q 3. report.docx shifts the axis to be left/bottom and bottom/right. But now no axis are displayed, not even the original left/bottom. Why?
    A 3. Again some of the Axis properties are not defined hence they are not displayed. If you look at the "Primary Horizontal Axis" under Axis in the chart, the value is set to none. Changing this will display the value. The same rule is applied to "Primary vertical axis" as well. Also once these are displayed then you need to set certain values of the Axis (Tick Mark type).

    What I have observed that these properties are not part of the chart1.xml when you create the chart. Hence when you copy chart1.xml, these settings doesn’t get copied. But if you change them, they appear in Chart1.xml hence I suggest to have them in the template explicitly.

    Regards,
    Ankush
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. 

    • Proposed as answer by Ankush_Bhatia Thursday, July 8, 2010 8:21 PM
    • Unproposed as answer by DavidThi808 Friday, July 9, 2010 3:55 PM
    Thursday, July 8, 2010 8:21 PM
  • Hi;

    Thank you for looking at this. Here is what I do not understand:

    Q1. Neither chart1.xml has <c:smooth val="0"/> so why is one smooth and the other lines?

    Q2. Neither chart1.xml has <c:overlay val="0"/> so why is one an overlay and the other not?

    Q3. Looking at the first c:catAx and c:valAx in both chart1.cml files - they both are identical - exactly the same nodes and settings. The catAx on the left is set to none, but the one on the bottom is not and so should display.

    I understand that these can be explicitly set. The problem is we need to read a chart1.xml and then create a bitmap of that chart. And so we need to know how Word will display a chart when these values are not set, as in the attached files. Can you tell us how to determine these properties when they are not explicitly set?

    And please note that while our program created report.docx, Word created WindwardTrucking2 and so Word will create chart1.xml files like this.

    thanks - dave


    Very funny video - Reporting as a Metaphor
    Friday, July 9, 2010 4:03 PM
  • Hi Dave,

    I understand that when these properties are not set explicility then there is no way to track them, however you can set them in your template so that chart1.xml is consistent.

    Here is a blog on the same lines: http://blogs.msdn.com/b/brian_jones/archive/2009/03/13/importing-charts-from-spreadsheets-to-wordprocessing-documents.aspx

    Thanks
    Ankush

     

    Wednesday, July 14, 2010 9:22 PM
  • Hi;

    My problem is I have to build a chart from the chart.xml file. So I have to use what Word gives me. Therefore I have to know what to do when Word does not explicitly set those values. How can I determine what Word is displaying when it does not set the values?

    As Word writes the chart.xml without the values, I think how the defaults are determined does need to be documented for the OpenXML spec to be considered complete.

    thanks - dave


    Very funny video - Reporting as a Metaphor
    • Proposed as answer by Ankush_Bhatia Friday, July 23, 2010 12:57 AM
    • Unproposed as answer by DavidThi808 Friday, July 23, 2010 2:36 PM
    Wednesday, July 14, 2010 10:09 PM
  • Hi Dave,

    I have noticed that if I open the documents in Word 2007 (12.0.6535.5002 SP2 MSO 12.0.6535.5002) I don’t see any UI problems. However, Word 2010 display them.

    Having said, it seems to be problematic and I will report this problem.

    Ankush
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. 

     

     

    • Proposed as answer by Ankush_Bhatia Friday, July 23, 2010 12:57 AM
    • Unproposed as answer by DavidThi808 Friday, July 23, 2010 2:36 PM
    Friday, July 23, 2010 12:57 AM
  • Having said, it seems to be problematic and I will report this problem.


    Hi;

    Thank you for reporting this. Any suggestions on how we should handle this case? On reading a DOCX file with a chart like this, we need to both (depending on options a user sets) render it either as a bitmap or rebuild the DOCX with different data. In both cases, we need to know how the chart should be displayed.

    thanks - dave


    Very funny video - Reporting as a Metaphor
    Friday, July 23, 2010 2:36 PM
  • Hi David,

    I suggest to create a template with all the fields explicitly set. Once you create document based on this template, application will on/off the fields based on the requirement. In this way you can track them. Having said that, if you want a feedback on the bug, you can always post a comment here/open a paid support and I'll provide you the status.

    Please visit the below link to see the various paid support options that are available to better meet your needs. http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone

    Thanks,
    Ankush

     

     


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Ankush Microsoft Online Community Support
    Saturday, August 7, 2010 2:15 AM
  • Please visit the below link to see the various paid support options that are available to better meet your needs. http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone

    Hi;

    I thought our MS ISV partnership meant we got support questions answered here. Is that no longer true? I'm loathe to have to pay to ask 10 or 20 questions of Microsoft where the anser for all of them may come back as "that's a bug."

    thanks - dave


    Very funny video - Reporting as a Metaphor
    Monday, August 9, 2010 1:41 PM
  • Hi David,

    I suggest to create a template with all the fields explicitly set. Once you create document based on this template, application will on/off the fields based on the requirement. In this way you can track them.  

    Hi;

    Our problem is we're not creating the chart, the user is in Word. We just read it. So we're stuck having to use what Word creates.

    And for the axis, everything in them is set and yet they still are not displayed. So for that, setting everything does not seem to be sufficient.

    thanks - dave


    Very funny video - Reporting as a Metaphor
    Monday, August 9, 2010 1:43 PM
  • Hi David,

    I investigated this issue and what I see is that the Application element value in app.xml is set to "Winward Reports." This is causing Word 2010 to not correctly apply the compatibility setttings as it does not understand that the document is actually a Word 2007 document.

    If I change Application to "Microsoft Office Word", I see that the document does get rendered correctly in Word 2010.

    Please try this and let me know how this goes for you.

    Thanks,
    Ankush


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Ankush Microsoft Online Community Support
    Thursday, August 12, 2010 1:34 PM
  • I investigated this issue and what I see is that the Application element value in app.xml is set to "Winward Reports." This is causing Word 2010 to not correctly apply the compatibility setttings as it does not understand that the document is actually a Word 2007 document.

    If I change Application to "Microsoft Office Word", I see that the document does get rendered correctly in Word 2010.

    Fantastic - that seems to set it. Ok, big question now - where does the OpenXML spec document what settings are interpreted differently and how based on the Application name? And when we generate a DOCX file should we lie and set the application name to Microsoft Office Word?

    thanks - dave


    Very funny video - Reporting as a Metaphor
    Thursday, August 12, 2010 4:08 PM
  • Hi David,

    As I mentioned, it seems to be problematic and I will submit it though our internal channels. As a workaround, you can use "Microsoft Office Word".

    Thanks,
    Ankush 


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Ankush Microsoft Online Community Support
    • Proposed as answer by Ankush_Bhatia Tuesday, August 24, 2010 8:55 PM
    • Marked as answer by DavidThi808 Wednesday, August 25, 2010 3:58 PM
    Tuesday, August 24, 2010 8:55 PM
  • Ok, will do. When they document how the settings are different based on the application name please let us know.

    thanks - dave


    Very funny video - Reporting as a Metaphor
    Wednesday, August 25, 2010 3:59 PM