Home > howto > makechart 
 en fr de es it nl pl pt pt_BR mk sq ca hu tr ar fa id vi ko ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Search  Administration  
Documentation  
Warning! This page is not translated.  See english version 
How To make a chart with the gb.chart component
First, activate the gb.chart Komponenty in your project.

Chart Data structure

The structure of the chart Komponenty is simple. A gb.chart have :

By default a first dataset is create.

A dataset is an array that contain float datas.

Example


'Set the column headers

Chart.Headers = ["Tic", "Tac", "Toes"]

'I've only one set, so no need to add one more.
'Set the values :

Chart[0].Values [1.0, 2.0, 3.0]  ' the .0 force to return a float[] array

'but you can use this way too : Chart[0].Add(1.0)

'Auto size the fonts, proportionally.
'Normal font size for a chart at 2/3 of the Screen size.
Chart.Proportionnal = true

'Set the title
Chart.Title = "My Chart"


'Set the legend visible
Chart.Legend.Visible = true
Chart.Legend.Title = "My Legend"

Chart.YAxe.ShowIntervalLines.Visible = True

'ChartType
Chart.Type = ChartType.Lines

'CustomColors
Chart.Style = ChartStyle.Custom
Chart.Colors.Values = [Color.yellow, Color.red, Color.Blue]


Then to draw the chart. For exemple in a Drawing area :

PUBLIC SUBDrawingArea1_Draw()

  Chart.Width = DrawingArea1.ClientHeight
  Chart.Height = DrawingArea1.ClientWidth
  Chart.Draw()

END