@gravity-ui/chartkit 2.2.0 → 2.2.1
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
|
+
## [2.2.1](https://github.com/gravity-ui/chartkit/compare/v2.2.0...v2.2.1) (2023-03-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **Highcharts plugin:** proper message for empty data ([#140](https://github.com/gravity-ui/chartkit/issues/140)) ([ee41ace](https://github.com/gravity-ui/chartkit/commit/ee41ace81ddaa88601b584273a7759dfe1dbe1c9))
|
|
9
|
+
|
|
3
10
|
## [2.2.0](https://github.com/gravity-ui/chartkit/compare/v2.1.0...v2.2.0) (2023-03-21)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import moment from 'moment';
|
|
2
2
|
import lodashMin from 'lodash/min';
|
|
3
|
+
import { i18n } from '../../../../i18n';
|
|
3
4
|
import { ChartKitError, CHARTKIT_ERROR_CODE } from '../../../../libs';
|
|
4
5
|
import { DEFAULT_LINES_LIMIT } from './constants';
|
|
5
6
|
function prepareValue(value, firstValue, options) {
|
|
@@ -90,7 +91,10 @@ export function prepareData(data, options, holidays) {
|
|
|
90
91
|
(data.graphs &&
|
|
91
92
|
!(data.graphs.length && data.graphs.some((graph) => graph.data && graph.data.length))) ||
|
|
92
93
|
(Array.isArray(data) && !data.length)) {
|
|
93
|
-
throw new ChartKitError({
|
|
94
|
+
throw new ChartKitError({
|
|
95
|
+
code: CHARTKIT_ERROR_CODE.NO_DATA,
|
|
96
|
+
message: i18n('error', 'label_no-data'),
|
|
97
|
+
});
|
|
94
98
|
}
|
|
95
99
|
if (data.graphs) {
|
|
96
100
|
if (data.graphs.length > limit && !options.withoutLineLimit) {
|
package/package.json
CHANGED