tel8618217223380 / dwpe

Automatically exported from code.google.com/p/dwpe
MIT License
0 stars 0 forks source link

error handling for chart type #42

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

it's a real tiny modification, but if You replace the lines:
    //create chart
    createChart[o.type]();

to:
    //create chart
    if (typeof(createChart[o.type])=='function') {
        createChart[o.type]();
    }
thank You won't get JS-error if a mistyped chart-type is used. (You'll get a 
blank chart)

Original issue reported on code.google.com by mr.tee...@gmail.com on 17 Sep 2010 at 12:43