Skip to content

Commit

Permalink
Merge branch 'duckdb' of github.com:GladysAssistant/Gladys into duckdb
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles committed Aug 5, 2024
2 parents 399c1f5 + 98c81f0 commit 663ae01
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
9 changes: 8 additions & 1 deletion front/src/components/boxs/chart/ApexChartAreaOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ const getApexChartAreaOptions = ({ displayAxes, height, series, colors, locales,
},
yaxis: {
labels: {
padding: 4
padding: 4,
formatter: function(value) {
if (Math.abs(value) < 1) {
return value; // For very low values, like crypto prices, use the normal value
} else {
return value.toFixed(2); // 2 decimal places for other values
}
}
}
},
colors,
Expand Down
9 changes: 8 additions & 1 deletion front/src/components/boxs/chart/ApexChartBarOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,14 @@ const getApexChartBarOptions = ({ displayAxes, series, colors, locales, defaultL
},
yaxis: {
labels: {
padding: 4
padding: 4,
formatter: function(value) {
if (Math.abs(value) < 1) {
return value; // For very low values, like crypto prices, use the normal value
} else {
return value.toFixed(2); // 2 decimal places for other values
}
}
}
},
colors,
Expand Down
9 changes: 8 additions & 1 deletion front/src/components/boxs/chart/ApexChartLineOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ const getApexChartLineOptions = ({ height, displayAxes, series, colors, locales,
},
yaxis: {
labels: {
padding: 4
padding: 4,
formatter: function(value) {
if (Math.abs(value) < 1) {
return value; // For very low values, like crypto prices, use the normal value
} else {
return value.toFixed(2); // 2 decimal places for other values
}
}
}
},
colors,
Expand Down
9 changes: 8 additions & 1 deletion front/src/components/boxs/chart/ApexChartStepLineOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ const getApexChartStepLineOptions = ({ height, displayAxes, series, colors, loca
},
yaxis: {
labels: {
padding: 4
padding: 4,
formatter: function(value) {
if (Math.abs(value) < 1) {
return value; // For very low values, like crypto prices, use the normal value
} else {
return value.toFixed(2); // 2 decimal places for other values
}
}
}
},
colors,
Expand Down

0 comments on commit 663ae01

Please sign in to comment.