Deneb - Hconcat only renders 1 view instead of 2

Hello All,

I’ll appreciate some help / guidance on this issue. I have 2 charts that work separately. But when I try to combine them using hconcat, only one view renders

The following is the layout of my spec

“hconcat”: [
{
Layer A": [
{
// specification A say layer A comprising 3-4 marks
}],
Layer B": [ {
// specification B, layer B comprising multiple marks too.
}
]
}
]

Only the latter spec B renders. If I swap the two specs, only the spec in the lower part renders, as if it overwrites what’s in spec A because what ever is in spec A renders if I temporarily remove spec B

Any suggestions what I might be missing? I’m a newbie in deneb/vega-lite.

Many thanks in advance.

Bumping this post for more visibility from our experts and users.

Hi @Dee_OO. Hard to say without seeing your code, but I’d guess that Vega-Lite is getting confused while trying to align both layers, and that you probably need to add a height and width key:value pair to each layer. Please upload a sample PBIX that illustrates your issue if you’d like further help.
Greg

Hello @Greg

Many thanks for having a look at this issue. The sample PBIX is now provided.

Thanks again

Dee_OO v1.pbix (1.4 MB)

Hi @Dee_OO. The horizontal concatenation seems to work just fine when I double each individual visual.


I suspect that as the transform blocks are a bit different that they can’t cover all instances in both visuals, so as is not uncommon with Vega-Lite, it doesn’t render that which can’t be figured-out.

I’d ensure that both visuals work individually with exactly the same transform and params block if they’re to be shared, or try moving the transform and params blocks inside the layer then do a simple hconcat of those.

Hope this helps.
Greg
eDNA Forum - Deneb Concatenation.pbix (1.4 MB)

1 Like

Hi @Greg ,

Many thanks again for your help. Much appreciated. Recommended solutions didn’t resolve it BUT Issue is now resolved. It turns out I was missing a set of opening and closing braces to isolate the 2 composite views. I noticed this when I worked through your example. Thanks a million.

Thanks again