User (Legacy) Posted July 9, 2002 Report Share Posted July 9, 2002 Help!!!!! I'm specifying the following XML data to my chart: <?xml version="1.0"?> <DATA> <COLUMNS> <COLUMN NAME="Market" TYPE="STRING"/> <COLUMN NAME="Sales" TYPE="FLOAT"/> <COLUMN NAME="TotalExpenses" TYPE="FLOAT"/> </COLUMNS> <ROW Market="Acton" Sales="1457.0" TotalExpenses="945.0" /> <ROW Market="Akron" Sales="3666.0" TotalExpenses="1900.0" /> <ROW Market="Albuquerque" Sales="11264.0" TotalExpenses="8008.0" /> </DATA> The following is the XML I'm using to define the chart properties: <?xml version="1.0" ?> <CHARTFX> <PROP Name="TypeMask" Value="1183318020" /> </CHARTFX> In addition, I'm doing this from the ASP: To load the properties and data in the ASP, I'm using this: ' Create the XML data provider object Set SfxXML = Server.CreateObject("SfxXMLData.XMLData") SfxXML.BagTagName = "PROP" SfxXML.BagAttrName = "NAME" SfxXML.BagAttrValue = "VALUE" SfxXML.BagTagObject = "OBJECT" SfxXML.LoadFromString xmlProps ' Standard Chart FX's method for retrieving data of a data provider Chart.GetExternalData SfxXML ' Some code here that bodges around the fact I can't set the position of the ' Series Legend validxy = 1 ' This gets set in a parameter in the URL for the ASP if (validxy <> "") then chart.DataType(validxy) = CDT_VALUE chart.DataType(validxy + 1) = CDT_XVALUE end if Set SfxXML2 = Server.CreateObject("SfxXMLData.XMLData") SfxXML2.LoadFromString xmlData Chart.GetExternalData SfxXML2 Chart.RecalcScale %> <%= chart.GetHtmlTag(600,300,"Image") %> What's happening is that I get a points for Sales, but no points for TotalExpenses. If validxy is set to zero, then I get a points for Market, and points for TotalExpenses. Obviously, the "points" for market are all zero... It's weird. Can anybody help? Thanks, Marc Link to comment Share on other sites More sharing options...
Software FX Posted July 12, 2002 Report Share Posted July 12, 2002 By setting the DataType to CDT_XVALUE you are saying the TotalExpenses column should be used as the X axis coordinate, if this is a bar chart X values are ignored. Can you comment out the DataType settings or set the following data types Chart.DataType(0) = CDT_LABEL Chart.DataType(1) = CDT_VALUE Chart.DataType(2) = CDT_VALUE Maybe I am missing something but your data does not seem to be XY data. -- Regards JC Software FX Support "The Nomad" <nobody@nowhere.com> wrote in message news:Od5LY17JCHA.2752@webserver1.softwarefx.com... > Help!!!!! > > I'm specifying the following XML data to my chart: > > <?xml version="1.0"?> > <DATA> > <COLUMNS> > <COLUMN NAME="Market" TYPE="STRING"/> > <COLUMN NAME="Sales" TYPE="FLOAT"/> > <COLUMN NAME="TotalExpenses" TYPE="FLOAT"/> > </COLUMNS> > <ROW Market="Acton" Sales="1457.0" TotalExpenses="945.0" /> > <ROW Market="Akron" Sales="3666.0" TotalExpenses="1900.0" /> > <ROW Market="Albuquerque" Sales="11264.0" TotalExpenses="8008.0" /> > </DATA> > > > The following is the XML I'm using to define the chart properties: > > <?xml version="1.0" ?> > <CHARTFX> > <PROP Name="TypeMask" Value="1183318020" /> > </CHARTFX> > > In addition, I'm doing this from the ASP: > > > To load the properties and data in the ASP, I'm using this: > > ' Create the XML data provider object > Set SfxXML = Server.CreateObject("SfxXMLData.XMLData") > > SfxXML.BagTagName = "PROP" > SfxXML.BagAttrName = "NAME" > SfxXML.BagAttrValue = "VALUE" > SfxXML.BagTagObject = "OBJECT" > > SfxXML.LoadFromString xmlProps > > ' Standard Chart FX's method for retrieving data of a data provider > Chart.GetExternalData SfxXML > > ' Some code here that bodges around the fact I can't set the position of the > ' Series Legend > > validxy = 1 ' This gets set in a parameter in the URL for the ASP > > if (validxy <> "") then > chart.DataType(validxy) = CDT_VALUE > chart.DataType(validxy + 1) = CDT_XVALUE > end if > > Set SfxXML2 = Server.CreateObject("SfxXMLData.XMLData") > SfxXML2.LoadFromString xmlData > Chart.GetExternalData SfxXML2 > > Chart.RecalcScale > > %> > > > <%= chart.GetHtmlTag(600,300,"Image") %> > > What's happening is that I get a points for Sales, but no points for > TotalExpenses. If validxy is set to zero, then I get a points for Market, > and points for TotalExpenses. Obviously, the "points" for market are all > zero... > > It's weird. Can anybody help? > > Thanks, > > Marc > > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.