Skip to content
Snippets Groups Projects
Commit 9c38ea54 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[fix] Graph: hide some y axis labels, on logorithmic scale

parent e1dcd9d6
No related branches found
No related tags found
No related merge requests found
......@@ -305,14 +305,23 @@ function GpCurrencyMonetaryMassController($scope, $q, $state, $translate, $ionic
if (scale == 'linear') {
yAxe.ticks.beginAtZero = true;
delete yAxe.ticks.min;
yAxe.ticks.callback = function(value) {
return format(value);
};
}
else {
yAxe.ticks.min = 0;
delete yAxe.ticks.beginAtZero;
}
yAxe.ticks.callback = function(value) {
delete yAxe.ticks.callback;
yAxe.ticks.callback = function(value, index) {
if (!value) return;
//console.log(value + '->' + Math.log10(value)%1);
if (Math.log10(value)%1 === 0 || Math.log10(value/3)%1 === 0) {
return format(value);
}
return '';
};
}
});
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment