[PR #129] [MERGED] LineChart now has an option that disables scaling of the X axis #211

Closed
opened 2026-03-03 16:23:20 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mum4k/termdash/pull/129
Author: @mum4k
Created: 2/16/2019
Status: Merged
Merged: 2/16/2019
Merged by: @mum4k

Base: develHead: unscaled-x


📝 Commits (8)

  • 9b3edb4 Refactor RequiredWidth off the Y object.
  • feb406e Refactoring y.Details off the object.
  • bbaf393 Removing the Y object.
  • c78bd1f Refactor XScale so we can pass in the min value.
  • f465e11 Scale and label now support X axis that doesn't start at zero.
  • aca7abf LineChart now has an option that disables scaling of X axis.
  • 587185e Updating CHANGELOG.
  • 52ae7d1 Improving option comment and test coverage.

📊 Changes

10 files changed (+928 additions, -291 deletions)

View changed files

📝 CHANGELOG.md (+5 -0)
📝 widgets/linechart/axes/axes.go (+51 -48)
📝 widgets/linechart/axes/axes_test.go (+179 -147)
📝 widgets/linechart/axes/label.go (+1 -1)
📝 widgets/linechart/axes/label_test.go (+77 -24)
📝 widgets/linechart/axes/scale.go (+24 -17)
📝 widgets/linechart/axes/scale_test.go (+124 -15)
📝 widgets/linechart/linechart.go (+146 -37)
📝 widgets/linechart/linechart_test.go (+303 -2)
📝 widgets/linechart/options.go (+18 -0)

📄 Description

Useful for applications that want to continuously feed data and make
them "roll" through the linechart.

Also exposing a method that returns the observed capacity of the
LineChart the last time Draw was called.

Fixes #123


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mum4k/termdash/pull/129 **Author:** [@mum4k](https://github.com/mum4k) **Created:** 2/16/2019 **Status:** ✅ Merged **Merged:** 2/16/2019 **Merged by:** [@mum4k](https://github.com/mum4k) **Base:** `devel` ← **Head:** `unscaled-x` --- ### 📝 Commits (8) - [`9b3edb4`](https://github.com/mum4k/termdash/commit/9b3edb42b93a4b7342b89752e3d3aacb46eee2ae) Refactor RequiredWidth off the Y object. - [`feb406e`](https://github.com/mum4k/termdash/commit/feb406ec1104e768d8ef61be8b1bad96df13b180) Refactoring y.Details off the object. - [`bbaf393`](https://github.com/mum4k/termdash/commit/bbaf393110801f87b9cc97ab4bd414b8594ba33a) Removing the Y object. - [`c78bd1f`](https://github.com/mum4k/termdash/commit/c78bd1f226567107c6a78c40e6a3a5ac4cc5f420) Refactor XScale so we can pass in the min value. - [`f465e11`](https://github.com/mum4k/termdash/commit/f465e1128895aa401e54a2aa46308955d64e5117) Scale and label now support X axis that doesn't start at zero. - [`aca7abf`](https://github.com/mum4k/termdash/commit/aca7abff4f2ba2954bd65dd0064c8a608b380b0b) LineChart now has an option that disables scaling of X axis. - [`587185e`](https://github.com/mum4k/termdash/commit/587185eb736243950001f7d03d70518c4333c398) Updating CHANGELOG. - [`52ae7d1`](https://github.com/mum4k/termdash/commit/52ae7d18073b13676a972db90ea4360dab3473b7) Improving option comment and test coverage. ### 📊 Changes **10 files changed** (+928 additions, -291 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+5 -0) 📝 `widgets/linechart/axes/axes.go` (+51 -48) 📝 `widgets/linechart/axes/axes_test.go` (+179 -147) 📝 `widgets/linechart/axes/label.go` (+1 -1) 📝 `widgets/linechart/axes/label_test.go` (+77 -24) 📝 `widgets/linechart/axes/scale.go` (+24 -17) 📝 `widgets/linechart/axes/scale_test.go` (+124 -15) 📝 `widgets/linechart/linechart.go` (+146 -37) 📝 `widgets/linechart/linechart_test.go` (+303 -2) 📝 `widgets/linechart/options.go` (+18 -0) </details> ### 📄 Description Useful for applications that want to continuously feed data and make them "roll" through the linechart. Also exposing a method that returns the observed capacity of the LineChart the last time Draw was called. Fixes #123 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 16:23:20 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/termdash#211
No description provided.