Please see the attached screenshot of chart that doesn't render. It works in Chrome, Firefox but not in IE 11.
This is the error message:
SCRIPT5009: 'Uint8ClampedArray' is undefined.
File: plotly-latest.min.js, Line: 32, Column: 22068
Yikes.
What trace type are you trying to plot? Would you mind sharing a reproducible example?
Looks like the only place it occurs in the plotly source comes from es6-promise. See: https://github.com/stefanpenner/es6-promise/blob/9fef04c77d94b1d1ff2e65180fad96c3d806db72/lib/es6-promise/asap.js#L35
I feel like that should be typeof window.Uint8ClampedArray so that it doesn't just fail in strict mode.
Edit: Interesting… looks like their code is not strict mode, but plotly.js's browserified version is. Could that be the cause? (Could fix this in a hacky manner by adding window.Uint8ClampedArray = window.Uint8ClampedArray || undefined basically anywhere, but that's… just too ugly)
Thanks for the info @rreusser !
Interesting. We've been using that es6-promise polyfill ever since the 1.0.0 release and this is the first report we get.
Maybe es6-promise conflicts with something else on @TanyaShen-BEA 's page.
Can't reference dist files since too big, so I'm looking at this from plotly-basic.js. It looks exactly the same in v1.0.0 (well, @version 3.0.2 there, but the relevant part hasn't changed.)
10193 (function (process,global){
10194 /*!
10195 * @overview es6-promise - a tiny implementation of Promises/A+.
10196 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
10197 * @license Licensed under MIT license
10198 * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
10199 * @version 3.1.2
10200 */
10201
10202 (function() {
10203 "use strict";
10204 function lib$es6$promise$utils$$objectOrFunction(x) {
10205 return typeof x === 'function' || (typeof x === 'object' && x !== null);
10206 }
10207
...
10259 // test for web worker but not in IE10
10260 var lib$es6$promise$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' &&
10261 typeof importScripts !== 'undefined' &&
10262 typeof MessageChannel !== 'undefined';
Hmm… Uint8ClampedArray supported since KB2929437, which was a security update released 04/08/2014.
(Not to indicate it's any fault of yours but to get to the root of the cause,) @TanyaShen-BEA is it possible that you're using a very old version of IE11?
I've got the same behavior.
Reproducible with the public accessible VMs of Microsoft. I've wanted to test my plots with IE10, bit seems the Win-Version is too old then?
I am also geting below error on trying to draw basic graph
File: plotly-latest.min.js, Line: 7, Column: 31139
Please suggest!
@vikasmanze Sometimes very similar looking errors can have very difficult causes. Which version of plotly are you using? Which version of IE? Can you use plotly-latest.js instead of plotly-latest.min.js and paste the error as well as well as the source of the error? (an error in a minified file is not very informative!) Thanks!
I am getting a similar error as well, emulating IE 10 via IE 11 (11.1480.14393.0). Error below:
This browser lacks typed array (Uint8Array) support which is required by buffer v5.x. Use buffer v4.x if you require old browser support.
'Uint8ClampedArray' is undefined
plotly.js (73594,1)
According to caniuse, Uint8ClampedArrays are not supported by IE 10
Edit: And I'm using Plotly version: "1.30.0"
Edit2: However it also occurs on the most recent version, 1.30.1
The code in question:
var viewTypes = {
'Int8': Int8Array,
'Uint8': Uint8Array,
'Uint8Clamped': Uint8ClampedArray,
...
This happens on all versions of IE I tested, and all versions of Plotly.
Here is my inelegant workaround. It is working so far with relatively simple charts, but may cause side effects on more complex ones if Plotly actually tries to use a clamped array.
//ugly IE workaround
if (typeof Uint8ClampedArray == 'undefined'){
//just define it as a regular array
Uint8ClampedArray = function(){return []};
}
$.getScript('plotly-latest.min.js', showChart);
I'm still getting this issue in v1.38.3 ...... are there any plans to fix this?
Hi folks. Weirdly this looks like it's working in IE11 now, but not the older versions. Is this expected?
I'm facing the same issue on IE-11 and plotly-v1.50.1.min.js . I'm using trace type "scatter3d" .
This issue has been tagged with NEEDS SPON$OR
A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort.
Sponsorship range: $5k-$10k
What Sponsorship includes:
Please include the link to this issue when contacting us to discuss.
Most helpful comment
Looks like the only place it occurs in the plotly source comes from es6-promise. See: https://github.com/stefanpenner/es6-promise/blob/9fef04c77d94b1d1ff2e65180fad96c3d806db72/lib/es6-promise/asap.js#L35
I feel like that should be
typeof window.Uint8ClampedArrayso that it doesn't just fail in strict mode.Edit: Interesting… looks like their code is not strict mode, but plotly.js's browserified version is. Could that be the cause? (Could fix this in a hacky manner by adding
window.Uint8ClampedArray = window.Uint8ClampedArray || undefinedbasically anywhere, but that's… just too ugly)