question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

scale independent conflicts with height

See original GitHub issue

I use altair (see issue) to render a vega_lite Chart with two figures that have independent y-axis and different heights. How ever, the second height does not have an effect. The vega-lite JSON looks like:

{
	"config": {
		"view": {
			"continuousWidth": 400,
			"continuousHeight": 300
		}
	},
	"vconcat": [{
		"layer": [{
			"mark": "line",
			"encoding": {
				"color": {
					"type": "nominal",
					"field": "symbol"
				},
				"y": {
					"type": "quantitative",
					"field": "price"
				}
			},
			"width": 850
		}, {
			"mark": {
				"type": "area",
				"opacity": 0.4
			},
			"encoding": {
				"y": {
					"type": "quantitative",
					"aggregate": "average",
					"field": "price"
				}
			},
			"width": 850
		}],
		"encoding": {
			"x": {
				"type": "temporal",
				"field": "date"
			}
		},
		"height": 260,
		"resolve": {
			"scale": {
				"y": "independent"
			}
		}
	}, {
		"layer": [{
			"mark": "line",
			"encoding": {
				"color": {
					"type": "nominal",
					"field": "symbol"
				},
				"y": {
					"type": "quantitative",
					"field": "price"
				}
			},
			"width": 850
		}, {
			"mark": {
				"type": "area",
				"opacity": 0.4
			},
			"encoding": {
				"y": {
					"type": "quantitative",
					"aggregate": "average",
					"field": "price"
				}
			},
			"width": 850
		}],
		"encoding": {
			"x": {
				"type": "temporal",
				"field": "date"
			}
		},
		"height": 60,
		"resolve": {
			"scale": {
				"y": "independent"
			}
		}
	}],
	"data": {
		"url": "https://vega.github.io/vega-datasets/data/stocks.csv"
	},
	"$schema": "https://vega.github.io/schema/vega-lite/v4.8.1.json"
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
domoritzcommented, Dec 2, 2020
0reactions
domoritzcommented, Dec 2, 2020

Somehow there is only a single height property. That is definitely wrong.

Screen Shot 2020-12-02 at 14 44 24

I have a fix that I will push in a second.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scaling of adult body weight to height across sex and race ...
Objectives: The objectives were to test the hypothesis that adult BW scales to height with a power of 2 independent of sex and...
Read more >
How to handle both width and height without conflict?
I woud like that if my viewport width is smaller than 330px, the paragraphs font will be 9px, whatever its height. In the...
Read more >
scale - CSS-Tricks
The scale property in CSS resizes an element's width and height in proportion. So, if we have an element that's 100 pixels square,...
Read more >
The association between weight, height, and head ... - Nature
Correia and coworkers (2) found birth weight and birth head size to be associated with head size and cognitive abilities in childhood and...
Read more >
Manipulating Axes Aspect Ratio - MATLAB & Simulink
Provide the highest resolution in the available space by setting the scale of each axis independently (when DataAspectRatioMode and the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found