Charting Samples

Last modified by Silvano Buback on 2018/02/26 16:20

Charting Samples

Invalid macro parameters used for the [toc] macro. Cause: [Failed to validate bean: [must be greater than or equal to 1]]. Click on this message for details.

Chart Types

Pie Charts

CategorySum
Category 180
Category 250
Category 370
Total sum(B2:B4)

{chart:source=type:table;range:A1-B4|type=pie|title=pie (default)}

{chart:source=type:table;range:A1-B4|type=pie|renderer=pie_3d|title=pie (pie3d)}

{chart:source=type:table;range:A1-B4|type=pie|renderer=ring|title=pie (ring)}

Bar Charts

  FirstSecondThird
Category 11.05.04.0
Category 24.07.06.0
Category 33.06.02.0
Category 45.08.03.0
Category 55.04.06.0

{chart:source=type:table;table_number:1|type=bar|width=600|title=bar (default)}

{chart:source=type:table;table_number:1|type=bar|renderer=bar_3d|width=600|title=bar (bar_3d)}

{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}

{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}

{chart:source=type:table;table_number:1|type=bar|renderer=stacked_bar|width=600|title=bar (stacked_bar)}

{chart:source=type:table;table_number:1|type=bar|renderer=stacked_bar_3d|width=600|title=bar (stacked_bar_3d)} 

{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}

{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}

  FirstSecondThird
11.05.04.0
24.07.06.0
33.06.02.0
45.08.03.0
65.04.06.0

{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|}

{chart:source=type:table;table_number:2|type=bar|renderer=xy_clustered_bar|width=500|title=bar (xy_clustered_bar)}

{chart:source=type:table;table_number:2|type=bar|renderer=xy_stacked_bar|width=500|title=bar (xy_stacked_bar)}

Line Charts

 1.02.03.04.05.06.09.0
First1.04.03.05.05.07.08.0
Second5.07.06.08.04.04.02.0
Third3.04.04.03.02.03.06.0

{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}

{chart:source=type:table;table_number:3|series=rows|type=line|renderer=xy_line_3d|title=line (xy_line_3d)|height=400|width=600}

{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}

{chart:source=type:table;table_number:3|series=rows|type=line|renderer=line_and_shape|title=line (line_and_shape)|height=400|width=600}

{chart:source=type:table;table_number:3|series=rows|type=line|renderer=line_3d|title=line (line_3d)|height=400|width=600}

{chart:source=type:table;table_number:3|series=rows|type=line|renderer=step|renderer_stroke=width:2|title=line (step)|height=400|width=600}

Area Charts

{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}

{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}

{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}

Time Charts

 Series1Series2
2001-2181.8129.6
2001-3167.3123.2
2001-4153.8117.2
2001-5167.6124.1
2001-6158.8122.6
2001-7148.3119.2
2001-8153.9116.5
2001-9142.7112.7
2001-10123.2101.5
2001-11131.8106.1
2001-12139.6110.3
2002-1142.9111.7
2002-2138.7111.0
2002-3137.3109.6
2002-4143.9113.2
2002-5139.8111.6
2002-6137.0108.8
2002-7132.8101.6

{chart:source=type:table;table_number:4|type=time|title=time (default)|date_format=type:custom;pattern:yyyy-MM|width=500}

{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}

{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}

{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}

Customizations

Sorry for my lack of artistic skills emoticon_wink

Borders

{chart:source=type:table;table_number:0;range:A1-B4;has_header_row:true;has_header_column:true| 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}

Legend

{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}

Custom XYPlot

{chart:type=line|source=type:table; 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}

Custom Renderer

{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}

{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}

Ignore Alpha

column1column2column3
row1123
row21.02.03.0
row31,02,03,0
row41px2m3 banannas

{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}

{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}

{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}

{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}

Custom Number Axis

{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}

{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}

Custom Category Axis

 Category 1Category 2Category 3Category 4Category 5 6 7 8 9 5 6 7 8 9 5 6 7 8 9
First1.04.03.05.05.0
Second5.07.06.08.04.0
Third4.03.02.03.06.0

{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}

Time Series

{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}

Get Connected