HighTechTalks DotNet Forums  

using stock graph in Office web component

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss using stock graph in Office web component in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
sudhakar
 
Posts: n/a

Default using stock graph in Office web component - 06-12-2005 , 10:19 PM






I am using Office web component and .net for a stock data analyzer

I could not get a hollow bar for a open>close and filled for close>open, as
when processsed in excel(open,high,low,close sequence)

This is the code i have used


opens = New Object(count + 3) {}
highs = New Object(count + 3) {}
lows = New Object(count + 3) {}
closes = New Object(count + 3) {}
cats = New Object(count + 3) {}

For i = 0 To (count - 1)

cats(i) = Form2.datatable2.Rows(i)(2)
'MessageBox.Show(cats(i))
opens(i) = Form2.datatable2.Rows(i)(4)
highs(i) = Form2.datatable2.Rows(i)(5)
lows(i) = Form2.datatable2.Rows(i)(6)
closes(i) = Form2.datatable2.Rows(i)(7)

Next
m_Chart = AxChartSpace1.Charts.Add
Dim oSer As owc10.ChSeries = m_Chart.SeriesCollection.Add

Dim trend As owc10.ChTrendline = oSer.Trendlines.Add
trend.IsDisplayingEquation = False
trend.Type = owc10.ChartTrendlineTypeEnum.chTrendlineTypeLinear

m_Chart.Type = owc10.ChartChartTypeEnum.chChartTypeStockOHLC

oSer.SetData(owc10.ChartDimensionsEnum.chDimCatego ries, -1, cats)
oSer.SetData(owc10.ChartDimensionsEnum.chDimOpenVa lues, -1, opens)
oSer.SetData(owc10.ChartDimensionsEnum.chDimHighVa lues, -1, highs)
oSer.SetData(owc10.ChartDimensionsEnum.chDimLowVal ues, -1, lows)
oSer.SetData(owc10.ChartDimensionsEnum.chDimCloseV alues, -1, closes)

'oSer.Interior.SetTextured(owc10.ChartPresetTextur eEnum.chTextureDenim)
'm_Chart.PlotArea.Interior.Color =
owc10.ChartColorIndexEnum.chColorNone
'm_Chart.PlotArea.Border.Color = owc10.ChartColorIndexEnum.chColorNone

' Turn on render and layout events.
AxChartSpace1.AllowLayoutEvents = True
AxChartSpace1.AllowRenderEvents = True


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.