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

@gravity-ui/chartkit

Package Overview
Dependencies
Maintainers
3
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gravity-ui/chartkit - npm Package Compare versions

Comparing version 2.2.2 to 2.3.0

15

build/plugins/indicator/renderer/IndicatorWidget.js

@@ -7,2 +7,3 @@ import React from 'react';

import { CHARTKIT_SCROLLABLE_NODE_CLASSNAME } from '../../../constants';
import { getChartPerformanceDuration, getRandomCKId, markChartPerformance } from '../../../utils';
import { IndicatorItem } from './IndicatorItem';

@@ -15,8 +16,12 @@ import './IndicatorWidget.css';

function IndicatorWidgetInner(props, _ref) {
const { onLoad, formatNumber, data: { data = [], defaultColor }, } = props;
const { onLoad, formatNumber, data: { data = [], defaultColor }, id, onRender, } = props;
const generatedId = React.useMemo(() => `${id}_${getRandomCKId()}`, [data, defaultColor, formatNumber, id]);
markChartPerformance(generatedId);
React.useLayoutEffect(() => {
// TODO: swap to onRender after https://github.com/gravity-ui/chartkit/issues/33
onLoad === null || onLoad === void 0 ? void 0 : onLoad();
// TODO: add onRender with renderTime Issue #114
});
if (onRender) {
onRender({ renderTime: getChartPerformanceDuration(generatedId) });
return;
}
onLoad === null || onLoad === void 0 ? void 0 : onLoad({ widgetRendering: getChartPerformanceDuration(generatedId) });
}, [onLoad, onRender, generatedId]);
if (isEmpty(data)) {

@@ -23,0 +28,0 @@ throw new ChartKitError({

# Changelog
## [2.3.0](https://github.com/gravity-ui/chartkit/compare/v2.2.2...v2.3.0) (2023-04-11)
### Features
* **Indicator plugin:** add onRender ([#145](https://github.com/gravity-ui/chartkit/issues/145)) ([3a044c0](https://github.com/gravity-ui/chartkit/commit/3a044c08583cd96bd08e3fb29a89c06ca9a6be18))
* **Indicator plugin:** add renderTime ([3a044c0](https://github.com/gravity-ui/chartkit/commit/3a044c08583cd96bd08e3fb29a89c06ca9a6be18))
## [2.2.2](https://github.com/gravity-ui/chartkit/compare/v2.2.1...v2.2.2) (2023-03-28)

@@ -4,0 +12,0 @@

{
"name": "@gravity-ui/chartkit",
"version": "2.2.2",
"version": "2.3.0",
"description": "React component used to render charts based on any sources you need",

@@ -5,0 +5,0 @@ "license": "MIT",

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