Format: Covid/Med/Echipament/Graf: Diferență între versiuni
De la alegeri.md
< Format:Covid | Med | Echipament
Oleg (Discuție | contribuții) (Pagină nouă: ===1=== <graph> { "version": 2, "width": 910, // "viewport": [945,230], // "padding": 5, // "padding": {"top": 15, "left": 33, "bottom": 25, "right": 1}, "height": 250, "...) |
Oleg (Discuție | contribuții) (→1) |
||
Linia 4: | Linia 4: | ||
{ | { | ||
"version": 2, | "version": 2, | ||
− | "width": | + | "width": 885, |
// "viewport": [945,230], | // "viewport": [945,230], | ||
// "padding": 5, | // "padding": 5, | ||
− | + | "padding": {"top": 25, "left": 43, "bottom": 35, "right": 16}, | |
− | "height": | + | "height": 350, |
− | + | // "padding": "auto", | |
"data": [ | "data": [ | ||
{ | { | ||
"name": "table", | "name": "table", | ||
"values": [ | "values": [ | ||
− | {"year": 2005,"population": 6, "photo" : | + | {"year": 2005,"population": 6, "photo" : 16 }, |
{"year": 2006,"population": 15, "photo" : 17}, | {"year": 2006,"population": 15, "photo" : 17}, | ||
{"year": 2007,"population": 16, "photo" : 21}, | {"year": 2007,"population": 16, "photo" : 21}, | ||
Linia 53: | Linia 53: | ||
"nice": true, | "nice": true, | ||
"domain": {"data": "table","field": "population"} | "domain": {"data": "table","field": "population"} | ||
+ | }, | ||
+ | { | ||
+ | "name": "y", | ||
+ | "type": "linear", | ||
+ | "range": "height", | ||
+ | "nice": true, | ||
+ | "domain": {"data": "table","field": "photo"} | ||
}, | }, | ||
{ | { | ||
Linia 108: | Linia 115: | ||
"y": {"scale": "y","field": "population"}, | "y": {"scale": "y","field": "population"}, | ||
"stroke": {"value": "steelblue"}, | "stroke": {"value": "steelblue"}, | ||
+ | "strokeWidth": {"value": 3}, | ||
+ | "interpolate": {"value": "step-after"} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | "type": "line", | ||
+ | "from": {"data": "table"}, | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "interpolate": {"value": "monotone"}, | ||
+ | "x": {"scale": "x","field": "year"}, | ||
+ | "y": {"scale": "y","field": "photo"}, | ||
+ | "stroke": {"value": "red"}, | ||
"strokeWidth": {"value": 3}, | "strokeWidth": {"value": 3}, | ||
"interpolate": {"value": "step-after"} | "interpolate": {"value": "step-after"} |