-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0d60a81
commit 9d70ff3
Showing
15 changed files
with
178 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
pygal.formatters module | ||
======================= | ||
|
||
.. automodule:: pygal.formatters | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
pygal.graph.solidgauge module | ||
============================= | ||
|
||
.. automodule:: pygal.graph.solidgauge | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
pygal.test.test_formatters module | ||
================================= | ||
|
||
.. automodule:: pygal.test.test_formatters | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ pygal provides various kinds of charts: | |
box | ||
dot | ||
funnel | ||
solidgauge | ||
gauge | ||
pyramid | ||
treemap | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
SolidGauge | ||
---------- | ||
|
||
SolidGauge charts | ||
|
||
Normal | ||
~~~~~~ | ||
|
||
.. pygal-code:: | ||
|
||
gauge = pygal.SolidGauge(inner_radius=0.70) | ||
percent_formatter = lambda x: '{:.10g}%'.format(x) | ||
dollar_formatter = lambda x: '{:.10g}$'.format(x) | ||
gauge.value_formatter = percent_formatter | ||
|
||
gauge.add('Series 1', [{'value': 225000, 'max_value': 1275000}], | ||
formatter=dollar_formatter) | ||
gauge.add('Series 2', [{'value': 110, 'max_value': 100}]) | ||
gauge.add('Series 3', [{'value': 3}]) | ||
gauge.add( | ||
'Series 4', [ | ||
{'value': 51, 'max_value': 100}, | ||
{'value': 12, 'max_value': 100}]) | ||
gauge.add('Series 5', [{'value': 79, 'max_value': 100}]) | ||
gauge.add('Series 6', 99) | ||
gauge.add('Series 7', [{'value': 100, 'max_value': 100}]) | ||
|
||
|
||
Half | ||
~~~~ | ||
|
||
.. pygal-code:: | ||
|
||
gauge = pygal.SolidGauge( | ||
half_pie=True, inner_radius=0.70, | ||
style=pygal.style.styles['default'](value_font_size=10)) | ||
|
||
percent_formatter = lambda x: '{:.10g}%'.format(x) | ||
dollar_formatter = lambda x: '{:.10g}$'.format(x) | ||
gauge.value_formatter = percent_formatter | ||
|
||
gauge.add('Series 1', [{'value': 225000, 'max_value': 1275000}], | ||
formatter=dollar_formatter) | ||
gauge.add('Series 2', [{'value': 110, 'max_value': 100}]) | ||
gauge.add('Series 3', [{'value': 3}]) | ||
gauge.add( | ||
'Series 4', [ | ||
{'value': 51, 'max_value': 100}, | ||
{'value': 12, 'max_value': 100}]) | ||
gauge.add('Series 5', [{'value': 79, 'max_value': 100}]) | ||
gauge.add('Series 6', 99) | ||
gauge.add('Series 7', [{'value': 100, 'max_value': 100}]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.