From 03e625f2905af1ca409bce5ca015a33e0d9dfbfa Mon Sep 17 00:00:00 2001 From: NoryiE Date: Tue, 4 Mar 2025 00:54:19 +0000 Subject: [PATCH] deploy: c0b404d0cd06d9bcabbfcc1efa92152681f4501c --- docs/references/elements/BarChart.md | 17 ++++++ docs/references/elements/Graph.md | 88 ++++++++++++++++++++++++--- docs/references/elements/LineChart.md | 17 ++++++ 3 files changed, 112 insertions(+), 10 deletions(-) create mode 100644 docs/references/elements/BarChart.md create mode 100644 docs/references/elements/LineChart.md diff --git a/docs/references/elements/BarChart.md b/docs/references/elements/BarChart.md new file mode 100644 index 0000000..275e0a8 --- /dev/null +++ b/docs/references/elements/BarChart.md @@ -0,0 +1,17 @@ +# BarChart : Graph +This is the bar chart class. It is based on the graph element. It draws bar based points. + +## Functions + +|Method|Returns|Description| +|---|---|---| + + +## Protected Functions + +|Method|Returns|Description| +|---|---|---| +|[BarChart:init](#BarChart:init)|BarChart|Initializes the BarChart instance +|[BarChart:render](#BarChart:render)|-|Renders the BarChart + + diff --git a/docs/references/elements/Graph.md b/docs/references/elements/Graph.md index 59cd7a2..a2dbd70 100644 --- a/docs/references/elements/Graph.md +++ b/docs/references/elements/Graph.md @@ -1,24 +1,92 @@ # Graph : VisualElement +This is the base class for all graph elements. It is a point based graph. + +## Properties + +|Property|Type|Default|Description| +|---|---|---|---| +|minValue|number|0|The minimum value of the graph +|maxValue|number|100|The maximum value of the graph +|series|table|{}|The series of the graph ## Functions |Method|Returns|Description| |---|---|---| -|[Graph.new](#Graph.new)|-| -|[Graph:addPoint](#Graph:addPoint)|-| -|[Graph:init](#Graph:init)|-| -|[Graph:render](#Graph:render)|-| -|[Graph:setPoint](#Graph:setPoint)|-| +|[Graph:addPoint](#Graph:addPoint)|Graph|Adds a point to a series +|[Graph:addSeries](#Graph:addSeries)|-|Adds a series to the graph +|[Graph:changeSeriesVisibility](#Graph:changeSeriesVisibility)|Graph|Changes the visibility of a series +|[Graph:focusSeries](#Graph:focusSeries)|Graph|Focuses a series +|[Graph:getSeries](#Graph:getSeries)|table?|Gets a series from the graph +|[Graph:removeSeries](#Graph:removeSeries)|Graph|Removes a series from the graph +|[Graph:setSeriesPointCount](#Graph:setSeriesPointCount)|Graph|Sets the point count of a series -## Graph.new() +## Protected Functions -## Graph:addPoint() +|Method|Returns|Description| +|---|---|---| +|[Graph:init](#Graph:init)|Graph|Initializes the Graph instance +|[Graph:render](#Graph:render)|-|Renders the graph -## Graph:init() +## Graph:addPoint(name, value) -## Graph:render() +### Parameters +* `name` `string` The name of the series +* `value` `number` The value of the point -## Graph:setPoint() +### Returns +* `Graph` `self` The graph instance + +## Graph:addSeries(name, symbol, bgCol, fgCol, pointCount) + +### Parameters +* `name` `string` The name of the series +* `symbol` `string` The symbol of the series +* `bgCol` `number` The background color of the series +* `fgCol` `number` The foreground color of the series +* `pointCount` `number` The number of points in the series + +## Graph:changeSeriesVisibility(name, visible) + +### Parameters +* `name` `string` The name of the series +* `visible` `boolean` Whether the series should be visible + +### Returns +* `Graph` `self` The graph instance + +## Graph:focusSeries(name) + +### Parameters +* `name` `string` The name of the series + +### Returns +* `Graph` `self` The graph instance + +## Graph:getSeries(name) + +### Parameters +* `name` `string` The name of the series + +### Returns +* `table?` `series` The series + +## Graph:removeSeries(name) + +### Parameters +* `name` `string` The name of the series + +### Returns +* `Graph` `self` The graph instance + +## Graph:setSeriesPointCount(name, count) + +### Parameters +* `name` `string` The name of the series +* `count` `number` The number of points in the series + +### Returns +* `Graph` `self` The graph instance diff --git a/docs/references/elements/LineChart.md b/docs/references/elements/LineChart.md new file mode 100644 index 0000000..86e5bfe --- /dev/null +++ b/docs/references/elements/LineChart.md @@ -0,0 +1,17 @@ +# LineChart : Graph +This is the line chart class. It is based on the graph element. It draws lines between points. + +## Functions + +|Method|Returns|Description| +|---|---|---| + + +## Protected Functions + +|Method|Returns|Description| +|---|---|---| +|[LineChart:init](#LineChart:init)|LineChart|Initializes the LineChart instance +|[LineChart:render](#LineChart:render)|-|Renders the LineChart + +