Deneb - pan and zoom layer with 2 chart

Hi Everyone

Thank you for your support with Deneb, I have an issue and is related when I have a layer with 2 chart, example (Scatterplot and Text) (Chart1) and I want to include Pan And Zoom, when I included the code Pan and Zoom generated the error “Duplicate signal name”, I included hconcat or vconcat and the charts run well with zoom (Chart2).

I need chart 1 with Pan and Zoom.

I tried to include the code (“resolve”: {“scale”: {“x”: “shared”}), but not solved the issue.

Attached please find an example in PBIX

Thanks a lot if helping me in fixed this issue

Fredy N
Deneb Example Zoom Chart _ FN.pbix (1.3 MB)

Hi @dyfre12,

When Vega-Lite gets converted to Vega prior to running, params are converted to signals for any dependent layers. This means that if you declare them at the top level of the spec, they get propagated to both layers and this creates the duplicate signal error you’re seeing.

With layered specifications, you need to declare the params in one suitable layer lower down, so that the signal does not get duplicated at run time. In your example, you would just do this in the first layer, e.g.:

{
  "data": {"name": "dataset"},
  ...
  "layer": [
    {
      "params": [
        {
          "name": "_pan_and_zoom",
          "select": "interval",
          "bind": "scales"
        }
      ],
      "name": "Circle Product",
     ...
}

And this will work as you intend. I’ve attached your workbook with a working chart 1, where you should hopefully be able to use this and inspect further. You don’t need to specify a shared scale for the x axis either, so I’ve removed that too.
Deneb Example Zoom Chart _ FN.pbix (1.3 MB)

Cheers,

Daniel

1 Like

Hi Daniel.

Perfect!!, this is the chart that I need, thank you so much for your fast answer, I appreciate the development of Deneb, is an excellent tool for Power BI.

Regards

Fredy N

1 Like

Amazing work but if i have to do the same zoom and panning in (VEGA) what should i do actuallly ?

Hi @muhamadqassem9483. There’s an example of panning and zooming on the Vega website.
Greg

1 Like

Thanks Mr.Greg for your usual support but actually I am working on Gantt chart for David Bacci type and try to adding some features on it such as Zooming and Panning only in gantt chart not to the left table and try to make phases as expanding and collapsing on tasks so if you could help me on that i will appreciate.

Gantt-MOD.pbix (1.5 MB)

Hi @muhamadqassem9483.

While Vega and Vega-Lite are related, they use different syntax. Virtually all of my experience is with Vega-Lite, so I’ll leave it to others to comment further.
Greg

P.S. I should have included this yesterday, but it is discouraged to add posts to solved threads. Many forum members do not review solved threads, so your issue may be unseen. Rather, start a new thread with your issue and link to the solved thread to maximize the visibility.

@EnterpriseDNA, please split this thread into a separate thread, starting with yesterday’s post by @muhamadqassem9483

1 Like