diegomedina248 commented on code in PR #21015:
URL: https://github.com/apache/superset/pull/21015#discussion_r940741445
##########
superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts:
##########
@@ -313,3 +314,19 @@ export function getAxisType(dataType?: GenericDataType):
AxisType {
}
return 'category';
}
+
+export function getOverMaxHiddenFormatter(
+ config: {
+ max?: number;
+ } = {},
+) {
+ const { max } = config;
+ // Only apply this logic if there's a MAX set in the controls
+ const shouldHideIfOverMax = !!max || max === 0;
+
+ return new NumberFormatter({
+ formatFunc: value =>
+ `${shouldHideIfOverMax ? (value > max ? '' : value) : value}`,
Review Comment:
`shouldHideIfOverMax && value > max ? '' : value`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]