Add graph doc and graph dtd
This commit is contained in:
1 parent
2b10d7e061
commit
d16813b15d
2 files changed
+61
No files matched your search
@@ -0,0 +1,47 @@
|
||||
|
||||
== Graph view ==
|
||||
|
||||
The dtd that describe the xml for a graph view is stored in trytond/ir/ui/graph.dtd.
|
||||
|
||||
* XML description:
|
||||
|
||||
- tag "graph":
|
||||
|
||||
- "type": vbar, hbar, line, pie
|
||||
|
||||
- "string": the name of the graph
|
||||
|
||||
- "background": an hexaecimal value for the color of the background
|
||||
|
||||
- "color": the main color
|
||||
|
||||
- "legend": a boolean to specify if the legend must be display
|
||||
|
||||
- tag "x", "y":
|
||||
|
||||
Describe the field that must be used for axis.
|
||||
"x" must contain only one tag "field" and "y" must at least one but may contain many.
|
||||
|
||||
- tag "field":
|
||||
|
||||
- "name": the name of the field on the object to use
|
||||
|
||||
- "string": allow to override the string that comes from the object
|
||||
|
||||
- "key": can be used to distinguish fields with the same name but that are different with domain
|
||||
|
||||
- "domain": a string that is evaluate with the object value as context. If the result is true the field value is added to the graph otherwise not
|
||||
|
||||
- "fill": defined if the graph must be fill
|
||||
|
||||
|
||||
* Example:
|
||||
|
||||
<graph string="Invoice by date" type="vbar">
|
||||
<x>
|
||||
<field name="invoice_date"/>
|
||||
</x>
|
||||
<y>
|
||||
<field name="total_amount"/>
|
||||
</y>
|
||||
</graph>
|
||||
@@ -0,0 +1,14 @@
|
||||
<!ELEMENT graph (x, y)>
|
||||
<!ATTLIST graph type (vbar|hbar|line|pie) "vbar">
|
||||
<!ATTLIST graph string CDATA "Unknown">
|
||||
<!ATTLIST graph background CDATA "#f5f5f5">
|
||||
<!ATTLIST graph color CDATA "blue">
|
||||
<!ATTLIST graph legend (0|1) "1">
|
||||
<!ELEMENT x (field)>
|
||||
<!ELEMENT y (field+)>
|
||||
<!ELEMENT field EMPTY>
|
||||
<!ATTLIST field name CDATA #REQUIRED>
|
||||
<!ATTLIST field string CDATA #IMPLIED>
|
||||
<!ATTLIST field key CDATA #IMPLIED>
|
||||
<!ATTLIST field domain CDATA #IMPLIED>
|
||||
<!ATTLIST field fill (0|1) #IMPLIED>
|
||||
Reference in new issue
Block a user