1

I´ve run in the problem in Vega and Vega Lite that I couldn´t generate a signal that needs a field from data.

Example:

    {
      "name": "summeSignal",
      "update": "data('dataset')[0]['row']"
    }

The same happend if I tried to calculate values in marks or signals without using a defined signal.

I tried reducing the datasets, putting the signal block on other positions in the json in the hope that this maybe a parsing problem and I tried to acces data that isn´t ready yet.

That sadly did nothing for me.

EDIT:

I found two workarounds that helped.

  1. adding a value to the dataset provided by powerBi: {"name": "dataset", "values": {"category": "test"}}

But that didn´t allways do the trick.

  1. trigger the update with a timer event: { "name": "signal", "init": "0", "on": [ { "events": [ { "type": "timer", "throttle": 500 } ], "update": "data('dataset')[0]['row']" } ] }

If there is a trigger for a data refresh or change that could be a more elegant solution, but I didn´t found any.

  • Please post a full spec and your desired outcome. – Davide Bacci Mar 23 '23 at 12:23
  • I ran in this problem in several ways. Already talked with Daniel Marsh-Patrick about it. It seems like this is a timing bug in Vega that tries to generate the Signal when the dataset isn't ready. – Fabian Storck Mar 24 '23 at 13:56
  • Sorry, I don't understand. Please post a full spec and your desired outcome so someone can help. – Davide Bacci Mar 24 '23 at 13:56
  • Typing on a smartphone resulted in a premature sending. There seems to be a timing issue that can occure and lead to this problem. It is already a bug on github, that may be passed on to the Vega engine. Daniel Marsh-Patrick wanted to check this. I was hoping, that there is a data refresh event I could trigger in deneb instead of running a timer to fix this problem. – Fabian Storck Mar 24 '23 at 14:03
  • If Daniel is looking at it already, you're in safe hands. I still don't fully understand the issue but will look on GitHub. – Davide Bacci Mar 24 '23 at 14:06
  • I ran in this problem with the solution you provided for making all scales the same. It is not a problem that happens everytime. But it occured on some instances where I wanted to use data from a caluclated dataset in a signal. – Fabian Storck Mar 24 '23 at 15:36
  • I have also encountered this now and raised an issue. – Davide Bacci Mar 29 '23 at 22:08
  • One of the workarounds should help for the moment. – Fabian Storck Mar 31 '23 at 05:34

0 Answers0