fix(chart): added Big Number chart support for MAX metric with VARCHAR column#41182
fix(chart): added Big Number chart support for MAX metric with VARCHAR column#41182omkarhall wants to merge 4 commits into
Conversation
Code Review Agent Run #9f10b0Actionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
The flagged issue is correct. Returning raw strings from Here is the corrected implementation for if (dateObject.isValid()) {
return dateObject.valueOf();
}
return null;
}
return metricValue;
};There are no other comments in the provided review data to address. Would you like me to check for any other potential issues in this file? superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/utils.ts |
Code Review Agent Run #f0e81dActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #41182 +/- ##
==========================================
- Coverage 64.31% 64.31% -0.01%
==========================================
Files 2651 2651
Lines 144784 144788 +4
Branches 33409 33413 +4
==========================================
- Hits 93125 93122 -3
- Misses 49991 49998 +7
Partials 1668 1668
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Code Review Agent Run #db677eActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
SUMMARY
The issue I am addressing is that Big Number charts previously displayed "No data" when the metric result was a non-empty, non-date string value. My fix for this is the below:
In
utils.tsparseMetricValuereturns null for non-date strings. Now, intransformProps.tsafterparseMetricValuereturnsnull, if the original raw value was a non-empty string, it falls back to that string.BigNumberViz.tsxalready handles stringbigNumberby displaying it directly so "No data" will no longer appear.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before


After
TESTING INSTRUCTIONS
MAX(varchar_column).Create Chart.ADDITIONAL INFORMATION