Forum Discussion
JST15
Helper I
1 year agoCreating a 3 Axis Line Chart
Hello! In the attached or below, you'll see 3 axis line chart created in excel. It's a line chart using the secondary and then overlapping another line chart on top of that. It works but is a bit slo...
- 1 year ago
Here's something to get you going. Still needs coloring, smoothing etc.
The key is the "resolve" instruction at the bottom.
{ "data": { "name": "dataset" }, "encoding": { "x": { "field": "PERIOD_YEAR", "type": "nominal" } }, "layer": [ { "mark": { "type": "line" }, "encoding": { "y": { "field": "QTY ", "type": "quantitative" } } }, { "mark": { "type": "line" }, "encoding": { "y": { "field": "GM % ", "type": "quantitative" } } }, { "mark": { "type": "line" }, "encoding": { "y": { "field": "GM $/unit ", "type": "quantitative", "axis": {"offset":50} } } } ], "resolve": {"scale": {"y": "independent"}} }
lbendlin
Super User
1 year agoHere's something to get you going. Still needs coloring, smoothing etc.
The key is the "resolve" instruction at the bottom.
{
"data": {
"name": "dataset"
},
"encoding": {
"x": {
"field": "PERIOD_YEAR",
"type": "nominal"
}
},
"layer": [
{
"mark": {
"type": "line"
},
"encoding": {
"y": {
"field": "QTY ",
"type": "quantitative"
}
}
},
{
"mark": {
"type": "line"
},
"encoding": {
"y": {
"field": "GM % ",
"type": "quantitative"
}
}
},
{
"mark": {
"type": "line"
},
"encoding": {
"y": {
"field": "GM $/unit ",
"type": "quantitative",
"axis": {"offset":50}
}
}
}
],
"resolve": {"scale": {"y": "independent"}}
}JST15
Helper I
1 year agoThis is amazing! I've got it working and is great. Thank you for the help and introducing me to Deneb.