Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Anonymous
Not applicable

Plotting subplots using plotly in custom visuals

I am trying to wrap two custom visuals into one custom visual. Similar to one shown here: https://plotly.com/javascript/subplots/#subplots-with-shared-axes

In the visual, I am trying to update, the newPlot function accepts layout object and not dynamic object. And as per the example in the above link, I am trying to set the grid property of layout object which does not exist in the layout object that I am trying to pass. (Image attached below). Also,tried passing a dynamic object, but the newPlot function does not accept as opposed to what is shown in the above link.

Can someone help on:

1. How do we pass dynamic object to the newPlot function?

2. Or how do we set the grid property of the layout object?

 

Thanks in advance!

 

yashpatel27_0-1610822847559.png

 

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

See if it will help you:

https://docs.microsoft.com/zh-cn/power-bi/developer/visuals/selection-api 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Kudoed Authors