Line | |
---|
1 | {
|
---|
2 |
|
---|
3 | "title":{
|
---|
4 | "text":"Test stacked bar charts",
|
---|
5 | "style":"{font-size:16px;}"
|
---|
6 | },
|
---|
7 |
|
---|
8 | "elements":[
|
---|
9 | {
|
---|
10 | "type": "bar_stack",
|
---|
11 | "keys": [
|
---|
12 | {"colour":"#FFB900", "text": "Key 1", "font-size": 10},
|
---|
13 | {"colour":"#FFB9F0", "text": "Key 2", "font-size": 16}
|
---|
14 | ],
|
---|
15 | "on-click": "trace:http://example.com",
|
---|
16 | "on-show": {"type": "drop", "delay":0.5, "cascade":0.6},
|
---|
17 | "tip": "#total#<br>(bar total)",
|
---|
18 | "values": [
|
---|
19 | [2.5,{"val":5}],
|
---|
20 | [{"val":2.5},{"val":5},{"val":2.5}],
|
---|
21 | null,
|
---|
22 | [{"val":5},{"val":5},{"val":2},{"val":2},{"val":2,"colour":"#ff00ff","tip": "Click me!", "on-click": "trace:clicked!!"},{"val":2},{"val":2}]
|
---|
23 | ]
|
---|
24 | },
|
---|
25 | {
|
---|
26 | "type": "bar",
|
---|
27 | "colour": "#9933CC",
|
---|
28 | "text": "Bar",
|
---|
29 | "font-size": 10,
|
---|
30 | "values" : [9,6,7,9]
|
---|
31 | }
|
---|
32 | ],
|
---|
33 |
|
---|
34 | "x_axis":{
|
---|
35 | "max":4,
|
---|
36 | "steps": 1,
|
---|
37 | "labels": {
|
---|
38 | "labels": ["January","February","March","April"]
|
---|
39 | },
|
---|
40 | "stroke": 12,
|
---|
41 | "tick-height": 6
|
---|
42 | },
|
---|
43 |
|
---|
44 | "y_axis":{
|
---|
45 | "max": 20
|
---|
46 | },
|
---|
47 |
|
---|
48 | "tooltip":{
|
---|
49 | "mouse": 2,
|
---|
50 | "stroke":1
|
---|
51 | }
|
---|
52 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.