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 ...@@ -305,14 +305,23 @@ function GpCurrencyMonetaryMassController($scope, $q, $state, $translate, $ionic
if (scale == 'linear') { if (scale == 'linear') {
yAxe.ticks.beginAtZero = true; yAxe.ticks.beginAtZero = true;
delete yAxe.ticks.min; delete yAxe.ticks.min;
yAxe.ticks.callback = function(value) {
return format(value);
};
} }
else { else {
yAxe.ticks.min = 0; yAxe.ticks.min = 0;
delete yAxe.ticks.beginAtZero; delete yAxe.ticks.beginAtZero;
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 '';
};
} }
yAxe.ticks.callback = function(value) {
return format(value);
};
}); });
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment