HTFC Forums

H.T.F.C.

How To Fix Computers





Go Back   HTFC Forums > Software Newsgroups > Microsoft Office

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-27-2007, 07:19 AM
abhilashcs
 
Posts: n/a
Default OWC10 web chart


I am using OWC10 web chat with chChartTypeScatterLine

The following is the BV script to display the data in the chart... but
i am not able to display the X axis value. Currently the X axis value is
DateTime. When i hard code this DateTime, the chart shows the date and
time, when i use the array values it is not showing.. pls help me

<script language="vbscript">
Sub Window_OnLoad()
'Extract the contents of the XML Data island and insert it into
two
'arrays: one array for the chart categories and one array for
the
'chart values.
Dim nCount, nodes, i
Dim array1_Value, array2_Value, array3_Value',MaxMin_Value
Set nodes = dsXML.XMLDocument.childNodes.item(0).childNodes
nCount = nodes.length-1

if nCount > 0 then
Redim aTimeStamp(nCount)
Redim aWaterLevel(nCount)
Redim array1(nCount)
Redim array2(nCount)
Redim array3(nCount)


array1_Value = nodes.item(nCount).ChildNodes.item(0).text
array2_Value = nodes.item(nCount).ChildNodes.item(1).text
array3_Value = nodes.item(nCount).ChildNodes.item(2).text

'Create a chart from the array data.
'Bind the chart to the recordset.
Dim c
Set c = CSpace.Constants
Dim oChart, oSer
CSpace.Clear

Set oChart = CSpace.Charts.Add

Dim oSeries1, oSeries2,oSeries3
dim oConst
CSpace.Clear
Set oConst = CSpace.Constants
Set oChart = CSpace.Charts.Add

for each axis in oChart.Axes
axis.HasTitle = True
if axis.Type = c.chCategoryAxis then
axis.Title.Caption = "Time"
else
axis.Title.Caption = "Water Level"

end if
next

For i=1 to nCount
aTimeStamp(i) = nodes.item(i-1).ChildNodes.item(0).text
aWaterLevel(i) = nodes.item(i-1).ChildNodes.item(1).text

array1(i) = array1_Value
array2(i) = array2_Value
array3(i) = array3_Value

Next

Set oSeries1 = oChart.SeriesCollection.Add
With oSeries1
..Caption = "Calls"
..Type = oConst.chChartTypeScatterLine
..SetData oConst.chDimXValues, -1,_
Array(#11/1/2006 12:02#, #11/2/2006 12:04#, #11/5/2006
12:08#, #11/7/2006 12:10#,#11/24/2006 12:20#,#11/27/2006
13:34#,#12/06/2006 14:44#,#12/10/2006 18:20#,#1/3/2007 20:10#)

..SetData oConst.chDimYValues,-1,aWaterLevel

End With

With oChart.Axes(oConst.chAxisPositionBottom)
..NumberFormat="ddmmmyy h:mm"
End With

end if
End Sub
</script>


may mail id is abhilashcs@gmail.com


--
abhilashcs
------------------------------------------------------------------------
abhilashcs's Profile: http://www.officehelp.in/members/7214/abhilashcs
View this thread: http://www.officehelp.in/1545359/owc10-web-chart

http://www.officehelp.in

Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visio Org Chart from Exchange Chris Microsoft Office 2 08-14-2007 08:24 AM
Where is the Org Chart in Office 2007? Saqib Ali Microsoft Office 12 06-08-2007 01:58 PM
Chart Macro Beep Beep Microsoft Office 0 05-25-2007 10:49 PM
how do i convert a gantt chart to a word format suey Microsoft Office 1 04-12-2007 11:49 AM
chore chart billierene Microsoft Office 1 04-09-2007 10:24 AM


All times are GMT. The time now is 04:10 PM.


Powered by vBulletin® Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© 2004 - 2007 Web-S-Sense Pty. Ltd. Usenet and forums posts © their respective authors.
Ad Management by RedTyger