Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: tooltip bug when unchecking a curve on multi-charts #2199

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion front/src/components/boxs/chart/ApexChartAreaOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
yaxis: {
labels: {
padding: 4,
formatter: function(value) {

Check warning on line 55 in front/src/components/boxs/chart/ApexChartAreaOptions.js

View workflow job for this annotation

GitHub Actions / Front test

Expected method shorthand
if (Math.abs(value) < 1) {
if (Math.abs(value) < 1 || isNaN(value)) {
return value; // For very low values, like crypto prices, use the normal value
} else {

Check warning on line 58 in front/src/components/boxs/chart/ApexChartAreaOptions.js

View workflow job for this annotation

GitHub Actions / Front test

Unnecessary 'else' after 'return'
return value.toFixed(2); // 2 decimal places for other values
}
}
Expand Down
2 changes: 1 addition & 1 deletion front/src/components/boxs/chart/ApexChartBarOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
yaxis: {
labels: {
padding: 4,
formatter: function(value) {

Check warning on line 63 in front/src/components/boxs/chart/ApexChartBarOptions.js

View workflow job for this annotation

GitHub Actions / Front test

Expected method shorthand
if (Math.abs(value) < 1) {
if (Math.abs(value) < 1 || isNaN(value)) {
return value; // For very low values, like crypto prices, use the normal value
} else {

Check warning on line 66 in front/src/components/boxs/chart/ApexChartBarOptions.js

View workflow job for this annotation

GitHub Actions / Front test

Unnecessary 'else' after 'return'
return value.toFixed(2); // 2 decimal places for other values
}
}
Expand Down
2 changes: 1 addition & 1 deletion front/src/components/boxs/chart/ApexChartLineOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const getApexChartLineOptions = ({ height, displayAxes, series, colors, locales,
labels: {
padding: 4,
formatter: function(value) {
if (Math.abs(value) < 1) {
if (Math.abs(value) < 1 || isNaN(value)) {
return value; // For very low values, like crypto prices, use the normal value
} else {
return value.toFixed(2); // 2 decimal places for other values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const getApexChartStepLineOptions = ({ height, displayAxes, series, colors, loca
labels: {
padding: 4,
formatter: function(value) {
if (Math.abs(value) < 1) {
if (Math.abs(value) < 1 || isNaN(value)) {
return value; // For very low values, like crypto prices, use the normal value
} else {
return value.toFixed(2); // 2 decimal places for other values
Expand Down
Loading