@@ -351,38 +351,38 @@ and optionally, how the returned values have to be colored and labeled.
351351
352352Following properties can be configured for each chart ``config ``:
353353
354- +-----------------+ ------------------------------------------------------------------------------------------------------+
355- | **Property ** | **Description ** |
356- +-----------------+ ------------------------------------------------------------------------------------------------------+
357- | ``query_param `` | It is a required property in form of ``dict `` containing following properties: |
358- | | |
359- | | +---------------+---------------------------------------------------------------------------------+ |
360- | | | **Property ** | **Description ** | |
361- | | +---------------+---------------------------------------------------------------------------------+ |
362- | | | ``name `` | (``str ``) Chart title shown in the user interface. | |
363- | | +---------------+---------------------------------------------------------------------------------+ |
364- | | | ``app_label `` | (``str ``) App label of the model that will be used to query the database. | |
365- | | +---------------+---------------------------------------------------------------------------------+ |
366- | | | ``model `` | (``str ``) Name of the model that will be used to query the database. | |
367- | | +---------------+---------------------------------------------------------------------------------+ |
368- | | | ``group_by `` | (``str ``) The property which will be used to group values. | |
369- | | +---------------+---------------------------------------------------------------------------------+ |
370- | | | ``annotate `` | Alternative to ``group_by ``, ``dict `` used for more complex queries. | |
371- | | +---------------+---------------------------------------------------------------------------------+ |
372- | | | ``aggregate `` | Alternative to ``group_by ``, ``dict `` used for more complex queries. | |
373- | | +---------------+---------------------------------------------------------------------------------+ |
374- +-----------------+ ------------------------------------------------------------------------------------------------------+
375- | ``colors `` | An **optional ** ``dict `` which can be used to define colors for each distinct |
376- | | value shown in the pie charts. |
377- +-----------------+ ------------------------------------------------------------------------------------------------------+
378- | ``labels `` | An **optional ** ``dict `` which can be used to define translatable strings for each distinct |
379- | | value shown in the pie charts. Can be used also to provide fallback human readable values for |
380- | | raw values stored in the database which would be otherwise hard to understand for the user. |
381- +-----------------+ ------------------------------------------------------------------------------------------------------+
382- | ``filters `` | An **optional ** ``dict `` which can be used when using ``aggregate `` and ``annotate `` in |
383- | | ``query_params `` to define the link that will be generated to filter results (pie charts are |
384- | | clickable and clicking on a portion of it will show the filtered results). |
385- +-----------------+ ------------------------------------------------------------------------------------------------------+
354+ +------------------+-- ------------------------------------------------------------------------------------------------------+
355+ | **Property ** | **Description ** |
356+ +------------------+-- ------------------------------------------------------------------------------------------------------+
357+ | ``query_params `` | It is a required property in form of ``dict `` containing following properties: |
358+ | | |
359+ | | +-- ---------------+---------------------------------------------------------------------------------+ |
360+ | | | **Property ** | **Description ** | |
361+ | | +-- ---------------+---------------------------------------------------------------------------------+ |
362+ | | | ``name `` | (``str ``) Chart title shown in the user interface. | |
363+ | | +-- ---------------+---------------------------------------------------------------------------------+ |
364+ | | | ``app_label `` | (``str ``) App label of the model that will be used to query the database. | |
365+ | | +-- ---------------+---------------------------------------------------------------------------------+ |
366+ | | | ``model `` | (``str ``) Name of the model that will be used to query the database. | |
367+ | | +-- ---------------+---------------------------------------------------------------------------------+ |
368+ | | | ``group_by `` | (``str ``) The property which will be used to group values. | |
369+ | | +-- ---------------+---------------------------------------------------------------------------------+ |
370+ | | | ``annotate `` | Alternative to ``group_by ``, ``dict `` used for more complex queries. | |
371+ | | +-- ---------------+---------------------------------------------------------------------------------+ |
372+ | | | ``aggregate `` | Alternative to ``group_by ``, ``dict `` used for more complex queries. | |
373+ | | +-- ---------------+---------------------------------------------------------------------------------+ |
374+ +------------------+-- ------------------------------------------------------------------------------------------------------+
375+ | ``colors `` | An **optional ** ``dict `` which can be used to define colors for each distinct |
376+ | | value shown in the pie charts. |
377+ +------------------+-- ------------------------------------------------------------------------------------------------------+
378+ | ``labels `` | An **optional ** ``dict `` which can be used to define translatable strings for each distinct |
379+ | | value shown in the pie charts. Can be used also to provide fallback human readable values for |
380+ | | raw values stored in the database which would be otherwise hard to understand for the user. |
381+ +------------------+-- ------------------------------------------------------------------------------------------------------+
382+ | ``filters `` | An **optional ** ``dict `` which can be used when using ``aggregate `` and ``annotate `` in |
383+ | | ``query_params `` to define the link that will be generated to filter results (pie charts are |
384+ | | clickable and clicking on a portion of it will show the filtered results). |
385+ +------------------+-- ------------------------------------------------------------------------------------------------------+
386386
387387Code example:
388388
0 commit comments