@antv/f2
Version:
Charts for mobile visualization.
16 lines (12 loc) • 350 B
text/typescript
import { Identity as IdentityScale, ScaleConfig } from '../deps/f2-scale/src';
import Base from './base';
class Identity extends Base {
createScale(scaleConfig: ScaleConfig) {
return new IdentityScale(scaleConfig);
}
_mapping() {
const { field, range } = this;
return field || (range && range[0]);
}
}
export default Identity;