IDEMPIERE-6106 Performance indicator (the Gauge chart): rendering of needle is wrong when value is > the max interval (#2312)
This commit is contained in:
parent
ca6bb3e335
commit
0aa862e105
|
@ -6,7 +6,7 @@
|
|||
<language-name>xul/html</language-name>
|
||||
<version>
|
||||
<version-class>org.idempiere.zk.billboard.Version</version-class>
|
||||
<version-uid>3.10.3.20231118</version-uid>
|
||||
<version-uid>3.10.3.20240411</version-uid>
|
||||
</version>
|
||||
<component>
|
||||
<component-name>billboard</component-name>
|
||||
|
@ -19,7 +19,7 @@
|
|||
</component>
|
||||
|
||||
<stylesheet href="~./js/zul/billboard/css/billboard.css" type="text/css"/>
|
||||
<javascript-module name="zul.billboard" version="3.10.3.20231118"/>
|
||||
<javascript-module name="zul.billboard" version="3.10.3.20240411"/>
|
||||
<!-- this js module doesn't actually exists and it is here for modern.css version -->
|
||||
<javascript-module name="zul.billboard.css" version="3.10.3.20231118"/>
|
||||
<javascript-module name="zul.billboard.css" version="3.10.3.20240411"/>
|
||||
</language-addon>
|
||||
|
|
|
@ -34,5 +34,5 @@ public class Version {
|
|||
* Returns the version UID.<br/>
|
||||
* Must match with version-uid value in lang-addon.xml
|
||||
*/
|
||||
public static final String UID = "3.10.3.20231118";
|
||||
public static final String UID = "3.10.3.20240411";
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ billboard.GaugeRenderer = class {
|
|||
if (rendererOptions) {
|
||||
if (rendererOptions["showNeedle"] && rendererOptions["showNeedle"] == true) {
|
||||
showNeedle = true;
|
||||
gauge.title = "\n{=NEEDLE_VALUE}%";
|
||||
gauge.title = "\n"+wgt.getSeriesData()[1]+"%";
|
||||
gauge.width = 20;
|
||||
gauge.label = {
|
||||
format: function(_value, _ratio, id) { return id; }
|
||||
|
@ -69,6 +69,11 @@ billboard.GaugeRenderer = class {
|
|||
value: wgt.getSeriesData()[1][0]
|
||||
}
|
||||
};
|
||||
if (rendererOptions["intervals"]) {
|
||||
if (model.arc.needle.value > rendererOptions["intervals"][rendererOptions["intervals"].length-1]) {
|
||||
model.arc.needle.value = rendererOptions["intervals"][rendererOptions["intervals"].length-1]+3;
|
||||
}
|
||||
}
|
||||
model.interaction = {
|
||||
enabled: false
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue