source: node_modules/recharts/lib/util/cursor/getCursorRectangle.js@ ba17441

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

Added visualizations

  • Property mode set to 100644
File size: 633 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.getCursorRectangle = getCursorRectangle;
7function getCursorRectangle(layout, activeCoordinate, offset, tooltipAxisBandSize) {
8 var halfSize = tooltipAxisBandSize / 2;
9 return {
10 stroke: 'none',
11 fill: '#ccc',
12 x: layout === 'horizontal' ? activeCoordinate.x - halfSize : offset.left + 0.5,
13 y: layout === 'horizontal' ? offset.top + 0.5 : activeCoordinate.y - halfSize,
14 width: layout === 'horizontal' ? tooltipAxisBandSize : offset.width - 1,
15 height: layout === 'horizontal' ? offset.height - 1 : tooltipAxisBandSize
16 };
17}
Note: See TracBrowser for help on using the repository browser.