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

react-chartjs-2

Package Overview
Dependencies
Maintainers
4
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-chartjs-2 - npm Package Compare versions

Comparing version 3.0.4 to 3.0.5

7

dist/index.js

@@ -127,3 +127,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

});
if (!currentDataSet || !newDataSet.data) return newDataSet;
if (!currentDataSet || !newDataSet.data) return _extends({}, newDataSet);

@@ -137,5 +137,6 @@ if (!currentDataSet.data) {

assign(currentDataSet.data, newDataSet.data);
return _extends({}, currentDataSet, newDataSet, {
assign(currentDataSet, _extends({}, newDataSet, {
data: currentDataSet.data
});
}));
return currentDataSet;
});

@@ -142,0 +143,0 @@ chart.update();

@@ -124,3 +124,3 @@ import React, { forwardRef, useRef, useMemo, useState, useImperativeHandle, useEffect } from 'react';

});
if (!currentDataSet || !newDataSet.data) return newDataSet;
if (!currentDataSet || !newDataSet.data) return _extends({}, newDataSet);

@@ -134,5 +134,6 @@ if (!currentDataSet.data) {

assign(currentDataSet.data, newDataSet.data);
return _extends({}, currentDataSet, newDataSet, {
assign(currentDataSet, _extends({}, newDataSet, {
data: currentDataSet.data
});
}));
return currentDataSet;
});

@@ -139,0 +140,0 @@ chart.update();

@@ -124,6 +124,5 @@ (function (global, factory) {

assign(chart.config.data, newChartData);
console.log(chart.config.data.datasets);
currentDataSets.forEach(function (currentDataSet) {
var newDataSet = find(newDataSets, function (d) {
return d.label === currentDataSet.label && d.type === currentDataSet.type;
chart.config.data.datasets = newDataSets.map(function (newDataSet) {
var currentDataSet = find(currentDataSets, function (d) {
return d.label === newDataSet.label && d.type === newDataSet.type;
});

@@ -138,5 +137,3 @@ if (!currentDataSet || !newDataSet.data) return newDataSet;

console.log(currentDataSet.data);
assign(currentDataSet.data, newDataSet.data);
console.log(currentDataSet.data);
return _extends({}, currentDataSet, newDataSet, {

@@ -143,0 +140,0 @@ data: currentDataSet.data

/// <reference types="react" />
import Chart from 'chart.js/auto';
import type * as Chart from 'chart.js';
export interface Props extends React.CanvasHTMLAttributes<HTMLCanvasElement> {

@@ -13,3 +13,3 @@ id?: string;

fallbackContent?: React.ReactNode;
plugins?: Chart.PluginServiceRegistrationOptions[];
plugins?: Chart.PluginOptionsByType<Chart.ChartType>;
getDatasetAtEvent?: (dataset: Array<{}>, event: React.MouseEvent<HTMLCanvasElement>) => void;

@@ -16,0 +16,0 @@ getElementAtEvent?: (element: [{}], event: React.MouseEvent<HTMLCanvasElement>) => void;

{
"name": "react-chartjs-2",
"version": "3.0.4",
"version": "3.0.5",
"description": "React components for Chart.js",

@@ -44,3 +44,3 @@ "source": "src/index.tsx",

"peerDependencies": {
"chart.js": "^3.1.0",
"chart.js": "^3.5.0",
"react": "^16.8.0 || ^17.0.0"

@@ -82,2 +82,2 @@ },

]
}
}

Sorry, the diff of this file is not supported yet

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