08-28-2019, 06:09 PM
Pages: 1 2
08-28-2019, 09:21 PM
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,{
08-29-2019, 02:25 PM
Solved
But a older error is returned ...
https://discussions.corebos.org/showthread.php?tid=780&highlight=graph
But a older error is returned ...
https://discussions.corebos.org/showthread.php?tid=780&highlight=graph
08-29-2019, 05:28 PM
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
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
08-30-2019, 04:22 PM
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
}
});
=(
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
}
});
=(
08-31-2019, 10:03 AM
those changes look correct
08-31-2019, 02:04 PM
but not changes a graph ....
08-31-2019, 03:40 PM
don't know
08-31-2019, 03:56 PM
Better, image still with values overlapping ,,,
09-01-2019, 01:24 PM
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
}
}
}
};
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
}
}
}
Pages: 1 2