Chart | Multiple lines
- Dominant language
- Handlebars
- Stars
- 265
- Forks
- 236
- PR merge metrics
- No merged PRs in 30d
Description
close, but needs more work

``` json
{
"width": 700,
"height": 400,
"data": [
{
"name": "cars",
"url": "http://opendata.arcgis.com/datasets/3979e158e3b941dbaac1227c4f0a200d_0/FeatureServer/0/query?where=1=1&outFields=*",
"format": {
"property": "features"
}
},
{
"name": "fields",
"values": ["Q1 Actual", "Q2 Actual", "Q3 Actual", "Q4 Actual"]
}
],
"scales": [
{
"name": "ord",
"type": "ordinal",
"range": "width", "points": true,
"domain": {"data": "fields", "field": "data"}
},
{
"name": "Q1 Actual",
"range": "height", "zero": false, "nice": true,
"domain": {"data": "cars", "field": "data.attributes['Q1 Actual']"}
},
{
"name": "Q2 Actual",
"range": "height", "zero": false, "nice": true,
"domain": {"data": "cars", "field": "data.attributes['Q2 Actual']"}
},
{
"name": "Q3 Actual",
"range": "height", "zero": false, "nice": true,
"domain": {"data": "cars", "field": "data.attributes['Q3 Actual']"}
},
{
"name": "Q4 Actual",
"range": "height", "zero": false, "nice": true,
"domain": {"data": "cars", "field": "data.attributes['Q4 Actual']"}
}
],
"axes": [
{"type":"y", "scale":"Q1 Actual", "offset":{"scale":"ord", "value":"Q1 Actual"}},
{"type":"y", "scale":"Q2 Actual", "offset":{"scale":"ord", "value":"Q2 Actual"}},
{"type":"y", "scale":"Q3 Actual", "offset":{"scale":"ord", "value":"Q3 Actual"}},
{"type":"y", "scale":"Q4 Actual", "offset":{"scale":"ord", "value":"Q4 Actual"}}
],
"marks": [
{
"type": "group",
"from": {"data": "cars"},
"marks": [
{
"type": "line",
"from": {"data": "fields"},
"properties": {
"enter": {
"x": {"scale": "ord", "field": "data"},
"y": {"scale": {"field": "data"}, "group": "data.attributes", "field": "data"},
"stroke": {"value": "steelblue"},
"strokeWidth": {"value": 1},
"strokeOpacity": {"value": 0.3}
}
}
}
]
},
{
"type": "text",
"from": {"data": "fields"},
"properties": {
"enter": {
"x": {"scale": "ord", "field": "data", "offset":-8},
"y": {"group": "height", "offset": 6},
"fontWeight": {"value": "bold"},
"fill": {"value": "black"},
"text": {"field": "data"},
"align": {"value": "right"},
"baseline": {"value": "top"}
}
}
}
]
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.