mtanda / grafana-histogram-panel

Apache License 2.0
64 stars 15 forks source link

Doesn't work in IE11 #42

Open louloizides opened 7 years ago

louloizides commented 7 years ago

The histograms render ok in Chrome, but not in IE11. Other Grafana charts work ok in IE11.

mtanda commented 7 years ago

Sorry, I use Mac, replicate issue is hard for me. If you provide the following information, I can check it little...

Screen capture of console tab in developer tools is very helpful. https://msdn.microsoft.com/library/bg182326(v=vs.85).aspx

louloizides commented 7 years ago

In IE - note the blank panels where the histograms should be image

In Chrome - this is how it's supposed to look image

Hi, thanks for the response. Screenshots are attached. If you have any thoughts on where the issue is, I'd be happy to test it. I haven't gotten deep enough into Grafana to recognize where the error is coming from.

On a side note I love the panel though... the only thing I wish I could do was to normalize the histograms so that they're displayed as if they had the same total count. That would help visualize probability distribution differences between the two. This could probably also be accomplished by being able to put a second histogram on a different Y axis.

mtanda commented 7 years ago

Thanks for sharing screenshot! Not sure, but using let might be not good. So, I rewrite it by _.each(), and make a PR. https://github.com/mtanda/grafana-histogram-panel/pull/43

Please try this version. (copy files in dist dir to your local panel plugin dir)

On a side note I love the panel though... the only thing I wish I could do was to normalize the histograms so that they're displayed as if they had the same total count. That would help visualize probability distribution differences between the two. This could probably also be accomplished by being able to put a second histogram on a different Y axis.

I may understand your request. I'll try to implement it.

louloizides commented 7 years ago

I updated the code... getting a slightly different error now :P

I only updated histogram_ctrl.js, were there any others that needed updating?

image

mtanda commented 7 years ago

hmm, it's very strange. When you access by Chrome, the panel plugin still work correctly?

louloizides commented 7 years ago

By the way, if you're interested there is a way to test on IE from a Mac... at some point in the near future I need to learn how to write these plugins myself though so that I'd be able to help with the debugging :)

https://code.tutsplus.com/tutorials/a-fast-accurate-way-to-test-internet-explorer-on-ios-mac-os-x-and-android--cms-24192

It'd also be nice if Grafana had a way to render these on the server side. Thought it did but I couldn't find one. The whole reason we're having a problem is because we use Xibo for digital signage and Xibo uses IE for the browser.

louloizides commented 7 years ago

Yes, it still works in Chrome... wondering if I did something wrong when copying the javascript

mtanda commented 7 years ago

Oh, I didn't know Xibo, may be this one? http://xibo.org.uk/

Sorry, I don't have enough time to debug this issue today. It is time to sleep :-)

If you have experience to use JS debugger, try to debug by step execution. set breakpoint to following line, you may find something. https://github.com/mtanda/grafana-histogram-panel/blob/c986ff8785d41dfdaff3e3a3182db254f38eb954/src/histogram_ctrl.js#L175

https://github.com/mtanda/grafana-histogram-panel/blob/c986ff8785d41dfdaff3e3a3182db254f38eb954/src/histogram.js#L52

mtanda commented 7 years ago

IE doesn't support Symbol, it might cause the issue. http://stackoverflow.com/questions/33828840/symbol-is-undefined-in-ie-after-using-babel

AbizerWarren commented 7 years ago

Is there any workaround for this, till the time the feature is available?