Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] axis not showing correctly Brave browser #85

Closed
Alex-CodeLab opened this issue Jun 21, 2019 · 6 comments
Closed

[bug] axis not showing correctly Brave browser #85

Alex-CodeLab opened this issue Jun 21, 2019 · 6 comments

Comments

@Alex-CodeLab
Copy link

Alex-CodeLab commented Jun 21, 2019

Lightweight Charts Version: 1.0.0 rc5
Ubuntu 18.04, Brave 0.65.118

Steps/code to reproduce:
Charts only show part of the axis on Brave browser.
For example, all examples (like https://jsfiddle.net/TradingView/61xkszjp/ )

Screenshot from 2019-06-21 10-50-52
Screenshot from 2019-06-21 12-06-11

@subzey
Copy link
Member

subzey commented Jun 21, 2019

Brave Browser strikes again 😀

Width of the text labels should be measured first in order to get the correct price axis width. Brave assumes CanvasContext2D::measureText() a fingerprinting technique.

It really can be used for fingerprinting as measureText returns a value with prcecision up to 4..5 digits in the fractional part that may differ subtly between computers. The expected workaround would be just rounding the width lowering the precision of this measurement and making the fingerprinting unusable.

But no. They always return 0 for any input.

@andreas-it-dev
Copy link

fwiw i am on Brave v0.65.121 which is based on Chromium 75.0.3770.100 and axis padding and margin looks OK. however, i still have an issue with the price axes:
image

idk if this is related or a seperate issue..

Andreas

@timocov
Copy link
Contributor

timocov commented Jul 3, 2019

@awunder can you please provide a little repro with data you have on the chart which we can open in Brave browser to investigate the latest problem (quite possible that it has the same reason with the previous one, but let's try).

@timocov
Copy link
Contributor

timocov commented Jul 11, 2019

I'm going to close this issue. If you'll have any updates - feel free to reopen it.

@timocov timocov closed this as completed Jul 11, 2019
@shaun-ba
Copy link

@timocov sorry why was this closed? It's nearly 2022 and I still have this issue on tradingview and other websites with charts. Very annoying and thought i've been dealing with it for 6 months I'm about to change browsers because of it.

@timocov
Copy link
Contributor

timocov commented Oct 12, 2021

@shaun-ba I just downloaded the latest version of Brave browser, didn't change anything in the settings and opened https://jsfiddle.net/2wq8gshf/ - it works fine:

image

If you want to make it work in "strict mode of blocking fingerprinting" (which explicitly says that it may break sites), then please either ask Brave team to fix measureText method (as @subzey mentioned #85 (comment)) or suggest us an approach we may use to measure widths of the text (we need it to correctly display chart, text in it, price axis, etc). Also, you can just disable "strict mode of blocking fingerprinting" on some websites.

We don't use this method to track you anyhow (we don't even use fingerprinting in any kind, this is bad technique with disrespect for our users), you can easily scan the source code in terms of usages of this method to be sure that this is true. The thing what Brave browser does is against the spec, we aren't able to handle it (and I don't think that we should to try a workaround for this specific browser).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants