Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[ solved ] Value with decimals in pipeline graph
#1
My pipeline graph shows a value with decimal value


Attached Files Thumbnail(s)
   
Ranieri
eCRM Web
Reply
#2
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,{
Joe
TSolucio
Reply
#3
Solved

But a older error is returned ...

https://discussions.corebos.org/showthre...ight=graph


Attached Files Thumbnail(s)
   
Ranieri
eCRM Web
Reply
#4
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
Joe
TSolucio
Reply
#5
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
}
});



=(
Ranieri
eCRM Web
Reply
#6
those changes look correct
Joe
TSolucio
Reply
#7
but not changes a graph ....
Ranieri
eCRM Web
Reply
#8
don't know
Joe
TSolucio
Reply
#9
Better, image still with values overlapping ,,,
Ranieri
eCRM Web
Reply
#10
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
}
}
}
Ranieri
eCRM Web
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)