Wiki source code of Charting Samples
Last modified by Silvano Buback on 2018/02/26 16:20
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | 1 Charting Samples | ||
2 | |||
3 | #toc("" "" "") | ||
4 | |||
5 | 1.1 Chart Types | ||
6 | |||
7 | 1.1.1 Pie Charts | ||
8 | |||
9 | {table} | ||
10 | Category | Sum | ||
11 | Category 1 | 80 | ||
12 | Category 2 | 50 | ||
13 | Category 3 | 70 | ||
14 | Total | = sum(B2:B4) | ||
15 | {table} | ||
16 | |||
17 | {chart:source=type:table;range:A1-B4|type=pie|title=pie (default)} | ||
18 | |||
19 | {chart:source=type:table;range:A1-B4|type=pie|renderer=pie_3d|title=pie (pie3d)} | ||
20 | |||
21 | {chart:source=type:table;range:A1-B4|type=pie|renderer=ring|title=pie (ring)} | ||
22 | |||
23 | 1.1.1 Bar Charts | ||
24 | |||
25 | {table} | ||
26 | | First | Second | Third | ||
27 | Category 1 | 1.0 | 5.0 | 4.0 | ||
28 | Category 2 | 4.0 | 7.0 | 6.0 | ||
29 | Category 3 | 3.0 | 6.0 | 2.0 | ||
30 | Category 4 | 5.0 | 8.0 | 3.0 | ||
31 | Category 5 | 5.0 | 4.0 | 6.0 | ||
32 | {table} | ||
33 | |||
34 | {chart:source=type:table;table_number:1|type=bar|width=600|title=bar (default)} | ||
35 | |||
36 | {chart:source=type:table;table_number:1|type=bar|renderer=bar_3d|width=600|title=bar (bar_3d)} | ||
37 | |||
38 | {chart:source=type:table;table_number:1|type=bar|renderer=waterfall_bar|width=600|title=bar (waterfall_bar) |series_colors=red:255;green:0;blue:0;alpha:100,red:0;green:0;blue:255;alpha:100,red:0;green:255;blue:0;alpha:100} | ||
39 | |||
40 | {chart:source=type:table;table_number:1|type=bar|renderer=layered_bar|width=600|title=bar (layered_bar) |series_colors=red:255;green:0;blue:0;alpha:100,red:0;green:0;blue:255;alpha:100,red:0;green:255;blue:0;alpha:100} | ||
41 | |||
42 | {chart:source=type:table;table_number:1|type=bar|renderer=stacked_bar|width=600|title=bar (stacked_bar)} | ||
43 | |||
44 | {chart:source=type:table;table_number:1|type=bar|renderer=stacked_bar_3d|width=600|title=bar (stacked_bar_3d)} | ||
45 | |||
46 | {chart:source=type:table;table_number:1|type=bar|renderer=level|width=600|title=bar (level) |series_colors=red:255;green:0;blue:0;alpha:100,red:0;green:0;blue:255;alpha:100,red:0;green:255;blue:0;alpha:100} | ||
47 | |||
48 | {chart:source=type:table;table_number:1|type=bar|renderer=grouped_stacked_bar|width=600|title=bar (grouped_stacked_bar) |series_colors=red:255;green:0;blue:0;alpha:100,red:0;green:0;blue:255;alpha:100,red:0;green:255;blue:0;alpha:100} | ||
49 | |||
50 | {table} | ||
51 | | First | Second | Third | ||
52 | 1 | 1.0 | 5.0 | 4.0 | ||
53 | 2 | 4.0 | 7.0 | 6.0 | ||
54 | 3 | 3.0 | 6.0 | 2.0 | ||
55 | 4 | 5.0 | 8.0 | 3.0 | ||
56 | 6 | 5.0 | 4.0 | 6.0 | ||
57 | {table} | ||
58 | |||
59 | {chart:source=type:table;table_number:2|type=bar|renderer=xy_bar|width=500|title=bar (xy_bar) |series_colors=red:255;green:0;blue:0;alpha:100,red:0;green:0;blue:255;alpha:100,red:0;green:255;blue:0;alpha:100|} | ||
60 | |||
61 | {chart:source=type:table;table_number:2|type=bar|renderer=xy_clustered_bar|width=500|title=bar (xy_clustered_bar)} | ||
62 | |||
63 | {chart:source=type:table;table_number:2|type=bar|renderer=xy_stacked_bar|width=500|title=bar (xy_stacked_bar)} | ||
64 | |||
65 | 1.1.1 Line Charts | ||
66 | |||
67 | {table} | ||
68 | | 1.0 | 2.0 | 3.0 | 4.0 | 5.0 | 6.0 | 9.0 | ||
69 | First | 1.0 | 4.0 | 3.0 | 5.0 | 5.0 | 7.0 | 8.0 | ||
70 | Second | 5.0 | 7.0 | 6.0 | 8.0 | 4.0 | 4.0 | 2.0 | ||
71 | Third | 3.0 | 4.0 | 4.0 | 3.0 | 2.0 | 3.0 | 6.0 | ||
72 | {table} | ||
73 | |||
74 | {chart:source=type:table;table_number:3|series=rows|type=line|renderer=xy_line_and_shape|title=line (xy_line_and_shape, default)|height=400|width=600} | ||
75 | |||
76 | {chart:source=type:table;table_number:3|series=rows|type=line|renderer=xy_line_3d|title=line (xy_line_3d)|height=400|width=600} | ||
77 | |||
78 | {chart:source=type:table;table_number:3|series=rows|type=line|renderer=xy_step|renderer_stroke=width:2|title=line (xy_step)|height=400|width=600} | ||
79 | |||
80 | {chart:source=type:table;table_number:3|series=rows|type=line|renderer=line_and_shape|title=line (line_and_shape)|height=400|width=600} | ||
81 | |||
82 | {chart:source=type:table;table_number:3|series=rows|type=line|renderer=line_3d|title=line (line_3d)|height=400|width=600} | ||
83 | |||
84 | {chart:source=type:table;table_number:3|series=rows|type=line|renderer=step|renderer_stroke=width:2|title=line (step)|height=400|width=600} | ||
85 | |||
86 | 1.1.1 Area Charts | ||
87 | |||
88 | {chart:source=type:table;table_number:3|series=rows|type=area|renderer=xy_area|title=area (xy_area, default)|domain_axis_auto_range_includes_zero=false|domain_axis_lower_margin=0|domain_axis_upper_margin=0|height=400|width=600 |series_colors=red:255;green:0;blue:0;alpha:100,red:0;green:0;blue:255;alpha:100,red:0;green:255;blue:0;alpha:100} | ||
89 | |||
90 | {chart:source=type:table;table_number:3|series=rows|type=area|renderer=xy_stacked_area2|title=area (xy_stacked_area2)|domain_axis_auto_range_includes_zero=false|domain_axis_lower_margin=0|domain_axis_upper_margin=0|height=400|width=600 |series_colors=red:255;green:0;blue:0;alpha:100,red:0;green:0;blue:255;alpha:100,red:0;green:255;blue:0;alpha:100} | ||
91 | |||
92 | {chart:source=type:table;table_number:3|series=rows|type=area|renderer=xy_step_area|title=area (xy_step_area)|domain_axis_auto_range_includes_zero=false|domain_axis_lower_margin=0|domain_axis_upper_margin=0|height=400|width=600 |series_colors=red:255;green:0;blue:0;alpha:100,red:0;green:0;blue:255;alpha:100,red:0;green:255;blue:0;alpha:100} | ||
93 | |||
94 | 1.1.1 Time Charts | ||
95 | |||
96 | {table} | ||
97 | | Series1 | Series2 | ||
98 | 2001-2 | 181.8 | 129.6 | ||
99 | 2001-3 | 167.3 | 123.2 | ||
100 | 2001-4 | 153.8 | 117.2 | ||
101 | 2001-5 | 167.6 | 124.1 | ||
102 | 2001-6 | 158.8 | 122.6 | ||
103 | 2001-7 | 148.3 | 119.2 | ||
104 | 2001-8 | 153.9 | 116.5 | ||
105 | 2001-9 | 142.7 | 112.7 | ||
106 | 2001-10 | 123.2 | 101.5 | ||
107 | 2001-11 | 131.8 | 106.1 | ||
108 | 2001-12 | 139.6 | 110.3 | ||
109 | 2002-1 | 142.9 | 111.7 | ||
110 | 2002-2 | 138.7 | 111.0 | ||
111 | 2002-3 | 137.3 | 109.6 | ||
112 | 2002-4 | 143.9 | 113.2 | ||
113 | 2002-5 | 139.8 | 111.6 | ||
114 | 2002-6 | 137.0 | 108.8 | ||
115 | 2002-7 | 132.8 | 101.6 | ||
116 | {table} | ||
117 | |||
118 | {chart:source=type:table;table_number:4|type=time|title=time (default)|date_format=type:custom;pattern:yyyy-MM|width=500} | ||
119 | |||
120 | {chart:source=type:table;table_number:4|type=time|renderer=xy_line_and_shape|title=time (xy_line_and_shape)|date_format=type:custom;pattern:yyyy-MM|width=500} | ||
121 | |||
122 | {chart:source=type:table;table_number:4|type=time|renderer=xy_line_3d|title=time (xy_line_3d)|date_format=type:custom;pattern:yyyy-MM|width=500} | ||
123 | |||
124 | {chart:source=type:table;table_number:4|type=time|renderer=xy_step|title=time (xy_step)|date_format=type:custom;pattern:yyyy-MM|width=500} | ||
125 | |||
126 | 1.1 Customizations | ||
127 | |||
128 | Sorry for my lack of artistic skills ;) | ||
129 | |||
130 | 1.1.1 Borders | ||
131 | |||
132 | {chart:source=type:table;table_number:0;range:A1-B4;has_header_row:true;has_header_column:true| | ||
133 | title=A pie in the sky|anti_alias=false|background_color=navy|plot_background_color=silver|plot_background_alpha=1.0|plot_foreground_alpha=0.7|plot_inserts=top:0;bottom:0;left:10;right:20|plot_outline_color=#FFFFFF|plot_outline_stroke=width:6|plot_zoom=3|title_position=bottom|title_color=red|title_background_color=#000080|title_font=name:Times New Roman;style:bold;size:32|title_horizontal_alignment=left|title_vertical_alignment=bottom|title_padding=right:10;bottom:20;left:30;top:40|type=pie|series=columns|width=500|height=400|border_visible=true|border_color=blue|border_stroke=width:5.57;cap:butt;join:bevel;miterlimit:0.94;dash:1.5,2.3,4.5;dash_phase:1.3} | ||
134 | |||
135 | 1.1.1 Legend | ||
136 | |||
137 | {chart:type=line|renderer=line_and_shape|source=type:table;table_number:3;range:*;has_header_row:true;has_header_column:true|series=rows|width=600|height=350|legend_background_color=silver|legend_item_font=style:bold;size:16;name:Arial|legend_item_label_padding=left:10;right:0;top:0;bottom:0|legend_item_graphic_anchor=center|legend_item_graphic_edge=right|legend_item_graphic_location=top-left|legend_item_graphic_padding=top:5;left:10;right:0;bottom:0} | ||
138 | |||
139 | 1.1.1 Custom XYPlot | ||
140 | |||
141 | {chart:type=line|source=type:table; | ||
142 | table_number:3;range:*;has_header_row:true;has_header_column:true|series=rows|width=600|height=350|plot_orientation=vertical|plot_quadrant_origin=x:2.0;y:2.0|plot_quadrant_colors=red, blue, yellow, silver|axis_domain_gridline_visible=false|axis_range_gridline_visible=true|axis_range_gridline_color=silver|axis_range_gridline_stroke=width:1} | ||
143 | |||
144 | 1.1.1 Custom Renderer | ||
145 | |||
146 | {chart:type=line|source=type:table;table_number:3;range:*;has_header_row:true;has_header_column:true|series=rows|width=600|height=350|renderer_color=blue|renderer_stroke=width:3|renderer_series_visible=true|renderer_item_label_visible=false|renderer_series_shapes=square,circle,diamond|renderer_shape=square} | ||
147 | |||
148 | {chart:type=bar|source=type:table;table_number:3|series=rows|width=600|height=400|renderer_fill_color=silver|renderer_outline_color=red:200;green:0;blue:0;alpha:100|renderer_outline_stroke=width:10 |renderer_series_visible=true|renderer_item_label_visible=true} | ||
149 | |||
150 | 1.1.1 Ignore Alpha | ||
151 | |||
152 | {table} | ||
153 | |column1|column2|column3 | ||
154 | row1|1|2|3 | ||
155 | row2|1.0|2.0|3.0 | ||
156 | row3|1,0|2,0|3,0 | ||
157 | row4|1px|2m|3 banannas | ||
158 | {table} | ||
159 | |||
160 | {chart:type=bar|source=type:table;table_number:5;range:*;has_header_row:true;has_header_column:true;ignore_alpha:false;decimal_symbol:period|series=rows} | ||
161 | |||
162 | {chart:type=bar|source=type:table;table_number:5;range:*;has_header_row:true;has_header_column:true;ignore_alpha:true;decimal_symbol:period|series=rows} | ||
163 | |||
164 | {chart:type=bar|source=type:table;table_number:5;range:*;has_header_row:true;has_header_column:true;ignore_alpha:false;decimal_symbol:comma|series=rows} | ||
165 | |||
166 | {chart:type=bar|source=type:table;table_number:0;range:*;has_header_row:true;has_header_column:true;ignore_alpha:true;decimal_symbol:comma|series=rows|link_attributes=name:a chart|image_attributes=border:none} | ||
167 | |||
168 | 1.1.1 Custom Number Axis | ||
169 | |||
170 | {chart:type=line|source=type:table;table_number:3;range:*;has_header_row:true;has_header_column:true|series=rows|domain_axis_auto_range=true|domain_axis_auto_range_min_size=15|domain_axis_lower_margin=0.50|domain_axis_upper_margin=0.50|range_axis_auto_range=false|range_axis_lower_bound=2|range_axis_upper_bound=10|range_axis_auto_tick_unit=true|range_axis_vertical_tick_labels=true|domain_axis_range_type=positive|domain_axis_number_format_override=type:number;language:rum;country:RO} | ||
171 | |||
172 | {chart:type=line|source=type:table;table_number:3;range:*;has_header_row:true;has_header_column:true|series=rows|domain_axis_auto_range=false|domain_axis_auto_range=false|domain_axis_lower_bound=2.5|domain_axis_upper_bound=10|domain_axis_number_tick_unit=size:1.5|domain_axis_number_format_override=type:currency;language:ger;country:DE} | ||
173 | |||
174 | |||
175 | 1.1.1 Custom Category Axis | ||
176 | |||
177 | {table} | ||
178 | | Category 1 | Category 2 | Category 3 | Category 4 | Category 5 6 7 8 9 5 6 7 8 9 5 6 7 8 9 | ||
179 | First | 1.0 | 4.0 | 3.0 | 5.0 | 5.0 | ||
180 | Second | 5.0 | 7.0 | 6.0 | 8.0 | 4.0 | ||
181 | Third | 4.0 | 3.0 | 2.0 | 3.0 | 6.0 | ||
182 | {table} | ||
183 | |||
184 | {chart:type=bar|source=type:table;table_number:6|series=rows|height=400|width=600|domain_axis_category_margin=0.1|domain_axis_label_positions=down_45|domain_axis_label_position_offset=20|domain_axis_maximum_label_lines=2|domain_axis_maximul_label_width_ratio=0.3} | ||
185 | |||
186 | 1.1.1 Time Series | ||
187 | |||
188 | {chart:type=time|source=type:table;table_number:4;ignore_alpha:true|date_format=type:custom;pattern:yyyy-MM|height=400|width=700|domain_axis_date_format_override=type:date;style:short;language:rum;country:RO|domain_axis_lower_date=value:2001-6;type:custom;pattern:yyyy-MM|domain_axis_upper_date=value:2002-4;type:custom;pattern:yyyy-MM|domain_axis_date_tick_unit=unit:month;count:1|domain_axis_tick_mark_position:ende} |