Commit 16b64c87 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update the documentation.

parent f7c123ad
......@@ -5,17 +5,17 @@
Appendix C: Column configuration
===================================
Lists and 1-dim Metrics display a collection of columns.
Lists display a set of columns.
The configuration properties of the columns are those of the
``Ext.grid.column.Column`` class. More information can be found in the ExtJS_
documentation.
The column is by default configured to render string. It is possible to handle
``boolean``, ``date`` and ``number`` values by changing the ``xtype`` property.
The mapping between the database field and the column types is the following:
The mapping between the type of the field and the column one is the following:
================ =================
Database ``xtype``
Field ``xtype``
================ =================
boolean ``booleancolumn``
date / datetime ``datecolumn``
......@@ -23,32 +23,8 @@ The mapping between the database field and the column types is the following:
string (default) ``gridcolumn``
================ =================
A column contains the value of the given database field. In that first case,
the mandatory properties depend on the report and are the following:
=============== ===============
List Metric1D
=============== ===============
-- ``aggregate``
``dbfield`` ``dbfield``
``text`` ``text``
``xtype`` ``xtype``
=============== ===============
A column can also contains computed values obtained by applying a mathematical
expression on the cells of the other columns. In that second case, the mandatory
property are the following and do not depend on the report:
.. list-table::
* - **Computed column**
* - ``dataIndex``
* - ``eval``
* - ``text``
* - ``xtype``
The most important properties are defined in the next sections as a function of
the column type.
The most important configuration properties are defined in the next sections
as a function of the column type.
All columns
-----------
......@@ -62,45 +38,11 @@ All columns
The first syntax is the preferred one when running with ``ExtJS 6``.
``dataIndex``
the index of the column used by the ``DataFrame``, the ``Ext.data.store``
and the ``Ext.grid.Panel``. By default, this internal parameter is derived
from the ``dbfield`` property. However, when using the ``eval`` property,
it could be useful to index the column with short name like *a*, *b*, ...
``dbfield``
the address of the database field encoded as ``"tablename.fieldname"`` or
``"tablename.fieldname.keyname"``.
.. warning::
Do not use with the ``eval`` property.
``eval``
the string defining the mathematical operation applied between column cells,
*e.g* ``(a+b*2)/c`` where *a*, *b* and *c* are column indexes.
.. warning::
Do not use the ``dbfield`` and ``aggregate`` properties.
the index of the field defined in the source.
``hidden``
the column is hidden when it is ``true``.
``renderer``
A string pointing to the javascript function rendering the value or
containing the function itself. The possible value is ``reprDuration`` or
``(function(value) {Ext.util.Format.number(value, '0.0')})``. In the last
syntax, the parenthesis at the beginning and at the end are mandatory.
``summaryRenderer``
A string containing the function to render the summary value, *e.g*
``(function(value) {Ext.util.Format.number(value, '0.0')})``. The
parenthesis at the beginning and at the end are mandatory.
See the documentation for more complex strategy.
``summaryType``
Summary are computed over the column values.
Possible functions are ``"count"``, ``"sum"``, ``"min"``, ``"max"`` and
``"average"``.
``text``
the string containing the label of the column.
......@@ -126,15 +68,20 @@ Date column
Number column
-------------
``aggregate``
the aggregation function uses by the 1-dim metric.
Many functions are available: ``count``, ``max``, ``mean``,
``median``, ``min``, ``size``, ``std``, ``sum``, *etc*. In fact, all the
descriptive stats methods of the DataFrame_ class.
``format``
the format string, *e.g.* ``"0,000.00"``.
``formatter``
the function to format the column, *e.g.* "round(2)"
``summaryFormatter``
the function to format the summary of the column, *e.g.* "round(2)"
``summaryType``
Summary are computed over the column values.
Possible functions are ``"count"``, ``"sum"``, ``"min"``, ``"max"`` and
``"average"``.
Row numbered column
-------------------
......
......@@ -46,6 +46,8 @@ History
- integer
* - ``history.id_events``
- integer
* - ``history.id_domains``
- integer
* - ``history.id_teams``
- integer
* - ``history.id_projects``
......@@ -153,8 +155,6 @@ Projects
- integer
* - ``projects.project``
- string
* - ``projects.agencies``
- string
Teams
......@@ -168,5 +168,3 @@ Teams
- integer
* - ``teams.team``
- string
* - ``teams.domain``
- string
......@@ -5,102 +5,50 @@
Appendix D: Graph configuration
===================================
The graph configuration is a JSON_-type object. Its properties are mainly the
The graph configuration is a JSON_-type object. Its properties are the
keywords arguments of the DataFrame.plot_ method.
The basic keywords
------------------
``kind``
select the graph type. The parameters the underlying matplotlib functions
can be used, but not detailed here:
kind
----
select the graph type:
.. list-table::
* - ``line``
- line plot
-
* - ``bar``
- vertical bar plot
- `pyplot.bar`_
* - ``barh``
- horizontal bar plot
- `pyplot.barh`_
* - ``hist``
- histogram
- `pyplot.hist`_
* - ``box``
- box plot
- `pyplot.box`_
* - ``kde``
- density estimation plot
-
* - ``area``
- area plot
-
* - ``pie``
- pie plot
- `pyplot.pie`_
* - ``scatter``
- scatter plot
- `pyplot.scatter`_
* - ``hexbin``
- hexbin plot
- `pyplot.hexbin`_
``stacked``
histograms or bar chart are stacked when it is ``true``.
.. note::
The graph is not plotted when this parameter is empty
``logx``, ``logy``, ``loglog``, ``xlim`` and ``ylim``
fine tuning of the scale and axis boundaries.
stacked
-------
area, line or bar chart are stacked when it is ``true``.
``grid`` or ``legend``
deactivate grid (legend) when it is ``false``.
logx, logy and loglog
---------------------
activated the log scale when it is ``true``.
``colormap``
set the matplotlib.colormap_ identify by its name.
ylim
----
defined the minimum and the maximum value along the *y*-axis.
``xerr`` and ``yerr``
set errors bars.
grid
----
activated the grid when it is ``true``.
``index``, ``x`` and ``y``
The mapping between the columns of the report and the graph is implicit when
all columns of the DataFrame are used. However, it can be reduced to a set
of columns depending on the graph type:
legend
------
activated the legend.
Possible values are ``false``, ``true`` or ``reverse``.
.. list-table::
:widths: 20 30
* - ``index``
- ``bar``, ``barh``, ``hist``
* - ``x`` and ``y``
- ``line plot``, ``scatter plot``, ``hexbin``
``xlabel``, ``ylabel``
set the label along the *x* and *y*-axis respectively
``tranpose``
boolean value to exchange *index* and *column* using the method
``DataFrame.T``.
Column addressing
-----------------
The report is a series of values organized
in columns. In order to:
* histogram the value of one column, use::
index = column label or position
* plot the values of one column against the values of the other one
(line plot, scatter plot, hexbin plot), use::
x = column label or position
y = column label or position
* a stacked histogram/bar with the reduced set of columns, use the list::
index = [column labels, or positions]
colormap
--------
chose a color map among the proposed ones.
.. include:: hyperlinks.txt
.. _Appendix B:
Appendix B: Sources
===================
.. _source-items:
Source items
------------
Contains items belonging to the selected event. All information
is available:
* meta-data:
.. list-table::
* - ``id_domains``
- int
* - ``id_events``
- int
* - ``id_fundings``
- int
* - ``id_objects``
- int
* - ``id_object_categories``
- int
* - ``id_people``
- int
* - ``id_people_categories``
- int
* - ``id_projects``
- int
* - ``id_teams``
- int
* Database fields from tables:
.. list-table::
* - ``domains``
- (``domain``)
* - ``fundings``
- (``agency``)
* - ``objects``
- (``reference``, ``serial_number``, ``batch_number``)
* - ``object_categories``
- (``code``, ``category``)
* - ``people``
- (``first_name``, ``last_name``, ``initials``, ``birth_date``)
* - ``people_categories``
- (``code``, ``category``)
* - ``projects``
- (``project``)
* - ``teams``
- (``team``)
* One field for each property of the user data block associated to the
selected event. The name of the field is the one of the property.
* Date for the event:
.. list-table::
* - ``start_date``
- date
* - ``end_date``
- date
.. _source-items-year:
Source items per year
---------------------
Contains active items belonging to the selected event on a year basis.
Therefore, an item appears several time when it is active during
several years. All information is available:
* meta-data:
.. list-table::
* - ``id_domains``
- int
* - ``id_events``
- int
* - ``id_fundings``
- int
* - ``id_objects``
- int
* - ``id_object_categories``
- int
* - ``id_people``
- int
* - ``id_people_categories``
- int
* - ``id_projects``
- int
* - ``id_teams``
- int
* Database fields from tables:
.. list-table::
* - ``domains``
- (``domain``)
* - ``fundings``
- (``agency``)
* - ``objects``
- (``reference``, ``serial_number``, ``batch_number``)
* - ``object_categories``
- (``code``, ``category``)
* - ``people``
- (``first_name``, ``last_name``, ``initials``, ``birth_date``)
* - ``people_categories``
- (``code``, ``category``)
* - ``projects``
- (``project``)
* - ``teams``
- (``team``)
* One field for each property of the user data block associated to the
selected event. The name of the field is the one of the property.
* Date for the event:
.. list-table::
* - ``start_date``
- date
* - ``end_date``
- date
* - ``year``
- int
.. _source-items-small:
Source items small
------------------
Contains items belonging to the selected event.
The minimal set of information is available namely those of the *user
data block*:
* meta-data:
.. list-table::
* - ``id_domains``
- int
* - ``id_events``
- int
* - ``id_fundings``
- int
* - ``id_objects``
- int
* - ``id_object_categories``
- int
* - ``id_people``
- int
* - ``id_people_categories``
- int
* - ``id_projects``
- int
* - ``id_teams``
- int
* One field for each property of the user data block associated to the
selected event. The name of the field is the one of the property.
* Date for the event:
.. list-table::
* - ``start_date``
- date
* - ``end_date``
- date
.. _source-items-small-year:
Source items small per year
---------------------------
Contains active items belonging to the selected event on a year basis.
Therefore, an item appears several time when it is active during
several years. The minimal set of information is available namely those of
the *user data block*:
* meta-data:
.. list-table::
* - ``id_domains``
- int
* - ``id_events``
- int
* - ``id_fundings``
- int
* - ``id_objects``
- int
* - ``id_object_categories``
- int
* - ``id_people``
- int
* - ``id_people_categories``
- int
* - ``id_projects``
- int
* - ``id_teams``
- int
* One field for each property of the user data block associated to the
selected event. The name of the field is the one of the property.
* Date for the event:
.. list-table::
* - ``start_date``
- date
* - ``end_date``
- date
* - ``year``
- int
.. _source-object:
Source object like
------------------
Contains items belonging to the selected event.
The information is focused on the object:
* meta-data:
.. list-table::
* - ``id_domains``
- int
* - ``id_events``
- int
* - ``id_fundings``
- int
* - ``id_objects``
- int
* - ``id_object_categories``
- int
* - ``id_people``
- int
* - ``id_people_categories``
- int
* - ``id_projects``
- int
* - ``id_teams``
- int
* Database fields from tables:
.. list-table::
* - ``domains``
- (``domain``)
* - ``fundings``
- (``agency``)
* - ``objects``
- (``reference``, ``serial_number``, ``batch_number``)
* - ``object_categories``
- (``code``, ``category``)
* - ``projects``
- (``project``)
* - ``teams``
- (``team``)
* One field for each property of the user data block associated to the
selected event. The name of the field is the one of the property.
* Date for the event:
.. list-table::
* - ``start_date``
- date
* - ``end_date``
- date
.. _source-object-year:
Source object like per year
---------------------------
Contains active items belonging to the selected event on a year basis.
Therefore, an item appears several time when it is active during
several years. The information is focused on the object:
* meta-data:
.. list-table::
* - ``id_domains``
- int
* - ``id_events``
- int
* - ``id_fundings``
- int
* - ``id_objects``
- int
* - ``id_object_categories``
- int
* - ``id_people``
- int
* - ``id_people_categories``
- int
* - ``id_projects``
- int
* - ``id_teams``
- int
* Database fields from tables:
.. list-table::
* - ``domains``
- (``domain``)
* - ``fundings``
- (``agency``)
* - ``objects``
- (``reference``, ``serial_number``, ``batch_number``)
* - ``object_categories``
- (``code``, ``category``)
* - ``projects``
- (``project``)
* - ``teams``
- (``team``)
* One field for each property of the user data block associated to the
selected event. The name of the field is the one of the property.
* Date for the event:
.. list-table::
* - ``start_date``
- date
* - ``end_date``
- date
* - ``year``
- int
.. _source-people:
Source people like
------------------
Contains items belonging to the selected event.
The information is focused on the people:
* meta-data:
.. list-table::
* - ``id_domains``