Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Local i
Store 0 To i
Dimension laLabels[3]
Dimension laData[3]
Dimension laData2[3]
Create Cursor final (pic m)
Create Cursor sales (Name c(20),total1 N(10),total2 N(10))
Insert Into sales (Name,total1,total2) Values ("Total sales Mike",1000,2000)
Insert Into sales (Name,total1,total2) Values ("Total sales Frank",2550,2500)
Insert Into sales (Name,total1,total2) Values ("Total sales Fred",1292,500)
Go Top
Do While !Eof()
i = i +1
laLabels[i]=sales.Name
laData[i]=sales.total1
laData2[i]=sales.total2
Select sales
Skip
Enddo
loChartSpace = Createobject("OWC10.ChartSpace")
oConst = loChartSpace.Constants
loGraph = loChartSpace.Charts.Add()
loGraph.Type =47
loGraph.HasLegend = .T.
loGraph.PlotArea.Interior.Color="Pink"
loChartSpace.HasChartSpaceTitle = .T.
loChartSpace.ChartSpaceTitle.Caption = "Monthly Sales for My Company Inc."
loChartSpace.ChartSpaceTitle.Font.Bold = .T.
loGraph.SeriesCollection.Add()
loGraph.SeriesCollection(0).Caption = "Sales of widgets #1"
loGraph.SeriesCollection(0).SetData(oConst.chDimCategories, oConst.chDataLiteral, @laLabels)
loGraph.SeriesCollection(0).SetData(oConst.chDimValues, oConst.chDataLiteral, @laData)
loGraph.SeriesCollection.Add()
loGraph.SeriesCollection(1).Caption = "Sales of widgets #2"
loGraph.SeriesCollection(1).SetData(oConst.chDimValues, oConst.chDataLiteral, @laData2)
lcFile = Sys(2023) + "\" + Sys(2015) + ".jpg"
loChartSpace.ExportPicture(lcFile, "jpg",800,600)
oBrowser = CREATEOBJECT("internetexplorer.application")
oBrowser.navigate(lcFile)
oBrowser.visible = .t.