forked from brownplt/code.pyret.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chart-lib.js: Expand barChart() to produce the related dot chart if t…
…he dot-chart option set brownplt#469 chart.arr: Added dot-chart-from-list() dot-chart-test.arr added
- Loading branch information
Showing
4 changed files
with
100 additions
and
4 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
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,18 @@ | ||
include chart | ||
include image | ||
import color as C | ||
# include image-structs | ||
include math | ||
|
||
labels = [list: "cats", "dogs", "ants", "elephants"] | ||
count = [list: 3, 7, 4, 9] | ||
|
||
series = from-list.dot-chart( | ||
labels, | ||
count) | ||
|
||
img = render-chart(series).get-image() | ||
|
||
check: | ||
img satisfies is-image | ||
end |
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