Problem gage display in webix 6.1

hello , firefox is update three days ago and my gage doesn’t work now .
I test it in : https://snippet.webix.com/4r497cl0 and I have the same problem in 6.1 and it is ok to 6.4. Is it possible to have a simple patch without migrate to 6.4 ?
Thanks

Hello @romain, it seems that one of the arguments needed for the correct positioning is not being returned. From my limited testing, it should be pretty straightforward to fix, but you’ll have to edit a few lines in the source code. Find the _refresh method of the gage widget and replace the existing code with this:

_refresh: function () {
	this._value = this.config.value;
	var curves = this.$view.querySelector(".webix_gage_curves"),
		gageInfo = this.$view.querySelector(".webix_gage_info"),
		kx = this.config.scale,
		x = this.$width;

	curves.setAttribute("r", x / kx);
	curves.setAttribute("strokeDasharray", Math.round(Math.PI * x / kx));
	curves.style.rad = x / kx;
	curves.style.strokeDasharray = Math.round(Math.PI * x / kx);
	gageInfo.setAttribute("style", "width: " + Math.round(x / kx * 2) + "px;");

	this._gage.setAttribute("style", "height: " + (x / kx + 20) + "px;");

	this._circleGradient.setAttribute("r", x / kx);

	this._circleGradient.setAttribute("style", "stroke-dasharray: " + Math.round(this.gradientLength * Math.PI * x / kx) + ", 1900;");

	this._draw_line(curves.style.rad);

	this._animate();
},

Hello , thanks for response , it doesn’t work because I have already this code in 6.1.1 :wink:

Have you actually tried running it? I’ve provided the full function, but the fix itself is small, I’ve simply renamed curves.style.r to curves.style.rad, so you might’ve not noticed and thought that you have the same exact code. You can also try replacing this._draw_line(curves.style.rad) with this._draw_line(x/kx)

ok , I had webix.min.js instead of webix.js .
With “debug” version , I had an error message before testing your solution : “Invalid Range values” , In my application , if I comment the gage , the error message desappears , so I think it is in relation with gages , any ideas ?
(I have the same error with last code and your code)

Could you please provide the error stack trace (the errors you are seeing in your DevTools console)? I’m not quite sure of the cause of this error.

Also, is the code you are trying to run the same as the one in the snippet? As a side note, it is also possible to edit the minified file, which shouldn’t bee too difficult in this case, as you would only need to edit two variables (curves.style.rcurves.style.rad).

It is OK with change in webix.min.js (t.style.r → t.style.rad)

Thanks :slight_smile: