-
Notifications
You must be signed in to change notification settings - Fork 4
Using the UCChartArea Control
George Karras edited this page Dec 4, 2024
·
1 revision
The ucChartArea was publish on vbforouns. See ucChartArea from Leandro Ascierto.
For using it we have to use vbCollection objects which we can do that from M2000.

function newCollection {
declare list1 Collection
=list1
}
flush
declare FORM1 form
declare Chart type "M2000.ucChartArea" form FORM1
Method FORM1,"move", 1000, 1000, 14000, 12000
Layer Form1 {Gradient 11, #7777aa}
With Chart,"BackColorOpacity", 0, "title", "Chart Example", "LinesCurve", true
Method Chart,"move", 1000, 1000, 12000, 10000
data "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio"
Value1=newCollection()
while not empty
method Value1, "add", letter$
end while
Method Chart, "AddAxisItems", Value1
Value1=newCollection()
Data 2,5,7,-10, 5, 10
while not empty
method Value1, "add", number
end while
Method Chart, "AddLineSeries", "2007", Value1, color(255,0,0)
Data 8, 4, 45, -15, 9, 14
Value1=newCollection()
while not empty
method Value1, "add", number
end while
Method Chart, "AddLineSeries", "2008", Value1, color(0,0,255)
Value1=newCollection()
Data 14, 8, 16,4, 24, 3
while not empty
method Value1, "add", number
end while
Method Chart, "AddLineSeries", "2009", Value1, color(0,255,0)
function form1.click {
layer form1 {
Gradient random(7,14), #7777aa
refresh
}
}
function Chart.MouseMove(&A, &B, &X, &Y) {
Print A, B, X, Y
Refresh
}
function Chart.Click() {
Print "Thank you"
refresh
}
METHOD FORM1 "SHOW", 1
declare FORM1 NOTHING