From bc0cd209707e3591d94f0ec57d973ee81560390d Mon Sep 17 00:00:00 2001 From: Sabine Lim Date: Tue, 16 May 2023 03:13:23 +1000 Subject: [PATCH] Update Graph --- Basalt/objects/Graph.lua | 12 ++++++++++++ Basalt/plugins/xml.lua | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Basalt/objects/Graph.lua b/Basalt/objects/Graph.lua index 094f798..f6a145c 100644 --- a/Basalt/objects/Graph.lua +++ b/Basalt/objects/Graph.lua @@ -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() diff --git a/Basalt/plugins/xml.lua b/Basalt/plugins/xml.lua index 52b92b8..59d4c23 100644 --- a/Basalt/plugins/xml.lua +++ b/Basalt/plugins/xml.lua @@ -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"]