Skip to content

Commit

Permalink
Merge pull request #75 from AdityaTaggar05/module
Browse files Browse the repository at this point in the history
Made Termgraph an API/Module and some new features
  • Loading branch information
mkaz authored Jun 20, 2021
2 parents 57f4ebc + 575caae commit 09e17cc
Show file tree
Hide file tree
Showing 11 changed files with 555 additions and 29 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*.pyc
venv/
.vim/
.vscode/
.coverage
htmlcov/
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion data/ex4.dat
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
2010,50.21,7
2011,508.97,10.45
2012,212.05,20.2
2014,30.0,20.0
2014,30.0,20.0
2 changes: 1 addition & 1 deletion data/ex5.dat
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
2008,231.23,50.0,80.6
2009,16.43,53.1,76.54
2010,50.21,7,0.0
2011,508.97,10.45,7.0
2011,508.97,10.45,-27.0
2012,212.05,20.2,-4.4
2014,30.0,9,9.8
13 changes: 13 additions & 0 deletions termgraph/example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from module import Data, BarChart, Args, Colors

data = Data([[765, 787], [781, 769]], ["6th G", "7th G"], ["Boys", "Girls"])
chart = BarChart(
data,
Args(
title="Total Marks Per Class",
colors=[Colors.Red, Colors.Magenta],
space_between=True,
),
)

chart.draw()
Loading

0 comments on commit 09e17cc

Please sign in to comment.