source: node_modules/recharts/es6/state/selectors/brushSelectors.js

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 774 bytes
Line 
1import { createSelector } from 'reselect';
2import { selectChartOffsetInternal } from './selectChartOffsetInternal';
3import { selectMargin } from './containerSelectors';
4import { isNumber } from '../../util/DataUtils';
5export var selectBrushSettings = state => state.brush;
6export var selectBrushDimensions = createSelector([selectBrushSettings, selectChartOffsetInternal, selectMargin], (brushSettings, offset, margin) => ({
7 height: brushSettings.height,
8 x: isNumber(brushSettings.x) ? brushSettings.x : offset.left,
9 y: isNumber(brushSettings.y) ? brushSettings.y : offset.top + offset.height + offset.brushBottom - ((margin === null || margin === void 0 ? void 0 : margin.bottom) || 0),
10 width: isNumber(brushSettings.width) ? brushSettings.width : offset.width
11}));
Note: See TracBrowser for help on using the repository browser.