source: node_modules/recharts/es6/util/cursor/getCursorRectangle.js

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

Added visualizations

  • Property mode set to 100644
File size: 511 bytes
Line 
1export function getCursorRectangle(layout, activeCoordinate, offset, tooltipAxisBandSize) {
2 var halfSize = tooltipAxisBandSize / 2;
3 return {
4 stroke: 'none',
5 fill: '#ccc',
6 x: layout === 'horizontal' ? activeCoordinate.x - halfSize : offset.left + 0.5,
7 y: layout === 'horizontal' ? offset.top + 0.5 : activeCoordinate.y - halfSize,
8 width: layout === 'horizontal' ? tooltipAxisBandSize : offset.width - 1,
9 height: layout === 'horizontal' ? offset.height - 1 : tooltipAxisBandSize
10 };
11}
Note: See TracBrowser for help on using the repository browser.