Markus Ressel
6119df590d
simplify
...
Signed-off-by: Markus Ressel <mail@markusressel.de>
2024-10-13 10:23:06 +02:00
Markus Ressel
cb36b86f14
rework drawXAxisLabelToScreen to support drawing custom x-axis labels, add custom demo
...
Signed-off-by: Markus Ressel <mail@markusressel.de>
2024-10-13 10:23:06 +02:00
Markus Ressel
d3cf38290d
do not write labels beyond bounds
...
Signed-off-by: Markus Ressel <mail@markusressel.de>
2024-10-13 10:23:06 +02:00
Markus Ressel
d46f48fbe0
do not write labels beyond bounds
...
Signed-off-by: Markus Ressel <mail@markusressel.de>
2024-10-13 10:23:06 +02:00
Markus Ressel
d3dc728102
added SetXAxisLabelFunc method to provide custom X-Axis labels
...
Signed-off-by: Markus Ressel <mail@markusressel.de>
2024-10-13 10:23:06 +02:00
Navid Yaghoobi
3cfbbb446a
running golangci-lint
...
Signed-off-by: Navid Yaghoobi <navidys@fedoraproject.org>
2024-10-13 12:44:01 +11:00
Markus Ressel
a89f40eb4c
fix demo, add SetYRange to set both min and max at the same time
...
Signed-off-by: Markus Ressel <mail@markusressel.de>
2024-10-12 17:35:45 +02:00
Markus Ressel
d550a262e6
refactor and simplify calcBrailleLines logic and respect bounds
...
Signed-off-by: Markus Ressel <mail@markusressel.de>
2024-10-12 17:04:38 +02:00
Markus Ressel
e468a23392
fix property visibility
...
Signed-off-by: Markus Ressel <mail@markusressel.de>
2024-10-12 15:03:43 +02:00
Markus Ressel
7e3024f613
add parameters to control auto scaling behavior and prevent breaking change
...
Signed-off-by: Markus Ressel <mail@markusressel.de>
2024-10-12 14:54:53 +02:00
Markus Ressel
4632165f80
do not draw points that exceed the available height, fix scatter plots
...
Signed-off-by: Markus Ressel <mail@markusressel.de>
2024-10-12 14:45:42 +02:00
Markus Ressel
e95a6c091d
allow manual override of Y-Axis MinValue and MaxValue
...
Signed-off-by: Markus Ressel <mail@markusressel.de>
2024-10-12 03:44:35 +02:00
Navid Yaghoobi
5f3f2f99fc
running golangci-lint
...
Signed-off-by: Navid Yaghoobi <navidys@fedoraproject.org>
2024-10-12 12:01:56 +11:00
Markus Ressel
6ec082d4f7
draw single valid data points in braille plot
...
Signed-off-by: Markus Ressel <mail@markusressel.de>
2024-10-11 22:42:46 +02:00
Markus Ressel
444dcd17a9
fix wrong braille line when data contains math.NaN
...
Signed-off-by: Markus Ressel <mail@markusressel.de>
2024-10-11 22:29:41 +02:00
Markus Ressel
3dd7ecf34b
ignore math.NaN() values when drawing plots
...
Signed-off-by: Markus Ressel <mail@markusressel.de>
2024-10-11 00:32:08 +02:00
Navid Yaghoobi
1dfc3feec1
add plot Y axis label type (float, integer)
...
Signed-off-by: Navid Yaghoobi <navidys@fedoraproject.org>
2024-09-28 12:33:20 +10:00
Anders Pitman
e9eb5cdbdc
Expose GetPlotRect
2024-05-07 12:23:28 -06:00
Navid Yaghoobi
36e3d86da4
golangci-lint update 1.56.2
...
Signed-off-by: Navid Yaghoobi <navidys@fedoraproject.org>
2024-03-05 21:56:13 +11:00
Hidayat
d8a9aeb20e
feat option to draw y or x axis label independently ( #25 )
...
Signed-off-by: Hidayat Hamir <hidayat.03@erajaya.com>
2023-12-29 18:51:02 +11:00
Navid Yaghoobi
02375f4dae
initial commit
...
Signed-off-by: Navid Yaghoobi <navidys@fedoraproject.org>
2023-12-15 19:37:24 +11:00
Aaron DeMille
178e77cf79
Auto set the Y axis label width
...
The Y axis label width was hard coded to 4 with 2 decimal places. This
caused any number larger than 1000 to be truncated.
The Y axis label width is now based on the maximum value in the data
set, allowing enough characters for the whole number along with 2
decimal places.
Signed-off-by: Aaron DeMille <ajdemille@gmail.com>
2023-12-14 23:46:15 -07:00
Aaron DeMille
3578e68a90
Fix braille plot y-axis scaling
...
Braille Mode line charts didn't draw the dots in the correct y-axis
location. For example, I created a chart with data values between 1 and
2 stepping by .1 (1, 1.1, 1.2 ... 2.0). The PlotMarkerDot mode
accurately displayed the dots in the 1 - 2 range on the Y axis. However,
when using PlotMarkerBraille mode, the dots appeared between the range of
0 and 1. The gap is much larger if the the data values are bigger (for
example, 100 to 101 stepping by .1)
I modified the braille plotting code to more closely match the termui
library implementation, which didn't have the problem.
Graphs are now displaying as expected.
Signed-off-by: Aaron DeMille <ajdemille2@gmail.com>
2023-11-23 19:24:14 -07:00
Navid Yaghoobi
a187d4ddc6
barchart - allow to set axes line and label color
...
Signed-off-by: Navid Yaghoobi <navidys@fedoraproject.org>
2022-12-24 12:21:58 +11:00
Nick Wallace
4a0d6f3933
Fixing mispelling
2022-12-22 14:36:57 -06:00
Navid Yaghoobi
b1e54eab00
new feature - plot widget (linechart, scatter)
...
Signed-off-by: Navid Yaghoobi <navidys@fedoraproject.org>
2022-12-13 21:30:56 +11:00