Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a visual that performs a lot of calculations when the update() method is called.
Normally this is fine, for example when I just click the refresh button it works fine.
However, I realised that when one resizes a visual, the update method essentially gets called nonstop. For example if I resize it from 500x200 to 300x200 I guess it gets called 200 times.
Anyway, because of the number of calculations my visual has to perform with each update, this just ends up crashing my browser!
Is there perhaps a way to make the update method only be called when the size is not still in the process of being adjusted? Or some other way to prevent this issue?
I'm not sure how feasible it would be to make the code more efficient without reducing its functionality unfortunately, so I'd rather try other methods before going down that route!
Solved! Go to Solution.
Hey,
for me this worked quite nice
public update(options: VisualUpdateOptions){ if(options.type == VisualUpdateType.ResizeEnd) { // code here } }
As mentioned above, you may make a distinction between VisualUpdateType.Resize and VisualUpdateType.Resize + VisualUpdateType.ResizeEnd.
Hey,
for me this worked quite nice
public update(options: VisualUpdateOptions){ if(options.type == VisualUpdateType.ResizeEnd) { // code here } }
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
8 | |
4 | |
2 | |
2 |
User | Count |
---|---|
4 | |
3 | |
3 | |
3 | |
2 |