Format: Covid/Med/Doze: Diferență între versiuni
De la alegeri.md
< Format:Covid | Med
Oleg (Discuție | contribuții) |
Oleg (Discuție | contribuții) |
||
Linia 247: | Linia 247: | ||
} | } | ||
], | ], | ||
+ | // | ||
+ | "signals": [ | ||
+ | { | ||
+ | "name": "tooltip", | ||
+ | "init": {}, | ||
+ | "streams": [ | ||
+ | {"type": "symbol:mouseover", "expr": "datum"}, | ||
+ | {"type": "symbol:mouseout", "expr": "{}"} | ||
+ | ] | ||
+ | } | ||
+ | ], | ||
+ | // | ||
+ | "predicates": [ | ||
+ | { | ||
+ | "name": "tooltip", "type": "==", | ||
+ | "operands": [{"signal": "tooltip._id"}, {"arg": "id"}] | ||
+ | } | ||
+ | ], | ||
// | // | ||
"scales": [ | "scales": [ | ||
Linia 345: | Linia 363: | ||
} | } | ||
}, | }, | ||
+ | { | ||
+ | "type": "text", | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "align": {"value": "right"}, | ||
+ | "fill": {"value": "#333"}, | ||
+ | "fontSize": {"value":12}, | ||
+ | }, | ||
+ | "update": { | ||
+ | "x": {"scale": "x", "signal": "tooltip.mdatatt"}, | ||
+ | "y": {"scale": "y", "signal": "tooltip.dozeadmtt", "offset": -10}, | ||
+ | "text": {"template": "{{tooltip.monthtt}} – {{tooltip.dozeadmtt}}"}, | ||
+ | "fillOpacity": { | ||
+ | "rule": [ | ||
+ | { | ||
+ | "predicate": { | ||
+ | "name": "tooltip", | ||
+ | "id": {"value": null} | ||
+ | }, | ||
+ | "value": 0 | ||
+ | }, | ||
+ | {"value": 1} | ||
+ | ] | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | }, | ||
{ | { | ||
"type":"text", | "type":"text", |