Code Monkey home page Code Monkey logo

urwid-sparkwidgets's Introduction

urwid-sparkwidgets

A set of sparkline-ish widgets for urwid.

This module contains a set of urwid text-like widgets for creating tiny but hopefully useful sparkline-like visualizations of data using unicode block elements.

Currently consists of two widgets:

  • SparkColumnWidget is a column chart. Segments can be explicitly given urwid display attributes, or can be assigned colors and other attributes according to a rotating color scheme or based on rules (e.g. negative values in red). By default the Y-axis scales to fit all values, but minimum and maximum values for the Y-axis scale can also be provided -- this might not seem useful given the extremely limited resolution of these tiny charts (only eight possible block elements) but makes sense if you want to use mulitple sparklines with the same scale to show differences in values between them.

  • SparkBarWidget is a stacked horizontal bar chart. It will fill a text widget of a given width with colored segments for each input value. It supports the same color scheme functionality as the column widget.

TODOs:

  • Allow for user-defined character schemes for the bar widget. Unicode block elements are most useful for increasing the resolution of the chart over typical ASCII block art, but it'd be nice to be able to do something like ******@@@@@@@@#####%%%% for compatibility with non-color displays.
  • Support log scale.
  • Labels in bar chart?

Here are some examples of what the charts look like:

Output sample

urwid-sparkwidgets's People

Contributors

tonycpsu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

world9781

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.