@swimlane/ngx-charts
Version:
Declarative Charting Framework for Angular
14 lines • 475 B
JavaScript
import { timeFormat } from 'd3-time-format';
export function tickFormat(fieldType, groupByType) {
return function (label) {
if (label === 'No Value' || label === 'Other') {
return label;
}
if (fieldType === 'date' && groupByType === 'groupBy') {
var formatter = timeFormat('MM/DD/YYYY');
return formatter(label);
}
return label.toString();
};
}
//# sourceMappingURL=tick-format.helper.js.map