项目作者: xi
项目描述 :
SVG charts without dependencies
高级语言: Python
项目地址: git://github.com/xi/simplecharts.git
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)
