ecGraph Demos

 

 



ecGraph Demo3.   Bar Graph, 3D bars, colors and styles.


  • Bar Graph, 3D bars, colors and styles.
  • Scroll down below the screenshot image to see the VB code that was used to generate the graph.

 

The VB code used to generate the above graph...

Public Sub Demo3(ecGraph1 As ecGraph)
  'Bar Graph, 3D bars, colors and styles
  Dim i, X As Double, Y As Double
  With ecGraph1
    Call .Reset 'Always call "Reset" first to clear the page
    
    'Start a new graph on the page..
    Call .NewGraph("Bar Graph, 3D bars, colors and styles")
    Call .BorderStyle(ecCadetDarkBlue, ecLightCyan, 0, 1, , , -1, 7, -1, -1)
    Call .LegendTableStyle(, , 21, 25, , 0, , , , , , True)
    
    'Start a new data set on the graph, and add random points..
    Call .NewDataSet("Data 1")
    Call .SymbolStyle(1, 7, ecLightCyan, 6750208, 1, True) '3D bar, width 5mm
    For i = 1 To 9
      X = 2 * i
      Y = Sqr(i) - Rnd(i) / 2
      Call .AddDataPoint(X, Y)
    Next i
    
    Call .PlotAreaColors(ecBlack, ecDarkBlue, 120, , -6)
    Call .Refresh 'Always end with "Refresh"
  End With
End Sub  


  Copyright © 2007, Encore Consulting Pty Ltd.                                                     www.encoreconsulting.com.au