Hide 0 on y axis
This commit is contained in:
parent
72d85618a3
commit
c047fb77cf
|
@ -31,8 +31,7 @@ function set_daily_graph(repoDict) {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
callbacks: {
|
callbacks: {
|
||||||
label: function (context) {
|
label: function (context) {
|
||||||
var label = context.dataset.label || '';
|
if (context.parsed.y !== null) {
|
||||||
if (context.parsed.y !== null && y_units !== null) {
|
|
||||||
return `${context.parsed.y} ${y_units}`
|
return `${context.parsed.y} ${y_units}`
|
||||||
} else {
|
} else {
|
||||||
return ""
|
return ""
|
||||||
|
@ -43,11 +42,14 @@ function set_daily_graph(repoDict) {
|
||||||
},
|
},
|
||||||
scales: {
|
scales: {
|
||||||
y: {
|
y: {
|
||||||
|
display: true,
|
||||||
|
min: 0,
|
||||||
|
source: "ticks",
|
||||||
ticks: {
|
ticks: {
|
||||||
display: true,
|
|
||||||
grid: false,
|
|
||||||
callback: function (value, index, values) {
|
callback: function (value, index, values) {
|
||||||
return value + " " + y_units;
|
if (value !== 0) {
|
||||||
|
return `${value} ${y_units}`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,3 +62,7 @@ function set_daily_graph(repoDict) {
|
||||||
config
|
config
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getBaseLog(x, y) {
|
||||||
|
return Math.log(y) / Math.log(x);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user