Skip to content

Commit

Permalink
📦 document maxEntries, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberbit committed Jun 2, 2024
1 parent 1e0e9df commit 1e4c499
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
11 changes: 9 additions & 2 deletions docs/reference/output/ChartLine.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ telem.output.plotter.chartLine (
win: window,
filter: string,
bg: color,
fg: color
fg: color,
maxEntries: number
)
```

Search the available metrics using the syntax defined in [`find`](/reference/MetricCollection#find) and output a line chart to a specified window. If a matching metric is found, the metric value is pushed to the chart buffer.

The X axis (horizontal value) represents the number of data points recorded, and has a fixed width of `50`. The Y axis (vertical) represents the value of the metric over time. Once the fixed width of the graph is reached, the oldest values will be dropped from the buffer when new values are added. The minimum and maximum range of the Y axis is determined by the minimum and maximum metric values in the graph buffer. The background of the widget and all labels will be `bg`, and the graph/text color will be `fg`.
The X axis (horizontal value) represents the number of data points recorded, and has a default width of `50`, which can be overridden by passing `maxEntries` in the constructor. The Y axis (vertical) represents the value of the metric over time. Once the fixed width of the graph is reached, the oldest values will be dropped from the buffer when new values are added. The minimum and maximum range of the Y axis is determined by the minimum and maximum metric values in the graph buffer. The background of the widget and all labels will be `bg`, and the graph/text color will be `fg`.

The minimum and maximum labels are designed to shorten themselves using SI suffixes to fit within the available width.

Expand Down Expand Up @@ -44,6 +45,12 @@ The minimum and maximum labels are designed to shorten themselves using SI suffi
type: 'color',
default: 'nil',
description: 'Foreground color (colors.*)'
},
{
name: 'maxEntries',
type: 'number',
default: '50',
description: 'Maximum entries in the chart buffer'
}
]"
>
Expand Down
11 changes: 9 additions & 2 deletions docs/reference/output/basalt/Graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ telem.output.basalt.graph (
frame: Basalt.Container,
filter: string,
bg: color,
fg: color
fg: color,
maxEntries: number
)
```

Expand All @@ -19,7 +20,7 @@ Requires **[Basalt 1.7+](https://basalt.madefor.cc/)**. This is **not** included

Search the available metrics using the syntax defined in [`find`](/reference/MetricCollection#find) and output a graph to a specified [Basalt container](https://basalt.madefor.cc/#/objects/Container). If a matching metric is found, the metric value is pushed to the graph buffer.

The X axis (horizontal value) represents the number of data points recorded, and has a fixed width of `50`. The Y axis (vertical) represents the value of the metric over time. Once the fixed width of the graph is reached, the oldest values will be dropped from the buffer when new values are added. The minimum and maximum range of the Y axis is determined by the minimum and maximum metric values in the graph buffer. The background of the widget and all labels will be `bg`, and the graph/text color will be `fg`.
The X axis (horizontal value) represents the number of data points recorded, and has a default width of `50`, which can be overridden by passing `maxEntries` in the constructor. The Y axis (vertical) represents the value of the metric over time. Once the fixed width of the graph is reached, the oldest values will be dropped from the buffer when new values are added. The minimum and maximum range of the Y axis is determined by the minimum and maximum metric values in the graph buffer. The background of the widget and all labels will be `bg`, and the graph/text color will be `fg`.

The value label is designed to shorten itself using SI suffixes to fit within the available width.

Expand Down Expand Up @@ -48,6 +49,12 @@ The value label is designed to shorten itself using SI suffixes to fit within th
type: 'color',
default: 'nil',
description: 'Foreground color (colors.*)'
},
{
name: 'maxEntries',
type: 'number',
default: '50',
description: 'Maximum entries in the graph buffer'
}
]"
/>
Expand Down
4 changes: 2 additions & 2 deletions src/telem/init.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-- Telem by cyberbit
-- MIT License
-- Version 0.5.2
-- Version 0.5.3

local _Telem = {
_VERSION = '0.5.2',
_VERSION = '0.5.3',
util = require 'telem.lib.util',
input = require 'telem.lib.input',
output = require 'telem.lib.output',
Expand Down

0 comments on commit 1e4c499

Please sign in to comment.