Commit b30bfab4 authored by Nicolas Delaby's avatar Nicolas Delaby

Add a new graph type : scatter

improvement XML writing
By Thibaut

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20307 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9c090c35
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>\n
<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"\n <office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"\n
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"\n xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"\n
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"\n xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"\n
...@@ -79,14 +78,15 @@ ...@@ -79,14 +78,15 @@
xmlns:metal="http://xml.zope.org/namespaces/metal"\n xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n" \n xmlns:i18n="http://xml.zope.org/namespaces/i18n" \n
office:version="1.0"\n office:version="1.0"\n
tal:define="form python: getattr(here, request.chart_form_id) ;\n >\n
listbox python: getattr(form, request.chart_field_id);\n
line_list python: listbox.get_value(\'default\', render_format=\'list\', REQUEST=request);\n
line_count python:len(line_list);\n
column_list python:line_list[0].getColumnItemList();\n
column_count python:len(column_list)">\n
\n \n
<tal:block tal:define="global col_char python:\'B\';\n <tal:block tal:define="global form python: getattr(here, request.chart_form_id) ;\n
global listbox python: getattr(form, request.chart_field_id);\n
global line_list python: listbox.get_value(\'default\',context=here, render_format=\'list\', REQUEST=request);\n
global line_count python:len(line_list);\n
global column_list python:line_list[0].getColumnItemList();\n
global column_count python:len(column_list);\n
global col_char python:\'B\';\n
global chart_type request/chart_type;\n global chart_type request/chart_type;\n
global series_source request/series_source;\n global series_source request/series_source;\n
global user_column_id_dict request/user_column_id_dict;\n global user_column_id_dict request/user_column_id_dict;\n
...@@ -100,14 +100,12 @@ ...@@ -100,14 +100,12 @@
<number:number number:min-integer-digits="1"/>\n <number:number number:min-integer-digits="1"/>\n
</number:number-style>\n </number:number-style>\n
<style:style style:name="chart_frame" style:family="chart">\n <style:style style:name="chart_frame" style:family="chart">\n
<style:graphic-properties draw:stroke="none" \n <style:graphic-properties draw:stroke="none"\n
svg:stroke-width="0cm" \n svg:stroke-width="0cm"\n
svg:stroke-color="#000000" \n svg:stroke-color="#000000"\n
draw:fill-color="#FFFFFF" \n draw:fill-color="#FFFFFF"\n
draw:opacity="0%"/>\n draw:opacity="0%"/>\n
</style:style>\n </style:style>\n
\n
\n
<style:style style:name="chart_title" style:family="chart">\n <style:style style:name="chart_title" style:family="chart">\n
<style:chart-properties style:direction="ltr"/>\n <style:chart-properties style:direction="ltr"/>\n
<style:graphic-properties draw:stroke="none" draw:fill="none"/>\n <style:graphic-properties draw:stroke="none" draw:fill="none"/>\n
...@@ -124,14 +122,12 @@ ...@@ -124,14 +122,12 @@
style:font-pitch-complex="variable"\n style:font-pitch-complex="variable"\n
style:font-size-complex="35pt"/>\n style:font-size-complex="35pt"/>\n
</style:style>\n </style:style>\n
\n
<style:style style:name="chart_legend" style:family="chart">\n <style:style style:name="chart_legend" style:family="chart">\n
<style:graphic-properties draw:fill="none"/>\n <style:graphic-properties draw:fill="none"/>\n
<tal:block metal:use-macro="here/OOoChart_macroLibrary/macros/style_text_properties" />\n <tal:block metal:use-macro="here/OOoChart_macroLibrary/macros/style_text_properties" />\n
</style:style>\n </style:style>\n
\n
<style:style style:name="chart_picture" style:family="chart">\n <style:style style:name="chart_picture" style:family="chart">\n
<style:chart-properties chart:lines="true"\n <style:chart-properties tal:condition="python:chart_type==\'chart:bar\'"\n
chart:mean-value="false"\n chart:mean-value="false"\n
chart:error-margin="0"\n chart:error-margin="0"\n
chart:error-lower-limit="0"\n chart:error-lower-limit="0"\n
...@@ -140,9 +136,9 @@ ...@@ -140,9 +136,9 @@
chart:error-category="none"\n chart:error-category="none"\n
chart:stock-with-volume="false"\n chart:stock-with-volume="false"\n
chart:japanese-candle-stick="false"\n chart:japanese-candle-stick="false"\n
chart:stacked="false"\n
tal:attributes="chart:three-dimensional request/chart_three_dimensional | string:false;\n tal:attributes="chart:three-dimensional request/chart_three_dimensional | string:false;\n
chart:deep request/deep ; \n chart:deep request/deep ;\n
chart:stacked request/chart_stacked | string:false;\n
chart:vertical request/chart_position | string:false;\n chart:vertical request/chart_position | string:false;\n
chart:percentage request/chart_percentage | string:false;\n chart:percentage request/chart_percentage | string:false;\n
chart:symbol-type request/symbol_type ;\n chart:symbol-type request/symbol_type ;\n
...@@ -155,29 +151,104 @@ ...@@ -155,29 +151,104 @@
chart:regression-type request/regression_type ;\n chart:regression-type request/regression_type ;\n
chart:interpolation request/interpolation ;\n chart:interpolation request/interpolation ;\n
"/>\n "/>\n
<style:chart-properties tal:condition="python:chart_type==\'chart:line\'"\n
chart:mean-value="false"\n
chart:error-margin="0"\n
chart:error-lower-limit="0"\n
chart:error-upper-limit="0"\n
chart:error-percentage="0"\n
chart:error-category="none"\n
chart:stock-with-volume="false"\n
chart:japanese-candle-stick="false"\n
chart:lines="true"\n
chart:connect-bars="false"\n
chart:lines-used="0"\n
tal:attributes="chart:three-dimensional request/chart_three_dimensional | string:false;\n
chart:deep request/deep ;\n
chart:stacked request/chart_stacked | string:false;\n
chart:vertical request/chart_position | string:false;\n
chart:percentage request/chart_percentage | string:false;\n
chart:symbol-type request/symbol_type ;\n
chart:series-source request/series_source;\n
chart:data-label-number request/data_label_number ;\n
chart:data-label-symbol request/data_label_symbol | string:false;\n
chart:data-label-text request/data_label_text | string:false ;\n
chart:regression-type request/regression_type ;\n
chart:interpolation request/interpolation ;\n
"/>\n
<style:chart-properties tal:condition="python:chart_type==\'chart:circle\'"\n
chart:mean-value="false"\n
chart:error-margin="0"\n
chart:error-lower-limit="0"\n
chart:error-upper-limit="0"\n
chart:error-percentage="0"\n
chart:error-category="none"\n
chart:stock-with-volume="false"\n
chart:japanese-candle-stick="false"\n
chart:lines="false"\n
tal:attributes="chart:three-dimensional request/chart_three_dimensional | string:false;\n
chart:deep request/deep ;\n
chart:vertical request/chart_position | string:false;\n
chart:percentage request/chart_percentage | string:false;\n
chart:symbol-type request/symbol_type ;\n
chart:series-source request/series_source;\n
chart:connect-bars request/connect_bars;\n
chart:data-label-number request/data_label_number ;\n
chart:data-label-symbol request/data_label_symbol | string:false;\n
chart:data-label-text request/data_label_text | string:false ;\n
chart:lines-used request/lines_used | string:0;\n
chart:regression-type request/regression_type ;\n
chart:interpolation request/interpolation ;\n
"/>\n
<style:chart-properties tal:condition="python:chart_type==\'chart:scatter\'"\n
chart:mean-value="false"\n
chart:error-margin="0"\n
chart:error-lower-limit="0"\n
chart:error-upper-limit="0"\n
chart:error-percentage="0"\n
chart:error-category="none"\n
chart:stock-with-volume="false"\n
chart:japanese-candle-stick="false"\n
chart:stacked="false"\n
chart:lines="false"\n
chart:lines-used="0"\n
tal:attributes="chart:three-dimensional request/chart_three_dimensional | string:false;\n
chart:deep request/deep ;\n
chart:vertical request/chart_position | string:false;\n
chart:percentage request/chart_percentage | string:false;\n
chart:symbol-type request/symbol_type ;\n
chart:series-source request/series_source;\n
chart:connect-bars request/connect_bars;\n
chart:data-label-number request/data_label_number ;\n
chart:data-label-symbol request/data_label_symbol | string:false;\n
chart:data-label-text request/data_label_text | string:false ;\n
chart:regression-type request/regression_type ;\n
chart:interpolation request/interpolation ;\n
"/>\n
</style:style>\n </style:style>\n
\n
<style:style style:name="chart_x_axis" \n <style:style style:name="chart_x_axis" \n
style:family="chart" \n style:family="chart" \n
style:data-style-name="N0">\n style:data-style-name="N0">\n
<style:chart-properties chart:display-label="true" \n <style:chart-properties chart:display-label="true" \n
chart:tick-marks-major-inner="true" chart:tick-marks-major-outer="true" \n chart:tick-marks-major-inner="true"\n
chart:logarithmic="false" \n chart:tick-marks-major-outer="true"\n
chart:text-overlap="true" \n chart:logarithmic="false"\n
text:line-break="true" \n chart:text-overlap="true"\n
chart:label-arrangement="side-by-side" \n text:line-break="true"\n
chart:visible="true" \n chart:label-arrangement="side-by-side"\n
chart:visible="true"\n
style:direction="ltr"/>\n style:direction="ltr"/>\n
<style:graphic-properties draw:stroke="solid" svg:stroke-width="0cm" svg:stroke-color="#000000"/>\n <style:graphic-properties draw:stroke="solid"\n
svg:stroke-width="0cm"\n
svg:stroke-color="#000000"/>\n
<tal:block metal:use-macro="here/OOoChart_macroLibrary/macros/style_text_properties" />\n <tal:block metal:use-macro="here/OOoChart_macroLibrary/macros/style_text_properties" />\n
</style:style>\n </style:style>\n
\n <style:style style:name="chart_y_axis"\n
<style:style style:name="chart_y_axis" \n style:family="chart"\n
style:family="chart" \n
style:data-style-name="N0">\n style:data-style-name="N0">\n
<style:chart-properties chart:display-label="true" \n <style:chart-properties chart:display-label="true"\n
chart:tick-marks-major-inner="true"\n chart:tick-marks-major-inner="true"\n
chart:tick-marks-major-outer="true" \n chart:tick-marks-major-outer="true"\n
chart:logarithmic="false"\n chart:logarithmic="false"\n
chart:origin="0"\n chart:origin="0"\n
chart:gap-width="100"\n chart:gap-width="100"\n
...@@ -192,49 +263,59 @@ ...@@ -192,49 +263,59 @@
svg:stroke-color="#000000"/>\n svg:stroke-color="#000000"/>\n
<tal:block metal:use-macro="here/OOoChart_macroLibrary/macros/style_text_properties" />\n <tal:block metal:use-macro="here/OOoChart_macroLibrary/macros/style_text_properties" />\n
</style:style>\n </style:style>\n
\n
<style:style style:family="chart" style:name="sector_pie">\n <style:style style:family="chart" style:name="sector_pie">\n
<style:graphic-properties svg:stroke-color=\'#ffffff\' />\n
<style:chart-properties tal:attributes="chart:pie-offset python:request.sector_pie_offset;"/>\n <style:chart-properties tal:attributes="chart:pie-offset python:request.sector_pie_offset;"/>\n
</style:style>\n
<tal:block tal:condition="python:chart_type==\'chart:line\' and series_source==\'columns\'">\n
<style:style style:family="chart" style:name="data_line_rows">\n
<tal:block metal:use-macro="here/OOoChart_macroLibrary/macros/style_text_properties" />\n <tal:block metal:use-macro="here/OOoChart_macroLibrary/macros/style_text_properties" />\n
</style:style>\n </style:style>\n
\n </tal:block>\n
<style:style style:family="chart" style:name="other_style">\n <style:style style:family="chart" style:name="other_style">\n
<style:graphic-properties svg:stroke-color=\'#000000\'\n
draw:stroke="solid"\n
svg:stroke-width="0.01cm"/>\n
<tal:block metal:use-macro="here/OOoChart_macroLibrary/macros/style_text_properties" />\n <tal:block metal:use-macro="here/OOoChart_macroLibrary/macros/style_text_properties" />\n
</style:style>\n </style:style>\n
\n
<tal:block tal:repeat="column_item python:column_list[1:]">\n <tal:block tal:repeat="column_item python:column_list[1:]">\n
<!-- style for chart:bar and serie data columns-->\n <!-- style for chart:bar and serie data columns-->\n
<style:style style:family="chart"\n <style:style tal:condition="python:chart_type==\'chart:bar\' and series_source==\'columns\'"\n
style:family="chart"\n
tal:attributes="style:name python:\'data_bar_%s\' % column_item[0]">\n tal:attributes="style:name python:\'data_bar_%s\' % column_item[0]">\n
<style:graphic-properties svg:stroke-color=\'#000000\'\n <style:graphic-properties svg:stroke-color=\'#000000\'\n
tal:attributes="draw:fill-color python:request.colour_column_dict.get(column_item[0], \'#ff6f00\');\n tal:attributes="draw:fill-color python:request.colour_column_dict.get(column_item[0], \'#ff6f00\');\n
"/>\n "/>\n
<tal:block metal:use-macro="here/OOoChart_macroLibrary/macros/style_text_properties" />\n <tal:block metal:use-macro="here/OOoChart_macroLibrary/macros/style_text_properties" />\n
</style:style>\n </style:style>\n
\n
<!-- style for chart:line and serie data columns-->\n <!-- style for chart:line and serie data columns-->\n
<style:style style:family="chart"\n <style:style tal:condition="python:chart_type==\'chart:line\' or chart_type==\'chart:scatter\' and series_source==\'columns\'"\n
style:family="chart"\n
tal:attributes="style:name python:\'data_line_%s\' % column_item[0]">\n tal:attributes="style:name python:\'data_line_%s\' % column_item[0]">\n
<style:graphic-properties tal:attributes="svg:stroke-color python:request.colour_column_dict.get(column_item[0], \'#ff6f00\');"/>\n <style:graphic-properties tal:attributes="svg:stroke-color python:request.colour_column_dict.get(column_item[0], \'#ff6f00\'); "/>\n
<tal:block metal:use-macro="here/OOoChart_macroLibrary/macros/style_text_properties" />\n <tal:block metal:use-macro="here/OOoChart_macroLibrary/macros/style_text_properties" />\n
</style:style>\n </style:style>\n
\n
<!-- style for chart:circle and series data rows-->\n <!-- style for chart:circle and series data rows-->\n
<style:style style:family="chart"\n <style:style tal:condition="python:chart_type==\'chart:circle\' and series_source==\'rows\'"\n
style:family="chart"\n
tal:attributes="style:name python:\'data_circle_%s\' % column_item[0]">\n tal:attributes="style:name python:\'data_circle_%s\' % column_item[0]">\n
\n \n
<style:graphic-properties svg:stroke-color=\'#000000\' \n <style:graphic-properties svg:stroke-color=\'#000000\'\n
tal:attributes="draw:fill-color python:request.colour_column_dict.get(column_item[0], \'#ff6f00\');\n tal:attributes="draw:fill-color python:request.colour_column_dict.get(column_item[0], \'#ff6f00\');\n
"/>\n "/>\n
<tal:block metal:use-macro="here/OOoChart_macroLibrary/macros/style_text_properties" />\n <tal:block metal:use-macro="here/OOoChart_macroLibrary/macros/style_text_properties" />\n
</style:style>\n </style:style>\n
</tal:block>\n </tal:block>\n
\n <style:style style:name="chart_wall" \n
<style:style style:name="chart_wall" style:family="chart">\n style:family="chart">\n
<style:graphic-properties draw:stroke="none" draw:fill="none"/>\n <style:graphic-properties draw:stroke="none"\n
draw:fill="none"/>\n
</style:style>\n </style:style>\n
\n <style:style style:name="chart_floor"\n
<style:style style:name="chart_floor" style:family="chart">\n style:family="chart">\n
<style:graphic-properties draw:stroke="none" draw:fill-color="#999999"/>\n <style:graphic-properties draw:stroke="none"\n
draw:fill-color="#999999"/>\n
</style:style>\n </style:style>\n
</office:automatic-styles>\n </office:automatic-styles>\n
\n \n
...@@ -253,15 +334,14 @@ ...@@ -253,15 +334,14 @@
</chart:title>\n </chart:title>\n
</tal:block>\n </tal:block>\n
<!-- Legend Of The Graph-->\n <!-- Legend Of The Graph-->\n
<tal:block tal:define="bool request/chart_legend"\n <chart:legend tal:define="bool request/chart_legend"\n
tal:condition="python:bool==\'true\'">\n tal:condition="python:bool==\'true\'"\n
<chart:legend tal:attributes="chart:legend-position position_legend"\n tal:attributes="chart:legend-position position_legend"\n
chart:style-name="chart_legend" />\n chart:style-name="chart_legend" />\n
</tal:block>\n <!-- Graph according chart_type. Here: chart:line or chart:bar or chart:scatter-->\n
<!-- Graph according chart_type. Here: chart:line or chart:bar -->\n <chart:plot-area tal:condition="python:chart_type==\'chart:bar\'\n
<tal:block tal:condition="python:chart_type==\'chart:bar\' \n or chart_type==\'chart:line\' or chart_type==\'chart:scatter\'"\n
or chart_type==\'chart:line\'">\n chart:style-name="chart_picture">\n
<chart:plot-area chart:style-name="chart_picture">\n
<chart:axis chart:dimension="x"\n <chart:axis chart:dimension="x"\n
chart:name="primary-x"\n chart:name="primary-x"\n
chart:style-name="chart_x_axis">\n chart:style-name="chart_x_axis">\n
...@@ -273,119 +353,142 @@ ...@@ -273,119 +353,142 @@
<chart:grid tal:condition="python:grid_graph==\'true\'"\n <chart:grid tal:condition="python:grid_graph==\'true\'"\n
tal:attributes="chart:class request/grid_size | string:major ;" />\n tal:attributes="chart:class request/grid_size | string:major ;" />\n
</chart:axis>\n </chart:axis>\n
<tal:block tal:condition="python:chart_type==\'chart:bar\' \n \n
and series_source==\'columns\' \n <tal:block tal:condition="python:chart_type == \'chart:scatter\'\n
and len(user_column_id_dict.keys())!=0">\n and series_source == \'columns\'\n
<tal:block tal:repeat="column_item python:column_list[1:]">\n and len(user_column_id_dict.keys()) == 0"\n
<tal:block tal:condition="python:user_column_id_dict.has_key(column_item[0])">\n tal:repeat="column_item python:column_list[1:]">\n
<chart:series tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, line_count);\n <chart:series tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, line_count);\n
chart:label-cell-address python:\'local-table.%s1\' % col_char;\n chart:label-cell-address python:\'local-table.%s1\' % col_char;\n
chart:style-name python:\'data_bar_%s\' % column_item[0];">\n chart:style-name python:\'data_line_%s\' % column_item[0];">\n
<chart:data-point tal:attributes="chart:repeated line_count"/>\n <chart:data-point tal:attributes="chart:repeated line_count"/>\n
</chart:series>\n </chart:series>\n
</tal:block>\n </tal:block>\n
\n
<tal:block tal:condition="python:chart_type == \'chart:scatter\'\n
and series_source == \'columns\'\n
and len(user_column_id_dict.keys()) != 0"\n
tal:repeat="column_item python:column_list[1:]">\n
<chart:series tal:condition="python:user_column_id_dict.has_key(column_item[0])"\n
tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, line_count);\n
chart:label-cell-address python:\'local-table.%s1\' % col_char;\n
chart:style-name python:\'data_line_%s\' % column_item[0];">\n
<chart:data-point tal:attributes="chart:repeated line_count"/>\n
</chart:series>\n
</tal:block>\n </tal:block>\n
</tal:block>\n \n
<tal:block tal:condition="python:chart_type==\'chart:bar\' \n <tal:block tal:condition="python:chart_type==\'chart:bar\'\n
and series_source==\'columns\' \n and series_source==\'columns\' \n
and len(user_column_id_dict.keys())==0">\n and len(user_column_id_dict.keys())!=0"\n
<tal:block tal:repeat="column_item python:column_list[1:]">\n tal:repeat="column_item python:column_list[1:]">\n
<chart:series \n <chart:series tal:condition="python:user_column_id_dict.has_key(column_item[0])"\n
tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, line_count);\n tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, line_count);\n
chart:label-cell-address python:\'local-table.%s1\' % col_char;\n chart:label-cell-address python:\'local-table.%s1\' % col_char;\n
chart:style-name python:\'data_bar_%s\' % column_item[0];">\n chart:style-name python:\'data_bar_%s\' % column_item[0];">\n
<chart:data-point tal:attributes="chart:repeated line_count"/>\n <chart:data-point tal:attributes="chart:repeated line_count"/>\n
</chart:series>\n </chart:series>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python: chart_type == \'chart:bar\'\n
and series_source == \'columns\'\n
and len(user_column_id_dict.keys()) == 0"\n
tal:repeat="column_item python:column_list[1:]">\n
<chart:series tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, line_count);\n
chart:label-cell-address python:\'local-table.%s1\' % col_char;\n
chart:style-name python:\'data_bar_%s\' % column_item[0];">\n
<chart:data-point tal:attributes="chart:repeated line_count"/>\n
</chart:series>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python:series_source==\'rows\' ">\n <tal:block tal:condition="python:chart_type == \'chart:bar\'\n
<tal:block tal:repeat="line_item python:line_list">\n and series_source == \'rows\'"\n
tal:repeat="line_item python:line_list">\n
<chart:series chart:style-name="other_style"\n <chart:series chart:style-name="other_style"\n
tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, column_count);\n tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, column_count);\n
chart:label-cell-address python:\'local-table.%s1\' % col_char;">\n chart:label-cell-address python:\'local-table.%s1\' % col_char;">\n
<chart:data-point tal:attributes="chart:repeated column_count"/>\n <chart:data-point tal:attributes="chart:repeated column_count"/>\n
</chart:series>\n </chart:series>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python:chart_type == \'chart:line\'\n
or chart_type == \'chart:scatter\'\n
and series_source == \'rows\'"\n
tal:repeat="line_item python:line_list">\n
<chart:series chart:style-name="data_line_rows"\n
tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, column_count);\n
chart:label-cell-address python:\'local-table.%s1\' % col_char;">\n
<chart:data-point tal:attributes="chart:repeated column_count"/>\n
</chart:series>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python:chart_type==\'chart:line\' \n <tal:block tal:condition="python:chart_type==\'chart:line\'\n
and series_source==\'columns\' \n and series_source==\'columns\'\n
and len(user_column_id_dict.keys())!=0">\n and len(user_column_id_dict.keys())"\n
<tal:block tal:repeat="column_item python:column_list[1:]">\n tal:repeat="column_item python:column_list[1:]">\n
<tal:block tal:condition="python:user_column_id_dict.has_key(column_item[0]) ">\n <tal:block tal:condition="python:user_column_id_dict.has_key(column_item[0]) ">\n
<chart:series \n <chart:series tal:attributes="chart:values-cell-range-address\n
tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, column_count);\n python:\'local-table.%s2:.%s%s\' % (col_char, col_char, column_count);\n
chart:label-cell-address python:\'local-table.%s1\' % col_char;\n chart:label-cell-address python:\'local-table.%s1\' % col_char;\n
chart:style-name python:\'data_line_%s\' % column_item[0];">\n chart:style-name python:\'data_line_%s\' % column_item[0];">\n
<chart:data-point tal:attributes="chart:repeated python:line_count"/>\n <chart:data-point tal:attributes="chart:repeated python:line_count"/>\n
</chart:series>\n </chart:series>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n <tal:block tal:condition="python:chart_type == \'chart:line\'\n
<tal:block tal:condition="python:chart_type==\'chart:line\' and series_source==\'columns\' and len(user_column_id_dict.keys())==0">\n and series_source == \'columns\'\n
<tal:block tal:repeat="column_item python:column_list[1:]">\n and len(user_column_id_dict.keys()) == 0"\n
<chart:series \n tal:repeat="column_item python:column_list[1:]">\n
tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, column_count);\n <chart:series tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, column_count);\n
chart:label-cell-address python:\'local-table.%s1\' % col_char;\n chart:label-cell-address python:\'local-table.%s1\' % col_char;\n
chart:style-name python:\'data_line_%s\' % column_item[0];">\n chart:style-name python:\'data_line_%s\' % column_item[0];">\n
<chart:data-point tal:attributes="chart:repeated python:line_count"/>\n <chart:data-point tal:attributes="chart:repeated python:line_count"/>\n
</chart:series>\n </chart:series>\n
</tal:block>\n </tal:block>\n
</tal:block>\n
<chart:wall chart:style-name="chart_wall"/>\n <chart:wall chart:style-name="chart_wall"/>\n
<chart:floor chart:style-name="chart_floor"/>\n <chart:floor chart:style-name="chart_floor"/>\n
</chart:plot-area>\n </chart:plot-area>\n
</tal:block>\n
\n \n
<!-- Graph according chart_type and series_source. Here: chart:circle and data in columns-->\n <!-- Graph according chart_type and series_source. Here: chart:circle and data in columns-->\n
<tal:block tal:condition="python:chart_type==\'chart:circle\' \n <chart:plot-area tal:condition="python:chart_type == \'chart:circle\'\n
and series_source==\'columns\' ">\n and series_source == \'columns\' "\n
<chart:plot-area chart:style-name="chart_picture">\n chart:style-name="chart_picture">\n
<chart:axis chart:dimension="y"\n <chart:axis chart:dimension="y"\n
chart:name="primary-y"\n chart:name="primary-y"\n
chart:style-name="chart_y_axis">\n chart:style-name="chart_y_axis">\n
</chart:axis>\n </chart:axis>\n
<tal:block tal:repeat="column_item python:column_list[1:]">\n <tal:block tal:repeat="column_item python:column_list[1:]">\n
<chart:series \n <chart:series tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, column_count);\n
tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, column_count);\n
chart:label-cell-address python:\'local-table.%s1\' % col_char;">\n chart:label-cell-address python:\'local-table.%s1\' % col_char;">\n
<chart:data-point tal:attributes="chart:repeated python:line_count"\n <chart:data-point tal:attributes="chart:repeated python:line_count"\n
chart:style-name="sector_pie"/>\n chart:style-name="sector_pie"/>\n
</chart:series>\n </chart:series>\n
</tal:block>\n </tal:block>\n
</chart:plot-area>\n </chart:plot-area>\n
</tal:block>\n
<!-- Graph according chart_type and series_source. Here: chart:circle and data in rows-->\n <!-- Graph according chart_type and series_source. Here: chart:circle and data in rows-->\n
<tal:block tal:condition="python:chart_type==\'chart:circle\'\n <chart:plot-area tal:condition="python:chart_type == \'chart:circle\'\n
and series_source==\'rows\'">\n and series_source == \'rows\'"\n
<chart:plot-area chart:style-name="chart_picture">\n chart:style-name="chart_picture">\n
<tal:block tal:condition="python:len(user_column_id_dict.keys())==0">\n <tal:block tal:condition="python:len(user_column_id_dict.keys()) == 0"\n
<tal:block tal:repeat="column_item python:column_list[1:]">\n tal:repeat="column_item python:column_list[1:]">\n
<chart:series tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, line_count);\n <chart:series tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, line_count);\n
chart:label-cell-address python:\'local-table.%s1\' % col_char;\n chart:label-cell-address python:\'local-table.%s1\' % col_char;\n
chart:style-name python:\'data_circle_%s\' % column_item[0];">\n chart:style-name python:\'data_circle_%s\' % column_item[0];">\n
<chart:data-point chart:style-name="sector_pie"\n <chart:data-point chart:style-name="sector_pie"\n
tal:attributes="chart:repeated column_count" />\n tal:attributes="chart:repeated python:column_count" />\n
</chart:series>\n </chart:series>\n
</tal:block>\n </tal:block>\n
</tal:block> \n <tal:block tal:condition="python:len(user_column_id_dict.keys()) != 0"\n
<tal:block tal:condition="python:len(user_column_id_dict.keys())!=0">\n tal:repeat="column_item python:column_list[1:]">\n
<tal:block tal:repeat="column_item python:column_list[1:]">\n
<tal:block tal:condition="python:user_column_id_dict.has_key(column_item[0])">\n <tal:block tal:condition="python:user_column_id_dict.has_key(column_item[0])">\n
<chart:series \n <chart:series tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, line_count);\n
tal:attributes="chart:values-cell-range-address python:\'local-table.%s2:.%s%s\' % (col_char, col_char, line_count);\n
chart:label-cell-address python:\'local-table.%s1\' % col_char;\n chart:label-cell-address python:\'local-table.%s1\' % col_char;\n
chart:style-name python:\'data_circle_%s\' % column_item[0];">\n chart:style-name python:\'data_circle_%s\' % column_item[0];">\n
<chart:data-point chart:style-name="sector_pie" tal:attributes="chart:repeated column_count" />\n <chart:data-point chart:style-name="sector_pie"\n
tal:attributes="chart:repeated column_count" />\n
</chart:series>\n </chart:series>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n
</chart:plot-area>\n </chart:plot-area>\n
</tal:block>\n
\n \n
<tal:block tal:condition="python:len(user_column_id_dict.keys())==0" >\n <!-- Storage all ListBox Data in Spreadsheet-->\n
<!-- Storage all ListBox Data in Spreadsheet--> \n <table:table tal:condition="python:len(user_column_id_dict.keys()) == 0"\n
<table:table table:name="local-table">\n table:name="local-table">\n
<table:table-header-columns>\n <table:table-header-columns>\n
<table:table-column/>\n <table:table-column/>\n
</table:table-header-columns>\n </table:table-header-columns>\n
...@@ -398,26 +501,29 @@ ...@@ -398,26 +501,29 @@
<table:table-cell office:value-type="string">\n <table:table-cell office:value-type="string">\n
<text:p></text:p>\n <text:p></text:p>\n
</table:table-cell>\n </table:table-cell>\n
<tal:block tal:repeat="column_item python:column_list[1:] "> \n <table:table-cell tal:repeat="column_item python:column_list[1:] "\n
<table:table-cell office:value-type="string">\n office:value-type="string">\n
<text:p tal:content="python:column_item[1]">Documents</text:p>\n <text:p tal:content="python:column_item[1]"\n
</table:table-cell> \n i18n:domain="ui"\n
</tal:block>\n i18n:translate="">Documents</text:p>\n
</table:table-cell>\n
</table:table-row>\n </table:table-row>\n
</table:table-header-rows>\n </table:table-header-rows>\n
\n \n
<table:table-rows>\n <table:table-rows>\n
<tal:block tal:repeat="line python:line_list[1:]"> \n <tal:block tal:repeat="line python:line_list[1:]">\n
<tal:block tal:condition="python: line.isDataLine()"> \n
<table:table-row>\n <table:table-row>\n
<tal:block tal:repeat="column_item column_list">\n <tal:block tal:repeat="column_item column_list">\n
<tal:block tal:define="column_id python:column_item[0];\n <tal:block tal:define="column_id python:column_item[0];\n
column_type python:line.getColumnPropertyTypeName(column_id);\n column_type python:line.getColumnPropertyTypeName(column_id);\n
column_value python:line.getColumnProperty(column_id);\n column_value python:line.getColumnProperty(column_id);\n
value_type python:((column_type in (\'float\', \'int\', \'long\')) and \'float\') or \'string\'">\n value_type python:((column_type in (\'float\', \'int\', \'long\',)) and \'float\') or \'string\'">\n
<table:table-cell \n <table:table-cell tal:condition="python: value_type==\'string\'"\n
tal:condition="python: value_type==\'string\'"\n
tal:attributes="office:value-type value_type">\n tal:attributes="office:value-type value_type">\n
<text:p tal:content="column_value"></text:p>\n <text:p tal:content="python:column_value"\n
i18n:domain="ui"\n
i18n:translate=""></text:p>\n
</table:table-cell>\n </table:table-cell>\n
<table:table-cell\n <table:table-cell\n
tal:condition="python:value_type != \'string\'"\n tal:condition="python:value_type != \'string\'"\n
...@@ -426,16 +532,16 @@ ...@@ -426,16 +532,16 @@
<text:p></text:p>\n <text:p></text:p>\n
</table:table-cell>\n </table:table-cell>\n
</tal:block>\n </tal:block>\n
</tal:block> \n </tal:block>\n
</table:table-row>\n </table:table-row>\n
</tal:block>\n </tal:block>\n
</tal:block>\n
</table:table-rows>\n </table:table-rows>\n
</table:table>\n </table:table>\n
</tal:block>\n
\n \n
<tal:block tal:condition="python:len(user_column_id_dict.keys())!=0" >\n
<!-- Storage Data given by user in Spreadsheet-->\n <!-- Storage Data given by user in Spreadsheet-->\n
<table:table table:name="local-table">\n <table:table tal:condition="python:len(user_column_id_dict.keys()) != 0"\n
table:name="local-table">\n
<table:table-header-columns>\n <table:table-header-columns>\n
<table:table-column/>\n <table:table-column/>\n
</table:table-header-columns>\n </table:table-header-columns>\n
...@@ -447,23 +553,25 @@ ...@@ -447,23 +553,25 @@
<table:table-cell office:value-type="string">\n <table:table-cell office:value-type="string">\n
<text:p></text:p>\n <text:p></text:p>\n
</table:table-cell>\n </table:table-cell>\n
<tal:block tal:repeat="column_item python:column_list[1:] "> \n <tal:block tal:repeat="column_item python:column_list[1:] ">\n
<tal:block tal:condition="python:user_column_id_dict.has_key(column_item[0]) ">\n <tal:block tal:condition="python:user_column_id_dict.has_key(column_item[0]) ">\n
<table:table-cell office:value-type="string">\n <table:table-cell office:value-type="string">\n
<text:p tal:content="python:column_item[1]">Documents</text:p>\n <text:p tal:content="python:column_item[1]"\n
</table:table-cell> \n i18n:domain="ui"\n
i18n:translate="">Documents</text:p>\n
</table:table-cell>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</table:table-row>\n </table:table-row>\n
</table:table-header-rows>\n </table:table-header-rows>\n
<table:table-rows>\n <table:table-rows>\n
<tal:block tal:repeat="line python:line_list[1:]"> \n <tal:block tal:repeat="line python:line_list[1:]">\n
<tal:block tal:condition="python: line.isDataLine()">\n
<table:table-row>\n <table:table-row>\n
\n
<tal:block tal:repeat="column_item column_list">\n <tal:block tal:repeat="column_item column_list">\n
<tal:block tal:define="column_id python:column_item[0];">\n <tal:block tal:define="column_id python:column_item[0];">\n
<tal:block tal:condition="python:user_data_title!=\'\'">\n <tal:block tal:condition="python:user_data_title != \'\'">\n
<tal:block tal:condition="python:user_data_title==column_id"\n <tal:block tal:condition="python:user_data_title == column_id"\n
tal:define="column_value python:line.getColumnProperty(column_id);">\n tal:define="column_value python:line.getColumnProperty(column_id);">\n
<table:table-cell tal:attributes="office:value-type python:\'string\'">\n <table:table-cell tal:attributes="office:value-type python:\'string\'">\n
<text:p tal:content="column_value"></text:p>\n <text:p tal:content="column_value"></text:p>\n
...@@ -472,24 +580,21 @@ ...@@ -472,24 +580,21 @@
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python:user_data_title==\'\'">\n <tal:block tal:condition="python:user_data_title == \'\'"\n
<tal:block tal:define="column_id python:column_list[0][0];\n tal:define="column_id python:column_list[0][0];\n
column_type python:line.getColumnPropertyTypeName(column_id);\n column_type python:line.getColumnPropertyTypeName(column_id);\n
column_value python:line.getColumnProperty(column_id);\n column_value python:line.getColumnProperty(column_id);">\n
">\n <table:table-cell tal:attributes="office:value-type python:\'string\'">\n
<table:table-cell \n
tal:attributes="office:value-type python:\'string\'">\n
<text:p tal:content="column_value"></text:p>\n <text:p tal:content="column_value"></text:p>\n
</table:table-cell>\n </table:table-cell>\n
</tal:block> \n
</tal:block>\n </tal:block>\n
<tal:block tal:repeat="column_item column_list">\n <tal:block tal:repeat="column_item column_list">\n
<tal:block tal:condition="python:user_column_id_dict.has_key(column_item[0]) ">\n <tal:block tal:condition="python:user_column_id_dict.has_key(column_item[0]) ">\n
<tal:block tal:define="column_id python:column_item[0];\n <tal:block tal:define="column_id python:column_item[0];\n
column_type python:line.getColumnPropertyTypeName(column_id);\n column_type python:line.getColumnPropertyTypeName(column_id);\n
column_value python:line.getColumnProperty(column_id);\n column_value python:line.getColumnProperty(column_id);\n
value_type python:((column_type in (\'float\', \'int\', \'long\')) and \'float\') or \'string\'">\n value_type python:((column_type in (\'float\', \'int\', \'long\',)) and \'float\') or \'string\'">\n
<table:table-cell tal:condition="python: value_type==\'string\'"\n <table:table-cell tal:condition="python: value_type == \'string\'"\n
tal:attributes="office:value-type value_type">\n tal:attributes="office:value-type value_type">\n
<text:p tal:content="column_value"></text:p>\n <text:p tal:content="column_value"></text:p>\n
</table:table-cell>\n </table:table-cell>\n
...@@ -503,9 +608,9 @@ ...@@ -503,9 +608,9 @@
</tal:block>\n </tal:block>\n
</table:table-row>\n </table:table-row>\n
</tal:block>\n </tal:block>\n
</tal:block>\n
</table:table-rows>\n </table:table-rows>\n
</table:table>\n </table:table>\n
</tal:block>\n
</chart:chart>\n </chart:chart>\n
</office:chart>\n </office:chart>\n
</office:body>\n </office:body>\n
......
...@@ -184,7 +184,7 @@ bFBLBQYAAAAABAAEAA8BAAAYEgAAAAA=</string> </value> ...@@ -184,7 +184,7 @@ bFBLBQYAAAAABAAEAA8BAAAYEgAAAAA=</string> </value>
global width python: \'%scm\' % (int((getattr(here.portal_preferences, preferred_method_width_id)())) * 0.025 );"/>\n global width python: \'%scm\' % (int((getattr(here.portal_preferences, preferred_method_width_id)())) * 0.025 );"/>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
<draw:page draw:style-name=\'dp1\' \n <draw:page draw:style-name=\'dp1\'\n
draw:name=\'page1\'\n draw:name=\'page1\'\n
draw:master-page-name=\'Standard\'>\n draw:master-page-name=\'Standard\'>\n
<office:forms form:apply-design-mode=\'false\'\n <office:forms form:apply-design-mode=\'false\'\n
...@@ -193,8 +193,8 @@ bFBLBQYAAAAABAAEAA8BAAAYEgAAAAA=</string> </value> ...@@ -193,8 +193,8 @@ bFBLBQYAAAAABAAEAA8BAAAYEgAAAAA=</string> </value>
draw:layer=\'layout\'\n draw:layer=\'layout\'\n
svg:x=\'0cm\'\n svg:x=\'0cm\'\n
svg:y=\'0cm\'\n svg:y=\'0cm\'\n
tal:attributes="svg:height height;\n tal:attributes="svg:height height | string:10cm;\n
svg:width width ">\n svg:width width | string:10cm">\n
<office:include tal:attributes="path python: \'%s/ERP5Site_buildChart\' % here.getPath()" xlink:type=\'simple\' xlink:actuate=\'onLoad\' xlink:show=\'embed\'/>\n <office:include tal:attributes="path python: \'%s/ERP5Site_buildChart\' % here.getPath()" xlink:type=\'simple\' xlink:actuate=\'onLoad\' xlink:show=\'embed\'/>\n
</draw:frame>\n </draw:frame>\n
</draw:page>\n </draw:page>\n
......
775 776
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment