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

react-solidgauge

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-solidgauge - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

6

package.json
{
"name": "react-solidgauge",
"version": "1.0.11",
"version": "1.0.12",
"description": "A Small React-D3 solid gauge chart inspired by amcharts",

@@ -52,2 +52,3 @@ "main": "dist/index.js",

"dependencies": {
"d3-color": "^1.0.2",
"d3-ease": "^1.0.2",

@@ -61,4 +62,5 @@ "d3-interpolate": "^1.1.2",

"react": "^15.4.1",
"react-dom": "^15.4.1"
"react-dom": "^15.4.1",
"react-offcharts-core": "^0.1.2"
}
}
import React, { Component, PropTypes } from 'react';
import cloneComponents from '../Helpers/cloneChildren';
import cloneComponents from 'react-offcharts-core/Utils/cloneChildren';
const Group = (props) => {
const { children, ...noChildren } = props;
// Clone the children and pass in the props and state
const clonedChildren = cloneComponents(
props.children, props);
const Group = props => (
<g transform={`translate(0, ${props.chartMargin / 2})`}>
{cloneComponents(props)}
</g>
);
return (
<g transform={`translate(0, ${props.chartMargin / 2})`}>
{clonedChildren}
</g>
);
};
Group.propTypes = {
chartMargin: PropTypes.number,
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node,
]),
};
export default Group;
import React, { Component, PropTypes } from 'react';
import { arc } from 'd3-shape';
import { select, selectAll, mouse } from 'd3-selection';
import cloneComponents from '../Helpers/cloneChildren';
import cloneChildren from 'react-offcharts-core/Utils/cloneChildren';
import ToolTip from './ToolTip';

@@ -27,3 +27,2 @@ import { dataShape, fillAndStroke } from '../Helpers/props';

const el = select(this.container);
const elV = el.node().parentElement.querySelector('canvas');
const tool = select(el.node().querySelector('.toolTip'));

@@ -75,3 +74,3 @@ let mw = 180;

.transition()
.duration(0)
.duration(50)
.attr('opacity', 1);

@@ -91,2 +90,3 @@ });

const dim = dh.getDimensions(this.props);
console.log(this.props);
return (

@@ -93,0 +93,0 @@ <g

@@ -144,2 +144,3 @@ import React, { Component, PropTypes } from 'react';

render() {
console.log(this.props);
const dim = dh.getDimensions(this.props);

@@ -146,0 +147,0 @@ return (

import React, { PropTypes } from 'react';
import Chart from './Chart';
import Chart from 'react-offcharts-core/Components/Chart';
import ReactIf from 'react-offcharts-core/Components/ReactIf';
import Shadows from 'react-offcharts-core/Components/Defs/Shadow';
import guid from 'react-offcharts-core/Utils/guid';
import Group from './Group';
import PathGroup from './PathGroup';
import Mouse from './MouseContainerOverlay';
import Shadows from './Shadows';
import ReactIf from '../Helpers/ReactIf';
import { dataShape, fillAndStroke } from '../Helpers/props';

@@ -37,2 +38,3 @@

el={<g />}
copy
condition={props.showTooltip}

@@ -39,0 +41,0 @@ >

@@ -31,2 +31,3 @@ import { arc } from 'd3-shape';

.endAngle(endAngle)
);

@@ -33,0 +34,0 @@

@@ -1,2 +0,1 @@

import Chart from './Chart/Chart';
import Group from './Chart/Group';

@@ -7,3 +6,3 @@ import PathGroup from './Chart/PathGroup';

export { Chart, Group, PathGroup, Mouse };
export { Group, PathGroup, Mouse };
export default SolidGauge;

Sorry, the diff of this file is not supported yet

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