Dynamically change the width of Envision Finance using Javascript

250 views
Skip to first unread message

Paul Kim

unread,
Aug 10, 2012, 11:17:36 PM8/10/12
to envis...@googlegroups.com
Hi, what would be the best way to dynamically change the width of Envision Finance using Javascript? The Envision Finance demo sets the width to 600px using css (i.e., .envision-finance {width: 300px}). When I resize the visual using css, it works fine. But, I would like to dynamically resize the Finance template when the user resizes the browser. I've tried to set the width using jQuery but it does not render correctly (i.e., $('.envision-finance').css({width: 300});). I have attached an image to show the problem. When the visual is resized from 600px to 300px, the visual does not completely get resized. Is there is a better way or is this not supported/possible? Thanks.
Untitled.png

Carl Sutherland

unread,
Aug 11, 2012, 9:24:02 AM8/11/12
to envis...@googlegroups.com
Hello, could you fork this with your issue?  http://jsfiddle.net/cesutherland/LurmY/49/

-Carl

Paul Kim

unread,
Aug 11, 2012, 12:16:51 PM8/11/12
to envis...@googlegroups.com
Hi, I have forked this:  http://jsfiddle.net/LurmY/71/. I am using jQuery and setTimeout() to resize the visual to 300px.

Arun Jain

unread,
Aug 23, 2012, 3:00:58 AM8/23/12
to envis...@googlegroups.com
I have the same question. I want the chart to be responsive, catering to the different target screens, but can't figure out how to do the same. The div width is fixed at 600px

MT

unread,
Oct 16, 2013, 3:50:25 AM10/16/13
to envis...@googlegroups.com
Is it possible to change the height too?

Nicolas Mercky

unread,
Oct 21, 2013, 10:57:20 AM10/21/13
to envis...@googlegroups.com

Hi,

In my opinion, you have to call the draw() function of the envision components, on window resize event like this (probably coupled with a timeout function for performance...) : 

But there is still an issue with the "connection" component which does'nt resize properly...
Reply all
Reply to author
Forward
0 new messages