| Line | |
|---|
| 1 | doFile("GoogleChart.io") |
|---|
| 2 | |
|---|
| 3 | // @author nowelium |
|---|
| 4 | Labels := GoogleChart clone do ( |
|---|
| 5 | __labels__ := Object clone do( |
|---|
| 6 | labels ::= nil |
|---|
| 7 | ) |
|---|
| 8 | Title := method( |
|---|
| 9 | __labels__ clone setLabels(self) do( |
|---|
| 10 | repMap := Map clone do ( |
|---|
| 11 | atPut(" ", "+") |
|---|
| 12 | atPut("\r", "\n") |
|---|
| 13 | atPut("\n", "|") |
|---|
| 14 | ) |
|---|
| 15 | chtt := method(title, |
|---|
| 16 | labels query addParameter("chtt", title asMutable replaceMap(self repMap)) |
|---|
| 17 | ) |
|---|
| 18 | chts := method(color, size, |
|---|
| 19 | labels query addParameter("chts", color .. "," .. size) |
|---|
| 20 | ) |
|---|
| 21 | ) |
|---|
| 22 | ) |
|---|
| 23 | Legend := method( |
|---|
| 24 | __labels__ clone setLabels(self) do( |
|---|
| 25 | chdl := method( |
|---|
| 26 | labels query addParameter("chld", call message argsEvaluatedIn(call target) join("|")) |
|---|
| 27 | ) |
|---|
| 28 | top := method( |
|---|
| 29 | labels query addParameter("chdlp", "t") |
|---|
| 30 | ) |
|---|
| 31 | right := method( |
|---|
| 32 | labels query addParameter("chdlp", "r") |
|---|
| 33 | ) |
|---|
| 34 | bottom := method( |
|---|
| 35 | labels query addParameter("chdlp", "b") |
|---|
| 36 | ) |
|---|
| 37 | left := method( |
|---|
| 38 | labels query addParameter("chdlp", "l") |
|---|
| 39 | ) |
|---|
| 40 | ) |
|---|
| 41 | ) |
|---|
| 42 | Label := method( |
|---|
| 43 | __labels__ clone setLabels(self) do( |
|---|
| 44 | chl := method( |
|---|
| 45 | labels query addParameter("chl", call message argsEvaluatedIn(call target) join("|")) |
|---|
| 46 | ) |
|---|
| 47 | ) |
|---|
| 48 | ) |
|---|
| 49 | |
|---|
| 50 | Axis := method() |
|---|
| 51 | ) |
|---|