@gravity-ui/chartkit 1.6.5 → 1.6.6

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.6.6](https://github.com/gravity-ui/chartkit/compare/v1.6.5...v1.6.6) (2023-02-21)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * add check if chart exists before adjust font size ([#128](https://github.com/gravity-ui/chartkit/issues/128)) ([451e3c1](https://github.com/gravity-ui/chartkit/commit/451e3c119858adffc02fede05eb9f91407b6e31c))
9
+
3
10
  ## [1.6.5](https://github.com/gravity-ui/chartkit/compare/v1.6.4...v1.6.5) (2023-02-10)
4
11
 
5
12
 
@@ -1078,7 +1078,7 @@ function fixTooltipOnClick(event, { options }) {
1078
1078
  fixTooltip(this.chart.tooltip, options, event);
1079
1079
  }
1080
1080
  function adjustDonutFontSize(chart, chartSeries, innerWidth, totals) {
1081
- if (!totals) {
1081
+ if (!totals || !chart || !chartSeries) {
1082
1082
  return;
1083
1083
  }
1084
1084
  const MIN_ACCEPTABLE_INNER_SIZE = 400;
@@ -27,10 +27,6 @@ export declare type ChartKitProps<T extends ChartKitType> = {
27
27
  data: ChartKitWidget[T]['data'];
28
28
  id?: string;
29
29
  isMobile?: boolean;
30
- /**
31
- * @depricated please use onRender & onChartLoad instead
32
- * @param data
33
- */
34
30
  onLoad?: (data?: ChartKitOnLoadData<T>) => void;
35
31
  /**
36
32
  * called on each render
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/chartkit",
3
- "version": "1.6.5",
3
+ "version": "1.6.6",
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",