source: node_modules/recharts/es6/util/getRadiusAndStrokeWidthFromDot.js@ a762898

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

Added visualizations

  • Property mode set to 100644
File size: 715 bytes
RevLine 
[a762898]1import { svgPropertiesNoEventsFromUnknown } from './svgPropertiesNoEvents';
2export function getRadiusAndStrokeWidthFromDot(dot) {
3 var props = svgPropertiesNoEventsFromUnknown(dot);
4 var defaultR = 3;
5 var defaultStrokeWidth = 2;
6 if (props != null) {
7 var {
8 r,
9 strokeWidth
10 } = props;
11 var realR = Number(r);
12 var realStrokeWidth = Number(strokeWidth);
13 if (Number.isNaN(realR) || realR < 0) {
14 realR = defaultR;
15 }
16 if (Number.isNaN(realStrokeWidth) || realStrokeWidth < 0) {
17 realStrokeWidth = defaultStrokeWidth;
18 }
19 return {
20 r: realR,
21 strokeWidth: realStrokeWidth
22 };
23 }
24 return {
25 r: defaultR,
26 strokeWidth: defaultStrokeWidth
27 };
28}
Note: See TracBrowser for help on using the repository browser.