getProperty() and setProperty() #80

Merged
thesabinelim merged 22 commits from get-set-property into master 2023-05-16 01:24:16 +08:00
2 changed files with 15 additions and 3 deletions
Showing only changes of commit bc0cd20970 - Show all commits

View File

@@ -32,10 +32,18 @@ return function(name, basalt)
return self
end,
setGraphSymbolColor = function(self, symbolColor)
return self:setGraphSymbolColor(nil, symbolColor)
end,
getGraphSymbol = function(self)
return graphSymbol, graphSymbolCol
end,
getGraphSymbolColor = function(self)
return graphSymbolCol
end,
addDataPoint = function(self, value)
if value >= minValue and value <= maxValue then
table.insert(graphData, value)
@@ -75,6 +83,10 @@ return function(name, basalt)
return self
end,
getGraphType = function(self)
return graphType
end,
setMaxEntries = function(self, value)
maxEntries = value
self:updateDraw()

View File

@@ -801,11 +801,11 @@ return {
base.setValuesByXMLData(self, data, renderContext)
self:updateSpecifiedValuesByXMLData(data, {
"maxEntries",
"type",
"graphType",
"minValue",
"maxValue",
"symbol",
"symbolColor"
"graphSymbol",
"graphSymbolColor"
})
if(data["item"]~=nil)then
local tab = data["item"]