Plr : Différence entre versions
| Ligne 1 : | Ligne 1 : | ||
| + | |||
{{#tag:graph| | {{#tag:graph| | ||
{ | { | ||
| Ligne 31 : | Ligne 32 : | ||
} | } | ||
], | ], | ||
| + | |||
| + | "signals": [ | ||
| + | { | ||
| + | "name": "tooltip", | ||
| + | "init": {}, | ||
| + | "streams": [ | ||
| + | {"type": "rect:mouseover", "expr": "datum"}, | ||
| + | {"type": "rect:mouseout", "expr": "{}"} | ||
| + | ] | ||
| + | } | ||
| + | ], | ||
| + | |||
| + | "predicates": [ | ||
| + | { | ||
| + | "name": "tooltip", "type": "==", | ||
| + | "operands": [{"signal": "tooltip._id"}, {"arg": "id"}] | ||
| + | } | ||
| + | ], | ||
| + | |||
| + | "scales": [ | ||
| + | { "name": "xscale", "type": "ordinal", "range": "width", | ||
| + | "domain": {"data": "table", "field": "date"} }, | ||
| + | { "name": "yscale", "type": "linear", "range": "height", "nice": true, | ||
| + | "domain": {"data": "table", "field": "amount"} } | ||
| + | ], | ||
| + | |||
| + | "axes": [ | ||
| + | { "type": "x", "scale": "xscale" }, | ||
| + | { "type": "y", "scale": "yscale" } | ||
| + | ], | ||
| + | |||
| + | "marks": [ | ||
| + | { | ||
| + | "type": "rect", | ||
| + | "from": {"data":"table"}, | ||
| + | "properties": { | ||
| + | "enter": { | ||
| + | "x": {"scale": "xscale", "field": "date"}, | ||
| + | "width": {"scale": "xscale", "band": true, "offset": -1}, | ||
| + | "y": {"scale": "yscale", "field": "amount"}, | ||
| + | "y2": {"field": {"group": "height"} } | ||
| + | }, | ||
| + | "update": { "fill": {"value": "steelblue"} }, | ||
| + | "hover": { "fill": {"value": "red"} } | ||
| + | } | ||
| + | }, | ||
| + | { | ||
| + | "type": "text", | ||
| + | "properties": { | ||
| + | "enter": { | ||
| + | "align": {"value": "center"}, | ||
| + | "fill": {"value": "#333"} | ||
| + | }, | ||
| + | "update": { | ||
| + | "x": {"scale": "xscale", "signal": "tooltip.date"}, | ||
| + | "dx": {"scale": "xscale", "band": true, "mult": 0.5}, | ||
| + | "y": {"scale": "yscale", "signal": "tooltip.amount", "offset": -5}, | ||
| + | "text": {"signal": "tooltip.amount"}, | ||
| + | "fillOpacity": { | ||
| + | "rule": [ | ||
| + | { | ||
| + | "predicate": {"name": "tooltip", "id": {"value": null} }, | ||
| + | "value": 0 | ||
| + | }, | ||
| + | {"value": 1} | ||
| + | ] | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | ] | ||
} | } | ||
| mode=interactive }} | | mode=interactive }} | ||
Version du 6 février 2019 à 08:54
Creation de PLR
| Phrase | action | emotion |
|---|---|---|
| Bon délire | dab dab | content |
| DANH ! | droite | pas content |
| nice nice | y sourit | très content |