Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Chart Control
  New Posts New Posts RSS Feed - Bug in chart xml saving
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Bug in chart xml saving

 Post Reply Post Reply
Author
Message
ericgen View Drop Down
Newbie
Newbie


Joined: 08 February 2016
Location: UK
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote ericgen Quote  Post ReplyReply Direct Link To This Post Topic: Bug in chart xml saving
    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"/>


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.