CoreBOSBB
[ solved ] Value with decimals in pipeline graph - Printable Version

+- CoreBOSBB (https://discussions.corebos.org)
+-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17)
+--- Forum: Administrator Support (https://discussions.corebos.org/forumdisplay.php?fid=8)
+--- Thread: [ solved ] Value with decimals in pipeline graph (/showthread.php?tid=1560)

Pages: 1 2


[ solved ] Value with decimals in pipeline graph - rslemer - 08-28-2019

My pipeline graph shows a value with decimal value


RE: Value with decimals in pipeline graph - joebordes - 08-28-2019

try this change and let me know if it makes a difference:

Code:
diff --git a/Smarty/templates/Home/HomeBlock.tpl b/Smarty/templates/Home/HomeBlock.tpl

index 94ec276b2..81c59e593 100644
--- a/Smarty/templates/Home/HomeBlock.tpl
+++ b/Smarty/templates/Home/HomeBlock.tpl
@@ -193,7 +193,8 @@ window.doChart{$HOME_STUFFID} = function(charttype) {ldelim}
        Chart.scaleService.updateScaleDefaults('linear', {
                ticks: {
                        min: 0,
-                       max: maxgrph
+                       max: maxgrph,
+                       precision: 0
                }
        });
        window.schart{/literal}{$HOME_STUFFID}{literal} = new Chart(stuffchart,{



RE: Value with decimals in pipeline graph - rslemer - 08-29-2019

Solved

But a older error is returned ...

https://discussions.corebos.org/showthread.php?tid=780&highlight=graph


RE: Value with decimals in pipeline graph - joebordes - 08-29-2019

try eliminating the

max: maxgrph

and also playing with the "5"

var maxgrph = Math.ceil(maxnum + (5 * maxnum / 100));

change it to 8 or 10 and see what works better


RE: Value with decimals in pipeline graph - rslemer - 08-30-2019

I don't know if i change right

code:
var maxgrph = Math.ceil(maxnum + (10 * maxnum / 100));
Chart.scaleService.updateScaleDefaults('linear', {
ticks: {
min: 0,
max: maxgrph,
precision: 0
}


and I remove a template_c
rm *Home*

but not changes a graph ...

or
};
var maxnum = Math.max.apply(Math, chartDataObject.datasets[0].data);
var maxgrph = Math.ceil(maxnum + (10 * maxnum / 100));
Chart.scaleService.updateScaleDefaults('linear', {
ticks: {
min: 0,
precision: 0
}
});



=(


RE: Value with decimals in pipeline graph - joebordes - 08-31-2019

those changes look correct


RE: Value with decimals in pipeline graph - rslemer - 08-31-2019

but not changes a graph ....


RE: Value with decimals in pipeline graph - joebordes - 08-31-2019

don't know


RE: Value with decimals in pipeline graph - rslemer - 08-31-2019

Better, image still with values overlapping ,,,


RE: Value with decimals in pipeline graph - rslemer - 09-01-2019

Works as above

};
var maxnum = Math.max.apply(Math, chartDataObject.datasets[0].data);
var maxgrph = Math.ceil(maxnum + (10 * maxnum / 100));
Chart.scaleService.updateScaleDefaults('linear', {
ticks: {
min: 0,
precision: 0
}
});
window.schart{/literal}{$HOME_STUFFID}{literal} = new Chart(stuffchart,{
type: charttype,
data: chartDataObject,
options: {
responsive: true,
legend: {
position: "right",
display: (charttype=='pie'),
labels: {
fontSize: 11,
boxWidth: 18
}
}
}