@gravity-ui/chartkit 7.33.1 → 7.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { ChartKitPlugin } from '../../types';
|
|
2
2
|
export { CustomShapeRenderer } from '@gravity-ui/charts';
|
|
3
3
|
export * from './types';
|
|
4
|
-
/**
|
|
5
|
-
* It is an experemental plugin
|
|
6
|
-
*
|
|
7
|
-
* DO NOT USE IT IN YOUR PRODUCTION
|
|
8
|
-
* */
|
|
9
4
|
export declare const GravityChartsPlugin: ChartKitPlugin;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export { CustomShapeRenderer } from '@gravity-ui/charts';
|
|
3
3
|
export * from './types';
|
|
4
|
-
/**
|
|
5
|
-
* It is an experemental plugin
|
|
6
|
-
*
|
|
7
|
-
* DO NOT USE IT IN YOUR PRODUCTION
|
|
8
|
-
* */
|
|
9
4
|
export const GravityChartsPlugin = {
|
|
10
5
|
type: 'gravity-charts',
|
|
11
6
|
renderer: React.lazy(() => import('./renderer/GravityChartsWidget')),
|
|
@@ -13,10 +13,7 @@ export const GravityChartsWidget = React.forwardRef(function GravityChartsWidget
|
|
|
13
13
|
const performanceMeasure = React.useRef(measurePerformance());
|
|
14
14
|
const chartRef = React.useRef(null);
|
|
15
15
|
const ChartComponent = (tooltip === null || tooltip === void 0 ? void 0 : tooltip.splitted) ? ChartWithSplitPane : Chart;
|
|
16
|
-
const
|
|
17
|
-
if (!dimensions) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
16
|
+
const handleChartReady = React.useCallback(() => {
|
|
20
17
|
if (!performanceMeasure.current) {
|
|
21
18
|
performanceMeasure.current = measurePerformance();
|
|
22
19
|
}
|
|
@@ -43,6 +40,6 @@ export const GravityChartsWidget = React.forwardRef(function GravityChartsWidget
|
|
|
43
40
|
onChartLoad({});
|
|
44
41
|
}
|
|
45
42
|
}, [onChartLoad]);
|
|
46
|
-
return React.createElement(ChartComponent, { ref: chartRef, data: data, lang: lang,
|
|
43
|
+
return React.createElement(ChartComponent, { ref: chartRef, data: data, lang: lang, onReady: handleChartReady });
|
|
47
44
|
});
|
|
48
45
|
export default GravityChartsWidget;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/chartkit",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.35.0",
|
|
4
4
|
"description": "React component used to render charts based on any sources you need",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "git@github.com:gravity-ui/ChartKit.git",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@bem-react/classname": "^1.6.0",
|
|
50
|
-
"@gravity-ui/charts": "^1.
|
|
50
|
+
"@gravity-ui/charts": "^1.32.0",
|
|
51
51
|
"@gravity-ui/date-utils": "^2.1.0",
|
|
52
52
|
"@gravity-ui/i18n": "^1.0.0",
|
|
53
53
|
"@gravity-ui/yagr": "^4.11.0",
|