Socket
Socket
Sign inDemoInstall

react-chartjs-2

Package Overview
Dependencies
4
Maintainers
4
Versions
84
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.0 to 4.2.0

7

dist/index.js

@@ -80,3 +80,3 @@ import React, { forwardRef, useRef, useEffect } from 'react';

function ChartComponent(param, ref) {
let { height =150 , width =300 , redraw =false , datasetIdKey , type , data , options , plugins =[] , fallbackContent , ...props } = param;
let { height =150 , width =300 , redraw =false , datasetIdKey , type , data , options , plugins =[] , fallbackContent , updateMode , ...props } = param;
const canvasRef = useRef(null);

@@ -131,3 +131,3 @@ const chartRef = useRef();

} else {
chartRef.current.update();
chartRef.current.update(updateMode);
}

@@ -138,3 +138,4 @@ }, [

data.labels,
data.datasets
data.datasets,
updateMode
]);

@@ -141,0 +142,0 @@ useEffect(()=>{

import type { CanvasHTMLAttributes, MutableRefObject, ReactNode } from 'react';
import type { Chart, ChartType, ChartData, ChartOptions, DefaultDataPoint, Plugin } from 'chart.js';
import type { Chart, ChartType, ChartData, ChartOptions, DefaultDataPoint, Plugin, UpdateMode } from 'chart.js';
export declare type ForwardedRef<T> = ((instance: T | null) => void) | MutableRefObject<T | null> | null;

@@ -43,2 +43,7 @@ export interface ChartProps<TType extends ChartType = ChartType, TData = DefaultDataPoint<TType>, TLabel = unknown> extends CanvasHTMLAttributes<HTMLCanvasElement> {

fallbackContent?: ReactNode;
/**
* A mode string to indicate transition configuration should be used.
* @see https://www.chartjs.org/docs/latest/developers/api.html#update-mode
*/
updateMode?: UpdateMode;
}

@@ -45,0 +50,0 @@ /**

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

@@ -5,0 +5,0 @@ "author": "Jeremy Ayerst",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc