Add constant interpolation on line graph

review422001
This commit is contained in:
Cédric Krier
2012-07-25 20:34:17 +02:00
parent 5a0fd034cb
commit 72a1946cd3
4 changed files with 32 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
* Add constant interpolation on line graph
* Add create/delete field access
* Add dynamic size limit on the One2Many, Many2Many and Char
* Replace __tryton__.py by tryton.cfg
+16
View File
@@ -541,6 +541,22 @@ field
* ``empty``: defined if the line graph must put a point for missing
dates.
* ``interpolation``: defined how the line graph must interpolate points.
The default is ``linear``.
* ``constant-center``: use the value of the nearest point, see
`Nearest-neighbor interpolation`_
* ``constant-left``: use the value of the nearest left point.
* ``constant-right``: use the value of the nearest right point.
* ``linear``: see `linear interpolation`_
.. _`Nearest-neighbor interpolation`:
http://en.wikipedia.org/wiki/Nearest-neighbor_interpolation
.. _`linear interpolation`: http://en.wikipedia.org/wiki/Linear_interpolation
Example
-------
+3
View File
@@ -25,6 +25,9 @@ attlist.field &= attribute empty { "0" | "1" }?
attlist.field &= attribute color { text }?
attlist.field &= attribute widget { "float_time" }?
attlist.field &= attribute float_time { text }?
attlist.field &=
[ a:defaultValue = "linear" ]
attribute interpolation { "constant-left" | "constant-right" | "constant-center" | "linear" }?
data = element data { attlist.data, xpath+ }
attlist.data &= empty
xpath = element xpath { attlist.xpath,
+12
View File
@@ -125,6 +125,18 @@
<attribute name="float_time"/>
</optional>
</define>
<define name="attlist.field" combine="interleave">
<optional>
<attribute name="interpolation" a:defaultValue="linear">
<choice>
<value>constant-left</value>
<value>constant-right</value>
<value>constant-center</value>
<value>linear</value>
</choice>
</attribute>
</optional>
</define>
<define name="data">
<element name="data">
<ref name="attlist.data"/>