Replies: 3 comments 2 replies
-
What would be the utility of this over reversing the data provided to the widget? from textual.app import App, ComposeResult
from textual.widgets import Sparkline
class ReversedSparklineApp(App[None]):
DATA: list[float] = list(range(20))
def compose(self) -> ComposeResult:
yield Sparkline(self.DATA)
yield Sparkline(list(reversed(self.DATA)))
if __name__ == "__main__":
ReversedSparklineApp().run() |
Beta Was this translation helpful? Give feedback.
-
That's a good question, I have time-series data that fills in over time and I could reverse it, but it would still fill in right to left over time which while not a crisis would look a bit counter-intuitive. Image below shows the data after about five polls. As you can see the left is empty, if I reversed the data, the left would still be empty. |
Beta Was this translation helpful? Give feedback.
-
In sorting out that MRE, I think I got things sorted out. Thank you for your help. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Sparklines flow right to left, would it be possible to add an option to get them to flow left to right?
Beta Was this translation helpful? Give feedback.
All reactions