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.

Legend shapes disappear with transparent fill

See original GitHub issue

See https://github.com/vega/vega-lite/issues/2719.

{
  "$schema": "https://vega.github.io/schema/vega/v3.0.json",
  "data": [
    {
      "name": "source_0",
      "url": "data/cars.json",
      "format": {
        "type": "json",
        "parse": {
          "Horsepower": "number",
          "Miles_per_Gallon": "number"
        }
      }
    }
  ],
  "scales": [
    {
      "name": "shape",
      "type": "ordinal",
      "domain": {"data": "source_0","field": "Cylinders","sort": true},
      "range": "symbol"
    }
  ],
  "legends": [
    {
      "shape": "shape",
      "title": "Cylinders"
    },
    {
      "shape": "shape",
      "title": "Cylinders",
      "encode": {
        "symbols": {"update": {"fill": {"value": "transparent"}}}
      }
    }
  ]
}

image

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
jheercommented, Jul 30, 2017

@kanitw is right. I think we need to revert vega/vega-parser#46 and only suppress the default stroke when the fill color is bound to a scale at the top-level of the legend ({"fill": "fillScale", ...}. We currently suppress the default stroke when a custom fill encoding is applied as well, but this issue clearly shows that this was a poor choice…

0reactions
jowenscommented, Aug 4, 2017

I confirm 3.0.0-rc5 fixes this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fill and Color Legend Disappear while Adding Layers
Shape 21 has fill instead of color. However, I want to keep everything else the same. To save typing, I first remove the...
Read more >
Working with legends—Help | ArcGIS for Desktop
Right-click the data frame in the table of contents and click Properties. Click the General tab. Check the Simulate layer transparency in legends...
Read more >
Apply transparency to a shape - Microsoft Support
Select the shape or shapes that you want to make transparent. Right-click, and on the context menu, select Format Shape. In the Format...
Read more >
Change object transparency in Pages on Mac - Apple Support
In Pages on your Mac, change the transparency of an image, shape, line, arrow, or video by making it more or less opaque....
Read more >
Origin Help - Graph Legends - OriginLab
Click to select the legend then press the Delete key, or right-click and choose Delete from the shortcut menu. To show or hide...
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