Support for strokeWidth scale in legend
See original GitHub issueWhen trying to encode a field as “strokeWidth” in the editor with vega-lite 3.0.0-rc10, the following error is raised: “Error: Missing valid scale for legend.” Setting “strokeWidth” to a constant value does seem to work.
{
"$schema": "https://vega.github.io/schema/vega-lite/v3.json",
"description": "A simple bar chart with embedded data.",
"data": {
"values": [
{"a": "A","b": 28}, {"a": "B","b": 55}, {"a": "C","b": 43}
]
},
"mark": "square",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"},
"strokeWidth": {"field": "b", "type": "quantitative"}
}
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Support legend strokeWidth · Issue #6641 · vega/vega-lite
Stroke width in Vega expects the scale that should be mapped to the legend. The workaround is to use symbolStrokeWidth .
Read more >Add legend for stroke points ggplot2 - Stack Overflow
I want to add a legend for the thickness of stroke in the graph. Do you have any idea how can i do...
Read more >stroke-width - SVG: Scalable Vector Graphics - MDN Web Docs
The stroke-width attribute is a presentation attribute defining the width of the stroke to be applied to the shape.
Read more >Change the Legend Stroke Size - Kendo UI Chart for jQuery
An example on how to change the size of the legend stroke in the Kendo UI Chart.
Read more >How to control line width in legend in QGIS?
First, set the feature symbol to use millimetres, not map units · In the composer, add the legend and item for the corresponding...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think supporting legend for
fill/strokeOpacity
is lower priority than forstrokeWidth
.https://github.com/vega/vega-lite/pull/4454 disables legend for
fill/strokeOpacity
andstrokeWidth
in Vega-Lite. We can enable them again once we support any of these in Vega.