@gravity-ui/chartkit 1.6.6 → 1.6.7
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.7](https://github.com/gravity-ui/chartkit/compare/v1.6.6...v1.6.7) (2023-02-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* fix check if chart exists before adjust font size ([#130](https://github.com/gravity-ui/chartkit/issues/130)) ([d81c6b2](https://github.com/gravity-ui/chartkit/commit/d81c6b2e4c64b04f7d62b684c46133ab9177a479))
|
|
9
|
+
|
|
3
10
|
## [1.6.6](https://github.com/gravity-ui/chartkit/compare/v1.6.5...v1.6.6) (2023-02-21)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -5,6 +5,7 @@ import merge from 'lodash/merge';
|
|
|
5
5
|
import mergeWith from 'lodash/mergeWith';
|
|
6
6
|
import get from 'lodash/get';
|
|
7
7
|
import clamp from 'lodash/clamp';
|
|
8
|
+
import isEmpty from 'lodash/isEmpty';
|
|
8
9
|
import isNumber from 'lodash/isNumber';
|
|
9
10
|
import throttle from 'lodash/throttle';
|
|
10
11
|
import pick from 'lodash/pick';
|
|
@@ -1078,7 +1079,7 @@ function fixTooltipOnClick(event, { options }) {
|
|
|
1078
1079
|
fixTooltip(this.chart.tooltip, options, event);
|
|
1079
1080
|
}
|
|
1080
1081
|
function adjustDonutFontSize(chart, chartSeries, innerWidth, totals) {
|
|
1081
|
-
if (!totals ||
|
|
1082
|
+
if (!totals || isEmpty(chart) || isEmpty(chartSeries)) {
|
|
1082
1083
|
return;
|
|
1083
1084
|
}
|
|
1084
1085
|
const MIN_ACCEPTABLE_INNER_SIZE = 400;
|
package/package.json
CHANGED