Feature #3137
Mis à jour par Sebastien Jacquot il y a environ 4 ans
SJ: WIP issue.
Improve AFCWithStyles/CAStyle macro for styling CA chart entities according to an ODS parameters file.
Doc and Specs: https://groupes.renater.fr/wiki/txm-info/public/specs_afc#stylage_des_points
Src local Location: /src/groovy/org/txm/macro/prototypes/stats/AFCWithStylesMacro.groovy
SVN Location: https://forge.cbp.ens-lyon.fr/redmine/projects/txm/repository/changes/tmp/org.txm.groovy.core/src/groovy/org/txm/macro/prototypes/stats/CAStyleMacro.groovy
h3. Current state (2021-07-20)
Notes:
The macro has been updated to work with the jfreechart lib update done in TXM 0.8.0.
Some styling parameters have been added.
The macro has been renamed from "AFCWithStyles" to "CAStyle".
The selections and replacements are sequential. A replacement parameter defined in a previous table row is overridden.
h3. Filtering/selection by label
*label-pattern*
REGEX pattern to apply the styling
h3. Filtering/selection threshold
// WIP
Need to report here the mails discussion.
Need to discuss about:
- simple combined selection or not (eg. label-pattern + one value, eg. q12)
- advanced combined selection or not (eg. label-pattern + one value, eg. q12 and some other eg. mass)
=> combining additional thresholds may be done with multiple ODS table rows
- selection by range
- selection by
h3. Styling
The next properties can be applied to the entities that are selected by the label-pattern or by thresholds.
*label-replacement*
Replaces the matched label-pattern by the specified text.
*hidden*
If "t" or "T", the label will be hidden in "shapes + labels" visualization mode.
It only affects the label, not the shape.
*label-font-family*
Replaces the default font by the specified font family.
// TODO: need to check what happens if the font family doesn't exist.
*label-size*
Applies a scaling transformation to the default font size : eg. "2 = 2 * original size" or "0.5 = half of the original size".
*label-color*
Replaces the default label color by the specified one in RGB or RGBA format from 0 to 255 for each channel, eg. "255 0 0 = red", "255 0 0 128 = red with mid-opacity".
*label-style*
Replaces the font style by the specified ones : "1 = bold", "2 = italic", "3 = bold + italic".
Some fonts may not implement all three styles.
// TODO: add a warning if a font doesn't implement the selected style.
*shape-size*
Applies a scaling transformation to the default shapes dimensions : eg. "3.5 = 3.5 * original dimensions" or "0.5 = half of the original dimensions"
Note, SJ: need to check the unit of the default dimensions to be more precise in the doc.
*shape-color*
Replaces the default shape color by the specified one in RGB or RGBA format from 0 to 255 for each channel, eg. "255 0 0 = red", "255 0 0 128 = red with mid-opacity".
*shape-replacement*
Replaces the default shape by the specified one from the following list: diamond, disk, square, triangle.
h3. Improvments
*label-color/shape-color*
FR NOTE:
suggestion d'amélioration, combiner 2 encodages :
- si la valeur commence par '#' utiliser l'encodage hexa de la couleur (équivalent de l'actuel mais en hexa : #FF0000)
- sinon la valeur est un entier qui indexe une des couleurs de la palette à 16 couleurs de TXM définie ici https://groupes.renater.fr/wiki/txm-info/public/specs_graphics_colors
*label-size*
FR NOTE:
ce serait pas mieux d'utiliser les tailles xx-small, x-small, small, medium, large, x-large, xx-large de CSS ou des 'mm' ? (la taille du point étant une notion papier)
FR NOTE, SJ:
préférence pour un scalaire, qui permet d'être plus précis, ex. doubler des dimensions ou encore s'ajuster sur une valeur de seuil
*shape-size*
FR NOTE:
homogénéiser avec les valeurs de label-size ? (xx-small, x-small, small, medium...)
FR NOTE, SJ:
préférence pour un scalaire, qui permet d'être plus précis, ex. doubler des dimensions ou encore s'ajuster sur une valeur de seuil
*shape-replacement*
Could add some other shapes.
h3. Current state bugs
- Using shape-size breaks the selection and rollover bounding box
- Using label-replacement breaks the selection and rollover bounding box
- Using shape-replacement breaks the selection and rollover bounding box
h3. TODO
//TODO: Update the TXM users doc.
Improve AFCWithStyles/CAStyle macro for styling CA chart entities according to an ODS parameters file.
Doc and Specs: https://groupes.renater.fr/wiki/txm-info/public/specs_afc#stylage_des_points
Src local Location: /src/groovy/org/txm/macro/prototypes/stats/AFCWithStylesMacro.groovy
SVN Location: https://forge.cbp.ens-lyon.fr/redmine/projects/txm/repository/changes/tmp/org.txm.groovy.core/src/groovy/org/txm/macro/prototypes/stats/CAStyleMacro.groovy
h3. Current state (2021-07-20)
Notes:
The macro has been updated to work with the jfreechart lib update done in TXM 0.8.0.
Some styling parameters have been added.
The macro has been renamed from "AFCWithStyles" to "CAStyle".
The selections and replacements are sequential. A replacement parameter defined in a previous table row is overridden.
h3. Filtering/selection by label
*label-pattern*
REGEX pattern to apply the styling
h3. Filtering/selection threshold
// WIP
Need to report here the mails discussion.
Need to discuss about:
- simple combined selection or not (eg. label-pattern + one value, eg. q12)
- advanced combined selection or not (eg. label-pattern + one value, eg. q12 and some other eg. mass)
=> combining additional thresholds may be done with multiple ODS table rows
- selection by range
- selection by
h3. Styling
The next properties can be applied to the entities that are selected by the label-pattern or by thresholds.
*label-replacement*
Replaces the matched label-pattern by the specified text.
*hidden*
If "t" or "T", the label will be hidden in "shapes + labels" visualization mode.
It only affects the label, not the shape.
*label-font-family*
Replaces the default font by the specified font family.
// TODO: need to check what happens if the font family doesn't exist.
*label-size*
Applies a scaling transformation to the default font size : eg. "2 = 2 * original size" or "0.5 = half of the original size".
*label-color*
Replaces the default label color by the specified one in RGB or RGBA format from 0 to 255 for each channel, eg. "255 0 0 = red", "255 0 0 128 = red with mid-opacity".
*label-style*
Replaces the font style by the specified ones : "1 = bold", "2 = italic", "3 = bold + italic".
Some fonts may not implement all three styles.
// TODO: add a warning if a font doesn't implement the selected style.
*shape-size*
Applies a scaling transformation to the default shapes dimensions : eg. "3.5 = 3.5 * original dimensions" or "0.5 = half of the original dimensions"
Note, SJ: need to check the unit of the default dimensions to be more precise in the doc.
*shape-color*
Replaces the default shape color by the specified one in RGB or RGBA format from 0 to 255 for each channel, eg. "255 0 0 = red", "255 0 0 128 = red with mid-opacity".
*shape-replacement*
Replaces the default shape by the specified one from the following list: diamond, disk, square, triangle.
h3. Improvments
*label-color/shape-color*
FR NOTE:
suggestion d'amélioration, combiner 2 encodages :
- si la valeur commence par '#' utiliser l'encodage hexa de la couleur (équivalent de l'actuel mais en hexa : #FF0000)
- sinon la valeur est un entier qui indexe une des couleurs de la palette à 16 couleurs de TXM définie ici https://groupes.renater.fr/wiki/txm-info/public/specs_graphics_colors
*label-size*
FR NOTE:
ce serait pas mieux d'utiliser les tailles xx-small, x-small, small, medium, large, x-large, xx-large de CSS ou des 'mm' ? (la taille du point étant une notion papier)
FR NOTE, SJ:
préférence pour un scalaire, qui permet d'être plus précis, ex. doubler des dimensions ou encore s'ajuster sur une valeur de seuil
*shape-size*
FR NOTE:
homogénéiser avec les valeurs de label-size ? (xx-small, x-small, small, medium...)
FR NOTE, SJ:
préférence pour un scalaire, qui permet d'être plus précis, ex. doubler des dimensions ou encore s'ajuster sur une valeur de seuil
*shape-replacement*
Could add some other shapes.
h3. Current state bugs
- Using shape-size breaks the selection and rollover bounding box
- Using label-replacement breaks the selection and rollover bounding box
- Using shape-replacement breaks the selection and rollover bounding box
h3. TODO
//TODO: Update the TXM users doc.