Skip to content
forked from andras-tim/tchart

Minimal chart renderer for fixed size canvas for Python

License

Notifications You must be signed in to change notification settings

fossabot/tchart

 
 

Repository files navigation

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fandras-tim%2Ftchart.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fandras-tim%2Ftchart?ref=badge_shield)

tchart

Python Package Build Status Dependency Status Code Quality Test Coverage License

Minimal chart renderer for fixed size canvas for Python.

Installation

pip install tchart

Usage

  • simple way:

    from tchart import Tchart
    
    t = Tchart(height=10, width=80)
    
    data = [12.1, -2, 100]
    chart = t.render(data)
    
    print('\n'.join(chart))
  • extended way:

    from tchart import Tchart
    from tchart.renderers import BoxRenderer
    from tchart.decorators import AxisDecorator
    
    t = Tchart(height=10, width=80, renderer=BoxRenderer(), decorators=[AxisDecorator(), ])
    
    data = [12.1, -2, 100]
    chart = t.render(data)
    
    print('\n'.join(chart))

Examples

Please check the examples directory.

  • examples/show_all_renderers.py

    Renderers

  • examples/show_all_decorators.py

    Decorators

  • examples/show_stacked_decorators.py

    StackedDecorators

Bugs

Bugs or suggestions? Visit the issue tracker.

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fandras-tim%2Ftchart.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fandras-tim%2Ftchart?ref=badge_large)

About

Minimal chart renderer for fixed size canvas for Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%