Chartspace

  • Thread starter Thread starter Leslie
  • Start date Start date
L

Leslie

Is this the place to ask for more reference information on
the chartspace object?

I'm trying to modify some examples in MSDN to create an
xlscatterplot chart and need to know how to find the
constants that apply to chartspace, for example, the
constants that apply to chartspace.type. Is this
documented in MSDN, in Excel 2002, or where?

Also, more detailed info on the entire use of chartspace
would be very helpful.

Leslie
 
Hi Leslie,

Thanks for your post.

I recommend you refer to "Microsoft Office Web Components Object Models" in
MSDN or MSDN onlene at
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/owcvba10/h
tml/octocMSOWCObjectModels.asp?frame=true> which provide detailed
information on chartspace as well as other objects, methods, properties and
events.

For the Type property specifically, you can access it with lists of
constants in MSDN or MSDN online at:
Type Property
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/owcvba10/ht
ml/ocproType.asp?frame=true

I believe the following MSDN aritcle is also helpful:
Off the Chart Access
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoffpro01/
html/OfftheChartAccess.asp

By the way, it you have further questions regarding Office developerment, I
recommend you resort to the following newsgroups:
microsoft.public.office.developer
microsoft.public.officedev

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Tim,

Thanks for your query. Actually I have still not gotten
either a fix for my specific question--how to create an
XYScatter plot using XML as the data source; nor has
anyone been able to point out to me detailed documentation
on how to set up an XY Scatter plot. The documentation
you mentioned in an earlier post is not specific to XY
Scatter plots and I have spent a lot of hours guessing at
the syntax. Very frustrating.

I have also been corresponding on the web.components list
and have not gotten anywhere with that, either.

Please point me to detailed documentation for this.

Thank-you.

Leslie
 
Hi Leslie,

Here's a VB.NET example that illustrates how you can bind an OWC Chart to
an XML Data Source and build an XY Scatter chart:

AxChartSpace1.ConnectionString = "provider=mspersist"
AxChartSpace1.CommandText = "c:\proddata.xml"
AxChartSpace1.HasPlotDetails = True
AxChartSpace1.Charts(0).Type =
OWC10.ChartChartTypeEnum.chChartTypeScatterMarkers
AxChartSpace1.SetData(OWC10.ChartDimensionsEnum.chDimXValues, 0,
"ProductID")
AxChartSpace1.SetData(OWC10.ChartDimensionsEnum.chDimYValues, 0,
"UnitPrice")

The XML used in this sample is based off of the Products table in the
Northwind sample database:

<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' rs:CommandTimeout='30'>
<s:AttributeType name='ProductID' rs:number='1'>
<s:datatype dt:type='int' dt:maxLength='4' rs:precision='10'
rs:fixedlength='true' rs:maybenull='false'/>
</s:AttributeType>
<s:AttributeType name='UnitPrice' rs:number='2' rs:nullable='true'
rs:writeunknown='true'>
<s:datatype dt:type='number' rs:dbtype='currency' dt:maxLength='8'
rs:precision='19' rs:fixedlength='true'/>
</s:AttributeType>
<s:extends type='rs:rowbase'/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row ProductID='1' UnitPrice='18'/>
<z:row ProductID='2' UnitPrice='19'/>
<z:row ProductID='24' UnitPrice='4.5'/>
<z:row ProductID='34' UnitPrice='14'/>
<z:row ProductID='35' UnitPrice='18'/>
<z:row ProductID='38' UnitPrice='263.5'/>
<z:row ProductID='39' UnitPrice='18'/>
<z:row ProductID='43' UnitPrice='46'/>
<z:row ProductID='67' UnitPrice='14'/>
<z:row ProductID='70' UnitPrice='15'/>
<z:row ProductID='75' UnitPrice='7.75'/>
<z:row ProductID='76' UnitPrice='18'/>
</rs:data>
</xml>

It's important to note that when you use the MSPersist provider to bind an
OWC chart to an XML data source that the XML data source use the Recordset
Persistance shema -- if the XML does not follow this schema, the provider
will be unable to interpret the data as a recordset.

Additional Resources:

HOW TO: Find Office Web Components (OWC) Programming Documentation and
Samples
http://support.microsoft.com/default.aspx?scid=kb;en-us;319793

Use An XML Data Source with the Office XP Chart Component (Q286212)
http://support.microsoft.com/?id=286212

Saving ADO Recordsets in XML Format
http://msdn.microsoft.com/library/psdk/dasdk/xmli546n.htm

Hope this helps you!

Lori Turner
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
Back
Top