Highcharts.js line labels disappear with Array#flat enabled
Reported by
sanifmar...@gmail.com,
Sep 21
|
|||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 Steps to reproduce the problem: 1. open web application. 2. Loads all the other charts. 3. Few component of highchart does not get loaded with new chrome update Chrome versionVersion 69.0.3497.100 (Official Build) (64-bit) What is the expected behavior? It should plot label bars in highcharts. Check screenshot InternetExplorer.png What went wrong? It doe snot plot label bars in highcharts. Check screenshot Chrome.png Error on chrome: https://www.highcharts.com/errors/15 Did this work before? N/A Chrome version: 69.0.3497.100 Channel: stable OS Version: 10.0 Flash Version:
,
Sep 23
,
Sep 24
,
Sep 24
Issue 888127 has been merged into this issue.
,
Sep 24
Thanks for filing the issue! Tried checking the issue on reported chrome version 69.0.3497.100 using Windows 10 with the below mentioned steps. 1. Launched Chrome 2. Navigated to https://moblize.com/ We couldn't find any option to view any charts, neither any option to login. Attaching the screen shot of the same. @Reporter: Could you please help us in navigating to the charts in that web application, which helps us to triage the issue further in a better way. Any further inputs from your may be helpful.
,
Sep 24
I did some debugging. Found out tag <tspan> is not supported by chrome. css class: highchart-plot-line-label. Please find attached element inspected from internet explorer. Can you please help ?
,
Sep 24
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 24
for more information, I created a ticket with highchart contains jsfiddle. https://forum.highcharts.com/post143040.html?sid=5d4c697430c1cdc1fb6d78ed0d0fd04e#p143040 Can you please check that, if something which can be done from browser end
,
Sep 25
,
Sep 25
Tried checking the issue using the test file provided in comment#9. Able to reproduce the issue on reported chrome version 69.0.3497.100 and on the latest canary 71.0.3560.0 using Windows 10, Mac 10.13.1 and Ubuntu 14.04 Bisect Information: ------------------- Good Build: 69.0.3444.0 Bad Build: 69.0.3445.0 You are probably looking for a change made after 562549 (known good), but no later than 562550 (first known bad). CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/6637a1327eac794d559183cebc88607b83d5b351..e20de6df0d1ca85e4c5d20ab77d8f88b7882c41c https://chromium.googlesource.com/v8/v8/+log/66c64a74..8030067c Suspecting: https://chromium.googlesource.com/v8/v8/+/757631830d253269ffb90dd10ce9f75265a2cdbc Review URL: https://chromium-review.googlesource.com/1075047 @jgruber: Please help in assigning it to the right owner, if this is not related to your change. Adding RB-Stable as this seems to be a recent regression. Thanks!
,
Sep 25
,
Sep 25
Hmmm Not sure that this is related to Jakobs Change. Assigning it to Yang for now to check if it is related to Jakobs Change. In addition, maybe this is related to flatten, Satya and Mathias?
,
Sep 25
,
Sep 25
,
Sep 25
Per https://github.com/highcharts/highcharts/blob/a6141614d19bda0db8ef749c636596fc65319619/changelog/highcharts/6.1.1.md, Highcharts.js used to have a bug where plot line labels stopped working in browsers that support Array#flat: > Fixed #8477, plot line labels didn't work in browsers that support Array.prototype.flat. https://github.com/highcharts/highcharts/issues/8477
,
Sep 25
So yeah, this is very likely due to us shipping Array#flat. :(
,
Sep 25
,
Sep 25
+foolip, +adamk Thanks for looking into this Mathias. It'd be great to verify this locally as well. Do you know how many versions of this library are now broken? I'm trying to understand if this is only in new/recent apps or if legacy apps (which might not get updated) are broken too.
,
Sep 25
,
Sep 25
I came to the same conclusion reading the suspect commit range in V8. Array.prototype.flat causes observable changes to JS behavior. Jakob's change should not.
,
Sep 25
Kevin Gibbons tracked it down to this commit from 2015: https://github.com/highcharts/highcharts/commit/ae85bc7f3bfca830c92eeaf47d4b1bb5cef0ebd9
,
Sep 25
Without Array#flat, the text on the green box renders:
chrome --js-flags='--no-harmony-array-flat' https://jsfiddle.net/d76a98u1/1/
With Array#flat, it doesn’t.
,
Sep 25
,
Sep 25
will google compensate for introducing bugs with new release as that change broke many of my live analytic charts?. thanks for taking up the issue with priority
,
Sep 26
Looks like in the code, `path` is an array and `path.flat` is assigned to a boolean. That much is fine, because that will put a property on the instance that shadows Array.prototype.flat. Where it goes wrong is must be in "the plot band/line label" where `&& !path.flat` is part of a condition, and that presumably happens before path.flat is first assigned, causing the other branch to be taken if Array.prototype.flat exists. This sort of breakage is always theoretically possible when adding any attribute/method to any interface on the web platform, and ultimately we don't have the tools to predict with perfect fidelity which names will work without trying to ship them. Here, I think a reasonable next step would be to do a search in httparchive to estimate how widespread affected versions of this library are. (See also https://developers.google.com/web/updates/2018/03/smooshgate for another way to break things, which led to the `flat` name.)
,
Sep 26
An initial search for "path.flat" (https://bigquery.cloud.google.com/savedquery/762219082167:ff25650df284457eba8b2678290cbafb) is encouraging: only 33 hits, and almost all seem to be highcharts.js. This is actually surprisingly few hits given how many stars and forks the GitHub repo has, possibly most people are using the code minified which would make it harder to find. Full list of sites: http://www.4-traders.com/ http://www.abanet.org/ http://www.alfaleads.ru/ http://www.americanbar.org/ http://www.betonline.net.pl/ http://www.bitdeal.co/ http://www.bitdeal.co.in/ http://www.buysellads.com/ http://www.coca-colaproductfacts.com/ http://www.comparaboo.com/ http://www.comparaboo.co.uk/ http://www.customs.gov.tw/ http://www.democats.org/ http://www.easynvest.com.br/ http://www.ega.ae/ http://www.essexstudent.com/ http://www.etternaonline.com/ http://www.examlogin.com/ http://www.hardware.info/ http://www.kuantokusta.pt/ http://www.minuc.se/ http://www.nam.co.jp/ http://www.option888.com/ http://www.popspedia.com/ http://www.rise-global.us/ http://www.short-edition.com/ http://www.tbkc.gov.tw/ http://www.tekna.no/ http://www.thecube.com/ http://www.tic.ir/ http://www.tokster.com/ http://www.tumangaonline.com/ http://www.zonebourse.com/ Spot checking a few of them I couldn't spot any charts, so it's hard to say how many sites would be affected.
,
Sep 26
Thanks for the analysis. It seems there is already a fix in highline and AFAIK there is also a workaround snippet which an affected site can deploy locally. In addition Array#flat is also shipping in Firefox 62 already. In Opera too. I think the name Array#flat was also chosen because it didn't conflict with a lot of existing code. ==> I don't think this is a release blocker.
,
Sep 26
Thanks for the analysis, foolip. That is encouraging indeed, especially considering that the Highcharts bug only seems to affect line labels (which I imagine not all visualizations use). hablich@, Adam, Sathya, and I had the same intuition. Let’s keep a close eye on what happens next though…
,
Sep 26
Note that users wishing to work around this from the client side can go to chrome://flags/#disable-javascript-harmony-shipping and select "Disabled".
,
Sep 26
Based on offline chat yesterday, untagging the bug with M69 stable blocker and any fix should get merged to M70 and M71.
,
Oct 1
[bulk edit] - This issue is marked as a stable blocker for M70. We are two weeks away from M70 Stable. Please take a look urgently!
,
Oct 2
removing RBS per #28/29 |
|||||||||||||||
►
Sign in to add a comment |
|||||||||||||||
Comment 1 by sanifmar...@gmail.com
, Sep 21