All values in OWC11 chart are 1

R

r7dis8qh

I've been struggling to get a correct chart from an XML source - all
the values in the chart are displayed as 1

I've got it down to about the simplest possible code, can anyone
explain to me where I'm going wrong?

my asp:

<%

Set oChartSpace = Server.CreateObject("OWC11.Chartspace")

Set C = oChartSpace.Constants

oChartSpace.Clear

oChartSpace.ConnectionString = "Provider=MSPersist;"

oChartSpace.CommandText = Server.MapPath(".") & "\test1.xml"



oChartSpace.SetData c.chDimCategories, 0, "ID"

oChartSpace.SetData c.chDimValues, 0, "SALES"



oChartSpace.ExportPicture Server.MapPath(".") & "\" & "test1.gif",
"gif", 700, 440



Response.Write "<img src=""test1.gif"" >"

%>

the sample xml:

<xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'

xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'

xmlns:rs='urn:schemas-microsoft-com:rowset'

xmlns:z='#RowsetSchema'>

<s:Schema id='RowsetSchema'>

<s:ElementType name='row' content='eltOnly'>

<s:AttributeType name='ID' rs:number='1' rs:nullable='true'>

<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='4000'/>

</s:AttributeType>

<s:AttributeType name='SALES' rs:number='2' rs:nullable='true'>

<s:datatype dt:type='number' rs:dbtype='varnumeric'

dt:maxLength='38' rs:scale='255' rs:precision='255'/>

</s:AttributeType>

<s:extends type='rs:rowbase'/>

</s:ElementType>

</s:Schema>

<rs:data>

<z:row ID='id1' SALES='3'/>

<z:row ID='id2' SALES='8'/>

<z:row ID='id3' SALES='1'/>

<z:row ID='id4' SALES='8'/>

<z:row ID='id5' SALES='7'/>

<z:row ID='id6' SALES='8'/>

</rs:data>

</xml>
 
R

r7dis8qh

I've worked something out, but its not making a lot of sense to me...

it's plotting a count of the occurrences of the value against the
category rather than the value, ie, if i change the xml to:

<rs:data>

<z:row ID='id1' SALES='3'/>

<z:row ID='id2' SALES='8'/>

<z:row ID='id3'/>

<z:row ID='id4' SALES='8'/>

<z:row ID='id4' SALES='1'/>

<z:row ID='id5' SALES='7'/>

<z:row ID='id6' SALES='8'/>

</rs:data>


ID3 becomes 0 and id4 becomes 2

how do i make it use the value?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top