OWC Chart Date Bug

G

Graham Epps

The following simple example incorrectly displays the dates along the category axis.

It interpolates dates for the data that do not exist, and moves the provided data values to actually different dates!



Is there a configuration option on the Chart Control that tells it to not interpret the date Category values?



Thanks.

G.





<OBJECT id='ChartSpace1' width=100% height=400
classid='CLSID:0002E556-0000-0000-C000-000000000046'
VIEWASTEXT>
</OBJECT>
<script language='VBScript'>



Sub Window_OnLoad()



Dim Categories
Dim Cnst
Dim Ser



ChartSpace1.Clear()



Set Cnst = ChartSpace1.Constants



ChartSpace1.Charts.Add()



Categories = Array( "7/1/2002", "8/1/2002", "9/1/2002", "10/1/2002", "11/1/2002", "12/1/2002" )



With ChartSpace1.Charts(0)



Set Ser = .SeriesCollection.Add()
Ser.SetData Cnst.chDimCategories, Cnst.chDataLiteral, Categories
Ser.SetData Cnst.chDimValues, Cnst.chDataLiteral, _
Array ( 12, 21, 35, 38, 27, 24 )



.Type = Cnst.chChartTypeColumnStacked3D



End With



End Sub
</script>
 
A

Alvin Bruney

I posted a gripe like this 2 weeks ago. It really is very disturbing that an
engine would manipulate your data. The short end is, the worthy folk at
microsoft decided to close the case on the bug I opened and sent me a
mailing address to post a letter to their development group.
I guess they didn't like being told that the bug existed.

I have a work around for it.
Replace the "/" to something else other than a "-". I use a "~". It prevents
the engine from recognizing it as a date and leaves it alone.

The following simple example incorrectly displays the dates along the
category axis.

It interpolates dates for the data that do not exist, and moves the provided
data values to actually different dates!



Is there a configuration option on the Chart Control that tells it to not
interpret the date Category values?



Thanks.

G.





<OBJECT id='ChartSpace1' width=100% height=400
classid='CLSID:0002E556-0000-0000-C000-000000000046'
VIEWASTEXT>
</OBJECT>
<script language='VBScript'>



Sub Window_OnLoad()



Dim Categories
Dim Cnst
Dim Ser



ChartSpace1.Clear()



Set Cnst = ChartSpace1.Constants



ChartSpace1.Charts.Add()



Categories = Array( "7/1/2002", "8/1/2002", "9/1/2002", "10/1/2002",
"11/1/2002", "12/1/2002" )



With ChartSpace1.Charts(0)



Set Ser = .SeriesCollection.Add()
Ser.SetData Cnst.chDimCategories, Cnst.chDataLiteral, Categories
Ser.SetData Cnst.chDimValues, Cnst.chDataLiteral, _
Array ( 12, 21, 35, 38, 27, 24 )



.Type = Cnst.chChartTypeColumnStacked3D



End With



End Sub
</script>
 
D

Disco

Graham said:
The following simple example incorrectly displays the dates along the
category axis.

It interpolates dates for the data that do not exist, and moves the
provided data values to actually different dates!

Is there a configuration option on the Chart Control that tells it to
not interpret the date Category values?

Thanks.

G.

<OBJECT id='ChartSpace1' width=100% height=400
classid='CLSID:0002E556-0000-0000-C000-000000000046'
VIEWASTEXT>
</OBJECT>
<script language='VBScript'>
Sub Window_OnLoad()
Dim Categories
Dim Cnst
Dim Ser
ChartSpace1.Clear()
Set Cnst = ChartSpace1.Constants
ChartSpace1.Charts.Add()
Categories = Array( "7/1/2002", "8/1/2002", "9/1/2002",
"10/1/2002", "11/1/2002", "12/1/2002" )
With ChartSpace1.Charts(0)
Set Ser = .SeriesCollection.Add()
Ser.SetData Cnst.chDimCategories, Cnst.chDataLiteral,
Categories
Ser.SetData Cnst.chDimValues, Cnst.chDataLiteral, _
Array ( 12, 21, 35, 38, 27, 24 )
.Type = Cnst.chChartTypeColumnStacked3D
End With
End Sub
</script>

Hi,

This will not help you with your question, but I have a question regarding
your code....

I have the XML data that I have produced for use with this object. Using
similar to your code, how to I set the propery "XMLData" for this object?

Thanks
 
G

Graham Epps

Hi,
I have the XML data that I have produced for use with this object. Using
similar to your code, how to I set the propery "XMLData" for this object?

Thanks


Easy,

you use the Object's Param(Name, Value) arguments.

here is an example:

<OBJECT id="ChartSpace1"
classid="CLSID:0002E556-0000-0000-C000-000000000046"
VIEWASTEXT>
<PARAM NAME="XMLData" VALUE='
<xml xmlns:x="urn:schemas-microsoft-com:eek:ffice:excel">
<x:ChartSpace>
<x:OWCVersion>10.0.0.4109 </x:OWCVersion>
<x:NoGrouping/>
<x:NoFiltering/>
<x:DefaultFont>Arial</x:DefaultFont>
</x:ChartSpace>
</xml>'>
</OBJECT>
 

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