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.

Union explicit array of values and reference to data

See original GitHub issue

Vega scales allow unioning of domains. However, it is not possible to union an explicit data domain and a reference to a data field. As a workaround, I can create a new data source with the values. It would be great if that was not necessary.

I would like to write this:

"domain": {
  "fields": [
    {"data": "source", "field": "foo"},
    [1,2,3,4]
  ]
}

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
jheercommented, Jan 23, 2017

Added in vega/vega-parser@8eef273b165fe32b4d77596c25f6f8d6cac1cc2a. Will be included in vega v3.0.0-beta.16. See below for an example test specification (use the console to inspect the scale state).

0reactions
jheercommented, Apr 18, 2017

No regression here. Just a bug that was there all along 😃

Fixed by vega/vega-parser@40c4aea7e5eb2ca0a3e9d927e0809929564cb267

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unionize Your Variables – An Introduction To Advanced Data ...
Yes, we could use an array, but then we always have to remember which index represents what value, while with a struct ,...
Read more >
Structure and union type definition - IBM
A structure contains an ordered group of data objects. Unlike the elements of an array, the data objects within a structure can have...
Read more >
Derive union type from tuple/array values - Stack Overflow
This type of assertion causes the compiler to infer the narrowest type possible for a value, including making everything readonly . It should ......
Read more >
Union declaration - cppreference.com
A union is a special class type that can hold only one of its non-static data members at a time. ... A union...
Read more >
Handbook - Unions and Intersection Types - TypeScript
A union type describes a value that can be one of several types. We use the vertical bar ( | ) to separate...
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