source: node_modules/recharts/es6/state/selectors/selectPlotArea.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: 593 bytes
Line 
1import { createSelector } from 'reselect';
2import { selectChartOffset } from './selectChartOffset';
3import { selectChartHeight, selectChartWidth } from './containerSelectors';
4export var selectPlotArea = createSelector([selectChartOffset, selectChartWidth, selectChartHeight], (offset, chartWidth, chartHeight) => {
5 if (!offset || chartWidth == null || chartHeight == null) {
6 return undefined;
7 }
8 return {
9 x: offset.left,
10 y: offset.top,
11 width: Math.max(0, chartWidth - offset.left - offset.right),
12 height: Math.max(0, chartHeight - offset.top - offset.bottom)
13 };
14});
Note: See TracBrowser for help on using the repository browser.