1 <div class="modal" id="chartModal" tabindex="-1" role="dialog" aria-labelledby="chartModalLabel">
2 <div class="modal-dialog modal-wide" role="document">
3 <div class="modal-content">
4 <div class="modal-header">
5 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
6 <h4 class="modal-title" id="chartModalLabel">Chart settings</h4>
8 <div class="modal-body" id="makechart">
9 [% supposed_x = header_row.shift.cell %]
10 <fieldset class="rows">
13 <label for="chart-type">Chart type: </label>
14 <select name="chart-type" id="chart-type">
15 <option value="pie">Pie</option>
16 <option value="bar">Bar</option>
17 <option value="line">Line</option>
21 <li id="chart-column-horizontal">
22 <label for="horizontal">Horizontal bar:</label>
23 <input id="horizontal" name="column-horizontal" type="checkbox" />
27 <label for="x_element">x column:</label>
28 <select id="x_element" name="x">
29 <option value="[% supposed_x | html %]" selected>[% supposed_x | html %]</option>
30 [% FOREACH header IN header_row %]
31 <option value="[% header.cell | html %]">[% header.cell | html %]</option>
36 [% IF allresults.size %]
38 <label for="include-all">Include all rows (ignore pagination):</label>
39 <input id="include-all" name="chart-include-all" type="checkbox" checked="checked"/>
43 <p>This chart will use only visible rows, click 'Fetch all data' to chart the full report</p>
48 <label for="exclude-last">Exclude last line (Rollup): </label>
49 <input id="exclude-last" name="chart-exclude-last" type="checkbox" />
52 <li class="column_config_row">
53 [% FOREACH header IN header_row %]
54 <fieldset class="chart-column-conf" id="column_[% column | html %]">
56 Column [% column | html %]
57 <a class="chart-column-delete" href="#" data-column="[% column | html %]">
58 <i class="fa fa-remove error"></i>
62 <label for="y_[% column | html %]" >y:</label>
63 <select id="y_[% column | html %]" name="y">
64 <option value="[% supposed_x | html %]" selected>[% supposed_x | html %]</option>
65 [% FOREACH h IN header_row %]
66 [% IF header.cell == h.cell %]
67 <option value="[% h.cell | html %]" selected>[% h.cell | html %]</option>
69 <option value="[% h.cell | html %]">[% h.cell | html %]</option>
75 <div class="chart-column-group">
77 <label for="group_[% column | html %]">Group:</label>
78 <select id="group_[% column | html %]" name="group">
79 [% FOREACH h IN header_row %]
81 <option value="[% i | html %]" selected>[% i | html %]</option>
83 <option value="[% i | html %]">[% i | html %]</option>
90 <div class="chart-column-line">
91 <label for="line_[% column | html %]">Line:</label>
92 <input class="column-line" id="line_[% column | html %]" name="[% header.cell | html %]" type="checkbox" />
95 [% column = column + 1 %]
101 [% item = { cell = supposed_x } %]
102 [% header_row.unshift(item) | html %]
104 <div class="modal-footer">
105 <button id="draw-chart" class="btn btn-default">Draw</button>
106 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>