avatorl / Deneb-Vega-Help

Do you need help with Deneb custom visual for Power BI and/or Vega visualization grammar? Create an issue here to get assistance from Deneb community expert Andrzej Leszkiewicz.
4 stars 0 forks source link

[Vega] Treemap with Categories and Subcategories - Column-headers #12

Closed maxanatsko closed 3 days ago

maxanatsko commented 3 months ago

Hello, I'm attempting to reproduce well-known stock market overview infographics in Vega/PowerBI. image

So far I was able to get to this state. image

However, I'm struggling with groups and roles (eg. column-header) etc, to be able to display category and subcategory aligned with the rectangles within treemap. Gist with the JSON spec. *I was not able to make it work within Github editor, but in PBI it works.

Thank you in advance for your help.

References used: Open the Chart in the Vega Editor Open the Chart in the Vega Editor Open the Chart in the Vega Editor

avatorl commented 2 months ago

@maxanatsko , I'm sorry for the late response.

I was not able to make it work within Github editor, but in PBI it works.

Likely because of the // comments. Not supported in Vega (not valid JSON). That's JSONC, supported in Deneb since version 1.7

Also I would check the data transformations... After removing the comments I see just zeroes in the transformed data tables: image