-
Notifications
You must be signed in to change notification settings - Fork 0
Chart:SetXY
OliverF edited this page Jun 12, 2014
·
2 revisions
Sets the data points of the chart's series.
nil chart:SetXY(table data, string seriesName)
- nil
- table
data
A table containing sub-tables representing each data point. The sub-tables each contain one X value and one Y value, indexedxandyrespectively. See the example for more details. - string
seriesName
Specifies the chart's series to update. The series must be created withChart:CreateSeries()first.
local chart = RSAS.GUI.Control("chart", "demo_chart")
chart:CreateSeries("My Test Series", "line")
local myData = {}
table.insert(myData, {x = 0, y = 1})
table.insert(myData, {x = 1, y = 3})
table.insert(myData, {x = 2, y = 4})
table.insert(myData, {x = 3, y = 8})
chart:SetXY(myData, "My Test Series")