| 12345678910111213141516171819 |
- import { scaleOf } from './utils';
- import { LegendContinuous } from './legendContinuous';
- export const LegendContinuousSize = (options) => {
- return (context) => {
- const { scales } = context;
- const sizeScale = scaleOf(scales, 'size');
- return LegendContinuous(Object.assign({}, {
- type: 'size',
- tick: false,
- data: sizeScale.getOptions().domain.map((value, index) => ({
- value,
- label: String(value),
- })),
- labelFilter: (datum, index, data) => index === 0 || index === data.length - 1,
- }, options))(context);
- };
- };
- LegendContinuousSize.props = Object.assign(Object.assign({}, LegendContinuous.props), { defaultPosition: 'top', defaultOrientation: 'horizontal' });
- //# sourceMappingURL=legendContinuousSize.js.map
|