Bogemic Software        Bogemic Software RSS  Subscribe: RSS       Products  |  Purchase  |  Support  |  Contact      
Products
  Bogemic Apps
  Bogemic Docs
  Bogemic Studio
  Bogemic Grid
  Services
Order Now
Ordering Process
Documentation
Press Releases
Reseller
Feedback Form
Technical Support
Contact

Adding Chart

« Back Forward »

Methods: AddChart, RemoveChart
Properties: Chart, Chart.Type, Chart.Font, Chart.Look3D, Chart.Data

Creating a chart

A chart can be added using the AddChart method:

grid.AddChart "MyChart"

' chart can be deleted later by calling RemoveChart
' grid.RemoveChart "MyChart"

' Now get access to the chart object
Set chart = grid.Chart("MyChart")

Customizing the chart properties

The IBGMChart interface has many useful properties and we show here some of them.

Change the chart type:

' set type of chart to ChartType_Column
chart.Type = ChartType_Column

Change the font size:

' let us make the font smaller
chart.Font.Size = chart.Font.Size - 2

Turn off 3D appearance:

' set 2D mode
chart.Look3D = false

Get the number of data items:

' get chart data
data = chart.Data

' get current number of items
MsgBox UBound( data ) + 1

Actually we have 3 data items, but the Data array contains three elements for each data item:

' change first data item
data(0) = 100
data(1) = "label1"
data(2) = RGB(255,0,0)

' change second data item
data(3) = 300
data(4) = "label2"
data(5) = RGB(255,255,0)

' change third data item
data(6) = 600
data(7) = "label3"
data(8) = RGB(0,255,0)

' assign changed data to chart
chart.Data = data

« Back Up Forward »