Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-gauge-component

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-gauge-component - npm Package Compare versions

Comparing version 1.2.11 to 1.2.21

13

dist/lib/GaugeComponent/hooks/arc.js

@@ -68,3 +68,4 @@ "use strict";

};
var onArcMouseLeave = function (event, d, gauge) {
var onArcMouseLeave = function (event, d, gauge, mousemoveCbThrottled) {
mousemoveCbThrottled.cancel();
(0, exports.hideTooltip)(gauge);

@@ -200,6 +201,7 @@ if (d.data.onMouseLeave != undefined)

(0, exports.applyColors)(outerArcSubarcs, gauge);
var mousemoveCbThrottled_1 = (0, lodash_1.throttle)(function (event, d) { return onArcMouseMove(event, d, gauge); }, 20);
arcPaths
.on("mouseleave", function (event, d) { return onArcMouseLeave(event, d, gauge); })
.on("mouseleave", function (event, d) { return onArcMouseLeave(event, d, gauge, mousemoveCbThrottled_1); })
.on("mouseout", function (event, d) { return onArcMouseOut(event, d, gauge); })
.on("mousemove", (0, lodash_1.throttle)(function (event, d) { return onArcMouseMove(event, d, gauge); }, 20))
.on("mousemove", mousemoveCbThrottled_1)
.on("click", function (event, d) { return onArcMouseClick(event, d); });

@@ -242,6 +244,7 @@ }

(0, exports.applyColors)(subArcs, gauge);
var mousemoveCbThrottled = (0, lodash_1.throttle)(function (event, d) { return onArcMouseMove(event, d, gauge); }, 20);
arcPaths
.on("mouseleave", function (event, d) { return onArcMouseLeave(event, d, gauge); })
.on("mouseleave", function (event, d) { return onArcMouseLeave(event, d, gauge, mousemoveCbThrottled); })
.on("mouseout", function (event, d) { return onArcMouseOut(event, d, gauge); })
.on("mousemove", (0, lodash_1.throttle)(function (event, d) { return onArcMouseMove(event, d, gauge); }, 20))
.on("mousemove", mousemoveCbThrottled)
.on("click", function (event, d) { return onArcMouseClick(event, d); });

@@ -248,0 +251,0 @@ };

@@ -360,5 +360,3 @@ "use strict";

var angle = startAngle + (valuePercentage * 100) * endAngle / 100;
var halfInPercentage = utils.calculatePercentage(minValue, maxValue, (maxValue / 2));
var halfPercentage = halfInPercentage;
var isValueLessThanHalf = valuePercentage < halfPercentage;
var isValueLessThanHalf = valuePercentage < 0.5;
//Values between 40% and 60% are aligned in the middle

@@ -365,0 +363,0 @@ var isValueBetweenTolerance = valuePercentage > constants_1.default.rangeBetweenCenteredTickValueLabel[0] &&

@@ -20,3 +20,3 @@ "use strict";

else if (value > maxValue) {
return 100;
return 1;
}

@@ -23,0 +23,0 @@ else {

{
"name": "react-gauge-component",
"version": "1.2.11",
"version": "1.2.21",
"main": "dist/lib/index.js",

@@ -5,0 +5,0 @@ "module": "dist/lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc