Print Page | Close Window

Bug in chart xml saving

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Chart Control
Forum Description: Topics Related to Codejock Chart Control
URL: http://forum.codejock.com/forum_posts.asp?TID=22884
Printed Date: 16 April 2024 at 12:57am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Bug in chart xml saving
Posted By: ericgen
Subject: Bug in chart xml saving
Date Posted: 08 February 2016 at 9:58am
Hi,

We intend to make heavy use of the XML functionality of the chart control.  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. 

Is this a bug or is there something to do to save that information?

We have modified the chart browser sample to save the xml as follows:

void CBaseView::OnFileSave()
{
CFileDialog dlg(FALSE);
if (dlg.DoModal() != IDOK)
return;

CXTPPropExchangeXMLNode px(FALSE, NULL, _T("Content"));
CXTPChartContent* pContent = m_wndChartControl.GetContent();
pContent->DoPropExchange(&px);
CFile file;
if (!file.Open(dlg.GetPathName(), CFile::modeWrite | CFile::modeCreate))
return;
USES_CONVERSION;
CStringA sXML = W2A(px.GetEncodedXML(TRUE));
file.Write(sXML.GetBuffer(), sXML.GetLength());
}

And when we load this, for example the bar chart, here is what we get:


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:

<FillStyle FillMode="Gradient" GradientAngle="BottomRightToTopLeft"/>

But the chart control only understands:

<FillStyle FillMode="Gradient" GradientDirection="BottomRightToTopLeft"/>





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net