New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-jsx-highcharts

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-jsx-highcharts - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

8

package.json
{
"name": "react-jsx-highcharts",
"version": "1.1.0",
"version": "1.2.0",
"description": "Highcharts charts built using React components",

@@ -64,2 +64,3 @@ "main": "dist/react-jsx-highcharts.min.js",

"html-webpack-plugin": "^2.28.0",
"immutable": "^3.8.1",
"jsdom": "^11.0.0",

@@ -79,3 +80,6 @@ "lodash-webpack-plugin": "^0.11.4",

"dependencies": {
"lodash": "^4.17.4"
"immutable-is": "^3.7.6",
"is-immutable": "^1.0.1",
"lodash": "^4.17.4",
"react-immutable-proptypes": "^2.1.0"
},

@@ -82,0 +86,0 @@ "peerDependencies": {

@@ -7,2 +7,4 @@ # react-jsx-highcharts

As of 1.3.0 React JSX Highcharts supports using [Immutable.js](https://facebook.github.io/immutable-js/) data structures as Series data.
## Example

@@ -9,0 +11,0 @@

import { Component } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import isEqual from 'lodash/isEqual';
import isImmutable from 'is-immutable';
import immutableEqual from 'immutable-is';
import addEventProps, { getNonEventHandlerProps } from '../../utils/events';

@@ -15,3 +18,3 @@ import getModifiedProps from '../../utils/getModifiedProps';

dimension: PropTypes.string, // Provided by Axis component
data: PropTypes.array,
data: PropTypes.oneOfType([PropTypes.array, ImmutablePropTypes.list]),
visible: PropTypes.bool,

@@ -32,6 +35,9 @@ addSeries: PropTypes.func, // Provided by ChartProvider

componentWillMount () {
const { children, dimension, axisId, addSeries, ...rest } = this.props;
const { children, dimension, axisId, addSeries, data, ...rest } = this.props;
const seriesData = isImmutable(data) ? data.toJS() : data;
const nonEventProps = getNonEventHandlerProps(rest);
addSeries({
[`${dimension}Axis`]: axisId,
data: seriesData,
...nonEventProps

@@ -50,3 +56,5 @@ }, true);

// Using setData is more performant than update
if (isEqual(data, prevProps.data) === false) {
if (isImmutable(data) && immutableEqual(data, prevProps.data) === false) {
setData(data.toJS(), true);
} else if (isEqual(data, prevProps.data) === false) {
setData(data, true);

@@ -53,0 +61,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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