Legend width varies between clients
bmario opened this issue · comments
A quick fix could be changing the maxWidthPercent
The culprit is probably found here: https://github.com/metricq/metricq-webview/blob/master/src/MetricQWebView.js#L306-L330
Actually, this looks like a code smell and should be done solely in CSS.
The culprit is probably found here: https://github.com/metricq/metricq-webview/blob/master/src/MetricQWebView.js#L306-L330
Actually, this looks like a code smell and should be done solely in CSS.
Probably the basic issue can be done without much hassle (but it will of course require some manual editing):
Remove like 99 % of all element.style.cssAttributeHere="someCSSValue"
assignments in javascript (e.g. in interact.js).
Which files and which code lines are affected can be easily determined by running a grep command like grep --color=always --recursive --ignore-case --line-number "\\.style"
or to omit the the library and minified files prepend it with a find&xargs combination like with this here find -type f -iname "*.js" \! -iname "*.min.js" \! -ipath "*/lib/*" | xargs grep --color=always --ignore-case --line-number "\\.style"
.
Instead use element.setAttribute("class","some-css-class-here")
or better yet the more elegant element.classList.add("some-css-class-here")
(supported in Firefox since 2010, and in Chrome since 2012) wherever applicable. The style attributes then just need to be put into a .css
file.
If I am asking too much here, please tell me, and I will do it myself.