@eternum/chartisan_react
Advanced tools
Comparing version 2.0.1 to 2.1.0
/// <reference types="react" /> | ||
import { isChartisan, ChartisanOptions, UpdateOptions } from '@chartisan/chartisan'; | ||
import { ChartisanOptions, UpdateOptions } from '@chartisan/chartisan'; | ||
export interface ControllerOptions { | ||
@@ -15,3 +15,3 @@ initOnDemand: boolean; | ||
export interface ChartisanChartProps<D> { | ||
chartisan: isChartisan<D>; | ||
chartisan: any; | ||
options?: ChartisanOptions<D>; | ||
@@ -18,0 +18,0 @@ updateOptions?: UpdateOptions<D>; |
@@ -5,2 +5,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var React__default = _interopDefault(React); | ||
var chartisan = require('@chartisan/chartisan'); | ||
@@ -66,3 +67,3 @@ function _extends() { | ||
var height = _ref.height, | ||
chartisan = _ref.chartisan, | ||
chartisan$1 = _ref.chartisan, | ||
options = _ref.options, | ||
@@ -83,7 +84,10 @@ updateOptions = _ref.updateOptions, | ||
var destroyChart = function destroyChart() { | ||
chart === null || chart === void 0 ? void 0 : chart.destroy(); | ||
if ((chart === null || chart === void 0 ? void 0 : chart.state()) !== chartisan.ChartState.Destroyed) { | ||
chart === null || chart === void 0 ? void 0 : chart.destroy(); | ||
} | ||
}; | ||
var createChart = function createChart(data) { | ||
setChart(new chartisan(_extends({ | ||
destroyChart(); | ||
setChart(new chartisan$1(_extends({ | ||
el: division.current | ||
@@ -90,0 +94,0 @@ }, data))); |
import React, { useState, useEffect, useMemo, useRef } from 'react'; | ||
import { ChartState } from '@chartisan/chartisan'; | ||
@@ -78,6 +79,9 @@ function _extends() { | ||
var destroyChart = function destroyChart() { | ||
chart === null || chart === void 0 ? void 0 : chart.destroy(); | ||
if ((chart === null || chart === void 0 ? void 0 : chart.state()) !== ChartState.Destroyed) { | ||
chart === null || chart === void 0 ? void 0 : chart.destroy(); | ||
} | ||
}; | ||
var createChart = function createChart(data) { | ||
destroyChart(); | ||
setChart(new chartisan(_extends({ | ||
@@ -84,0 +88,0 @@ el: division.current |
{ | ||
"name": "@eternum/chartisan_react", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "React adapter for any chartisan front-end on the web", | ||
@@ -53,5 +53,7 @@ "author": "ConsoleTVs", | ||
"react-scripts": "^3.4.1", | ||
"typescript": "^3.7.5", | ||
"@chartisan/chartisan": "^3.0.5" | ||
"typescript": "^3.7.5" | ||
}, | ||
"dependencies": { | ||
"@chartisan/chartisan": "^3.1.0" | ||
}, | ||
"files": [ | ||
@@ -58,0 +60,0 @@ "dist" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29665
25
288
2
+ Added@chartisan/chartisan@^3.1.0
+ Added@chartisan/chartisan@3.2.3(transitive)
+ Addeddeepmerge@4.3.1(transitive)