<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Bug in chart xml saving</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Chart Control : Bug in chart xml saving]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 21 May 2026 05:25:49 +0000</pubDate>
  <lastBuildDate>Mon, 08 Feb 2016 09:58:33 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=22884</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Bug in chart xml saving : Hi,We intend to make heavy use...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22884&amp;PID=74412&amp;title=bug-in-chart-xml-saving#74412</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8984">ericgen</a><br /><strong>Subject:</strong> 22884<br /><strong>Posted:</strong> 08 February 2016 at 9:58am<br /><br /><span style="line-height: 16.8px; : rgb248, 248, 252;">Hi,</span><div style="line-height: 16.8px; : rgb248, 248, 252;"><br></div><div style="line-height: 16.8px; : rgb248, 248, 252;">We intend to make heavy use of the XML functionality of the chart control. &nbsp;However for many chart styles, for example bar, bubble..., when the xml is saved there is no fill information. When reloaded , the chart does not have any colour fill.&nbsp;</div><div style="line-height: 16.8px; : rgb248, 248, 252;"><br></div><div style="line-height: 16.8px; : rgb248, 248, 252;">Is this a bug or is there something to do to save that information?</div><div style="line-height: 16.8px; : rgb248, 248, 252;"><br></div><div style="line-height: 16.8px; : rgb248, 248, 252;">We have modified the chart browser sample to save the xml as follows:</div><div style="line-height: 16.8px; : rgb248, 248, 252;"><br></div><div style="line-height: 16.8px; : rgb248, 248, 252;"><div>void CBaseView::OnFileSave()</div><div>{</div><div><span ="apple-tab-span"="" style="white-space: pre;">	</span>CFileDialog dlg(FALSE);</div><div><span ="apple-tab-span"="" style="white-space: pre;">	</span>if (dlg.DoModal() != IDOK)</div><div><span ="apple-tab-span"="" style="white-space: pre;">		</span>return;</div><div><br></div><div><span ="apple-tab-span"="" style="white-space: pre;">	</span>CXTPPropExchangeXMLNode px(FALSE, NULL, _T("Content"));</div><div><span ="apple-tab-span"="" style="white-space: pre;">	</span>CXTPChartContent* pContent = m_wndChartControl.GetContent();</div><div><span ="apple-tab-span"="" style="white-space: pre;">	</span>pContent-&gt;DoPropExchange(&amp;px);</div><div><span ="apple-tab-span"="" style="white-space: pre;">	</span>CFile file;</div><div><span ="apple-tab-span"="" style="white-space: pre;">	</span>if (!file.Open(dlg.GetPathName(), CFile::modeWrite | CFile::modeCreate))</div><div><span ="apple-tab-span"="" style="white-space: pre;">		</span>return;</div><div><span ="apple-tab-span"="" style="white-space: pre;">	</span>USES_CONVERSION;</div><div><span ="apple-tab-span"="" style="white-space: pre;">	</span>CStringA sXML = W2A(px.GetEncodedXML(TRUE));</div><div><span ="apple-tab-span"="" style="white-space: pre;">	</span>file.Write(sXML.GetBuffer(), sXML.GetLength());</div><div>}</div></div><div style="line-height: 16.8px; : rgb248, 248, 252;"><br></div><div style="line-height: 16.8px; : rgb248, 248, 252;">And when we load this, for example the bar chart, here is what we get:</div><div style="line-height: 16.8px; : rgb248, 248, 252;"><br></div><div style="line-height: 16.8px; : rgb248, 248, 252;"><img src="http://forum.codejock.com/uploads/8984/Capture.PNG" height="684" width="1010" border="0" /></div><div style="line-height: 16.8px; : rgb248, 248, 252;"><br></div><div style="line-height: 16.8px; : rgb248, 248, 252;">Looking at differences between the xml in resources of the chartbrowser sample and what is returned by the code, the bug is that in the generated XML it generates:</div><div style="line-height: 16.8px; : rgb248, 248, 252;"><br></div><div style=": rgb248, 248, 252;">&lt;FillStyle FillMode="Gradient" GradientAngle="BottomRightToTopLeft"/&gt;</div><div style=": rgb248, 248, 252;"><br></div><div style=": rgb248, 248, 252;">But the chart control only understands:<br><br>&lt;FillStyle FillMode="Gradient" GradientDirection="BottomRightToTopLeft"/&gt;</div><div style=": rgb248, 248, 252;"><br></div><div style=": rgb248, 248, 252;"><br></div>]]>
   </description>
   <pubDate>Mon, 08 Feb 2016 09:58:33 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22884&amp;PID=74412&amp;title=bug-in-chart-xml-saving#74412</guid>
  </item> 
 </channel>
</rss>