« Test » : différence entre les versions
De 21Wiki
Aucun résumé des modifications Balise : Éditeur de wikicode 2017 |
Aucun résumé des modifications Balise : Éditeur de wikicode 2017 |
||
Ligne 6 : | Ligne 6 : | ||
{ | { | ||
"name": "membres", | "name": "membres", | ||
"format": { | |||
"type": "json", | |||
"parse": { | |||
"membre_start": "date:\"%Y-%m-%d\"", | |||
"membre_end": "date:\"%Y-%m-%d\"" | |||
} | |||
}, | |||
"values": [ | |||
{ | |||
"label": "miguel", | |||
"nom": "Miguel Rodriguez", | |||
"membre_start": "2021-05-11", | |||
"membre_end": "2021-10-30" | |||
}, | |||
{ | |||
"label": "haylie", | |||
"nom": "Haylie James", | |||
"membre_start": "2021-05-11", | |||
"membre_end": "2021-06-08" | |||
}, | |||
{ | |||
"label": "pablo", | |||
"nom": "Pablo Luján Arteaga", | |||
"membre_start": "2021-05-11", | |||
"membre_end": "2021-10-30" | |||
} | |||
] | |||
}, | |||
{ | |||
"name": "seconds", | |||
"format": { | |||
"type": "json", | |||
"parse": { | |||
"second_start": "date:\"%Y-%m-%d\"", | |||
"second_end": "date:\"%Y-%m-%d\"" | |||
} | |||
}, | |||
"values": [ | |||
{ | |||
"label": "haylie", | |||
"second_start": "2021-05-11", | |||
"second_end": "2021-06-08" | |||
}, | |||
{ | |||
"label": "pablo", | |||
"second_start": "2021-06-08", | |||
"second_end": "2021-10-30" | |||
} | |||
] | |||
}, | |||
{ | |||
"name": "chefs", | |||
"format": { | "format": { | ||
"type": "json", | "type": "json", | ||
Ligne 16 : | Ligne 68 : | ||
{ | { | ||
"label": "miguel", | "label": "miguel", | ||
"chef_start": "2021-05-11", | "chef_start": "2021-05-11", | ||
"chef_end": "2021-10-30" | "chef_end": "2021-10-30" | ||
Ligne 28 : | Ligne 79 : | ||
"type": "ordinal", | "type": "ordinal", | ||
"range": "height", | "range": "height", | ||
"domain": { | "domain": {"data": "membres","field": "label"} | ||
}, | }, | ||
{ | { | ||
Ligne 41 : | Ligne 89 : | ||
"domain": { | "domain": { | ||
"data": "membres", | "data": "membres", | ||
"field": [ | "field": ["membre_start","membre_end"] | ||
} | } | ||
} | } | ||
], | ], | ||
"axes": [ | "axes": [{"type": "x","scale": "x"}], | ||
"marks": [ | |||
{ | |||
"type": "rect", | |||
"from": {"data": "chefs"}, | |||
"properties": { | |||
"enter": { | |||
"x": {"scale": "x","field": "chef_start"}, | |||
"x2": {"scale": "x","field": "chef_end"}, | |||
"y": {"scale": "y","field": "label", "offset":-2}, | |||
"height": {"value": 6}, | |||
"fill": {"value": "#333"} | |||
} | |||
} | |||
}, | |||
{ | { | ||
"type": " | "type": "rect", | ||
"scale": "x" | "from": {"data": "seconds"}, | ||
"properties": { | |||
"enter": { | |||
"x": {"scale": "x","field": "second_start"}, | |||
"x2": {"scale": "x","field": "second_end"}, | |||
"y": {"scale": "y","field": "label", "offset":-2}, | |||
"height": {"value": 6}, | |||
"fill": {"value": "#666"} | |||
} | |||
} | |||
}, | |||
{ | { | ||
"type": "rect", | "type": "rect", | ||
"from": { | "from": {"data": "membres"}, | ||
"properties": { | "properties": { | ||
"enter": { | "enter": { | ||
"x": { | "x": {"scale": "x","field": "membre_start"}, | ||
"x2": {"scale": "x","field": "membre_end"}, | |||
"y": {"scale": "y","field": "label"}, | |||
"height": {"value": 2}, | |||
"x2": { | "fill": {"value": "#888"} | ||
"y": { | |||
"height": { | |||
"fill": { | |||
} | } | ||
} | } | ||
Ligne 85 : | Ligne 136 : | ||
{ | { | ||
"type": "text", | "type": "text", | ||
"from": { | "from": {"data": "membres"}, | ||
"properties": { | "properties": { | ||
"enter": { | "enter": { | ||
"x": { | "x": {"scale": "x","field": "membre_start"}, | ||
"y": {"scale": "y","field": "label","offset": -4}, | |||
"fill": {"value": "#000"}, | |||
"text": {"field": "nom"}, | |||
"y": { | "font": {"value": "Helvetica Neue"}, | ||
"fontSize": {"value": 10} | |||
"fill": { | |||
"text": { | |||
"font": { | |||
"fontSize": { | |||
} | } | ||
} | } |