google / google-visualization-issues

288 stars 35 forks source link

Bug: Cannot change chartType after 1st time in ChartWrapper #1406

Open orwant opened 9 years ago

orwant commented 9 years ago
After the Nov update, I cannot dynamically change a chart's type from certain type as
before using the ChartWrapper class

ops.chartType="PieChart";
var wrap=new google.visualization.ChartWrapper(ops); 
wrap.draw();    // Works the first time                                         
...         

ops.chartType="Gauge";
var wrap=new google.visualization.ChartWrapper(ops);
wrap.draw();    // But not subsequently 

What steps will reproduce the problem? Please provide a link to a
demonstration page if at all possible, or attach code.

1. Go to www.viseyes.org/shiva/chart.htm
2. Select "Gauge" from pulldown
3. Following error appears in console: Uncaught ReferenceError: fA is not defined 

What component is this issue related to (PieChart, LineChart, DataTable,
Query, etc)?

Changing type from Pie to Gauge chart yields error.

Are you using the test environment (version 1.1)?
(If you are not sure, answer NO)

NO

What operating system and browser are you using?

Win7 and MacOS

*********************************************************
For developers viewing this issue: please click the 'star' icon to be
notified of future changes, and to let us know how many of you are
interested in seeing it resolved.
*********************************************************

Original issue reported on code.google.com by bferster on 2013-12-06 00:12:00

orwant commented 9 years ago
Thanks.  We'll look into it with rather high priority.

Original issue reported on code.google.com by dlaliberte@google.com on 2013-12-06 02:11:48

orwant commented 9 years ago
I'm not seeing any problem now, so perhaps you found a workaround? 

I like this SHIVA chart editor by the way.  Are you involved with its development?

Original issue reported on code.google.com by dlaliberte@google.com on 2013-12-06 22:14:33

orwant commented 9 years ago
I commented out the kluge added to it fix it in this link, so you can still see it in
action:

http://www.viseyes.org/shiva/charterror.htm

Thanks for the kind words about the SHIVA tools. 
I'm the director of the project and primary author.
We actually use a bunch of your APIs in the full toolkit:

http://www.viseyes.org/shiva

and in another project we're doing for an NEH grant on maps:

http://www.viseyes.org/mapscholar

Thanks for making such great tools available at the API level!

Bill 

Bill Ferster, PhD
University of Virginia
Twitter: @bferster

Original issue reported on code.google.com by bferster on 2013-12-07 01:10:39

orwant commented 9 years ago
Hi Bill,
We've figured out the problem, and it is related to our changes to how the library
is loaded.  We have a fix, but we are not going to patch it into the current release
because it could add even more instability.  Since you have a workaround, I hope that
will be good enough for the next month or so. 

An easy workaround, by the way, is to just load all the libraries at one time if they
might eventually be needed, and perhaps that is what you are doing.

Original issue reported on code.google.com by dlaliberte@google.com on 2013-12-09 21:33:29