SELECT GraphBmp ZAP APPEND BLANK REPLACE GraphBmp WITH Graph.Graph SELECT GraphDat cGraphString = "" * Build tab-delimited string of field names: FOR iCounter = 1 TO FCOUNT("GraphDat") cGraphString = cGraphString + FIELDS(iCounter) ; + IIF(iCounter < FCOUNT("GraphDat"),CHR(9),chr(13)) ENDFOR * Concatenate the data, converting numeric fields to character: SCAN FOR iCounter = 1 TO FCOUNT("GraphDat") cGraphString = cGraphString + IIF(TYPE(Fields(iCounter))='C',; EVALUATE(FIELDS(iCounter)) ; ,str(EVALUATE(FIELDS(iCounter)),16,2); ); + IIF(iCounter < FCOUNT("GraphDat"),CHR(9),CHR(13)) ENDFOR ENDSCAN SELECT GraphBmp APPEND GENERAL GraphBmp DATA cGraphStringIn the above example, GraphDat contains the seed graph and GraphDat contains the data sheet for the graph. To manipulate the graph's properties, you need to do it in a form like so:
FrmDummy=CREATEOBJECT("Form") FrmDummy.ADDOBJECT("OleGraph","OleBoundControl") WITH FrmDummy.OleGraph .Height = 900 .Width = 600 .ControlSource = "GraphBmp.GraphBmp" .ChartArea.Border.Color = RGB(0,0,128) .ChartArea.Interior.Color = RGB(255,255,128) .HasLegend = .T. .HasTitle = .F. .Legend.LegendEntries(1).Legendkey.Interior.Color = RGB(255,0,0) && Red .Legend.LegendEntries(2).Legendkey.Interior.Color = RGB(255,0,128) && Pink .Legend.LegendEntries(3).Legendkey.Interior.Color = RGB(255,255,0) && Yellow .Legend.LegendEntries(4).Legendkey.Interior.Color = RGB(0,255,255) && Cyan .Legend.LegendEntries(5).Legendkey.Interior.Color = RGB(0,0,128) && Blue .HasLegend = .F. .Axes(1).TickLabels.Font.Size = 10 .Axes(2).HasTitle = .T. .Axes(2).AxisTitle.Caption = "Thousands of Dollars" .Axes(2).AxisTitle.Font.Size = 10 .Axes(2).TickLabels.Font.Size = 10 ENDWITH RELEASE FrmDummyHope this helps get you started.