<s> from report_tools . reports import Report <EOL> from report_tools . chart_data import ChartData <EOL> from report_tools . renderers . googlecharts import GoogleChartsRenderer <EOL> from report_tools import charts <EOL> class GenericReport ( Report ) : <EOL> template_chart = charts . TemplateChart ( template = "<STR_LIT>" ) <EOL> def get_data_for_template_chart ( self ) : <EOL> template_context = { <EOL> '<STR_LIT>' : [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> } <EOL> return template_context <EOL> class GoogleChartsReport ( Report ) : <EOL> renderer = GoogleChartsRenderer <EOL> pie_chart = charts . PieChart ( width = "<STR_LIT>" ) <EOL> column_chart = charts . ColumnChart ( width = "<STR_LIT>" ) <EOL> line_chart = charts . LineChart ( width = "<STR_LIT>" ) <EOL> bar_chart = charts . BarChart ( width = "<STR_LIT>" ) <EOL> def get_single_series_data ( self ) : <EOL> data = ChartData ( ) <EOL> data . add_column ( "<STR_LIT>" ) <EOL> data . add_column ( "<STR_LIT>" ) <EOL> data . add_row ( [ "<STR_LIT>" , <NUM_LIT:20> ] ) <EOL> data . add_row ( [ "<STR_LIT>" , <NUM_LIT:20> ] ) <EOL> data . add_row ( [ "<STR_LIT>" , <NUM_LIT:1> ] ) <EOL> return data <EOL> def get_multi_series_data ( self ) : <EOL> data = ChartData ( ) <EOL> data . add_column ( "<STR_LIT>" ) <EOL> data . add_column ( "<STR_LIT>" ) <EOL> data . add_column ( "<STR_LIT>" ) <EOL> data . add_column ( "<STR_LIT>" ) <EOL> data . add_row ( [ "<STR_LIT>" , ( <NUM_LIT:5> , { '<STR_LIT>' : "<STR_LIT>" } ) , <NUM_LIT:10> , <NUM_LIT:5> ] ) <EOL> data . add_row ( [ "<STR_LIT>" , <NUM_LIT:10> , <NUM_LIT:2> , <NUM_LIT:8> ] ) <EOL> data . add_row ( [ "<STR_LIT>" , <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> ] ) <EOL> return data <EOL> def get_data_for_pie_chart ( self ) : <EOL> return self . get_single_series_data ( ) <EOL> def get_data_for_column_chart ( self ) : <EOL> return self . get_multi_series_data ( ) <EOL> def get_data_for_bar_chart ( self ) : <EOL> return self . get_multi_series_data ( ) <EOL> def get_data_for_line_chart ( self ) : <EOL> return self . get_multi_series_data ( ) </s>
