Reply
Member
Posts: 82
Registered: ‎01-15-2018
Accepted Solution

i have a problem with resizing my visual

hello everyone,

 

I built visual with 10 rectangles in two rows using tutorial for creating visual with simple bar chart. in that tutorial, I used dynamic parameters for resizing every rectangle. however, when i resize visual, only last one gets resized. what can be the problem?


Accepted Solutions
Highlighted
Member
Posts: 82
Registered: ‎01-15-2018

Re: i have a problem with resizing my visual

@v-viig,

 

I solved this problem by changing structure of my code. Previously, I used structure from tutorial for barchart, but since my goal was different, I plotted rectangles, added them to array, and when I resize my visual, firstly, I remove them and plot again.

View solution in original post


All Replies
Moderator
Posts: 735
Registered: ‎12-02-2016

Re: i have a problem with resizing my visual

The problem might be in applying attributes and styles to the existing DOM elements.

Could you please share the code that renders rectangles?

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Highlighted
Member
Posts: 82
Registered: ‎01-15-2018

Re: i have a problem with resizing my visual

@v-viig,

 

I solved this problem by changing structure of my code. Previously, I used structure from tutorial for barchart, but since my goal was different, I plotted rectangles, added them to array, and when I resize my visual, firstly, I remove them and plot again.

Super Contributor
Posts: 1,864
Registered: ‎07-09-2016

Re: i have a problem with resizing my visual

@ysapiyev,

 

By the way, to help close this thread, you may accept solution. Your contribution is highly appreciated.

Member
Posts: 82
Registered: ‎01-15-2018

Re: i have a problem with resizing my visual

@v-chuncz-msft,

 

No problem, this forum is very helpful for me, as I am developing custom visuals