Skip to content

SVG charts without dependencies

License

Notifications You must be signed in to change notification settings

xi/simplecharts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Features

  • no external dependencies
  • produces clean SVG
  • available charts: grouped columns, stacked columns, lines, stacked areas

Limitations

  • not interactive
  • not configurable
  • maximum of 6 colors
  • no wrapping for long labels

Usage

from simplecharts import StackedColumnRenderer

renderer = StackedColumnRenderer()
data = {
    'rows': [{
        'label': 'Apples',
        'values': [3, 2, 5],
    }, {
        'label': 'Oranges',
        'values': [4, 2, 3],
    }, {
        'label': 'Pears',
        'values': [4, 3, 4],
    }, {
        'label': 'Bananas',
        'values': [5, 1, 2],
    }],
    'legend': ['John', 'Jane', 'Joe'],
}
svg = renderer.render(data)

example

About

SVG charts without dependencies

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages