Skip to content

Commit

Permalink
fix(Highcharts plugin): proper message for empty data (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
ariser authored Mar 27, 2023
1 parent 98599dc commit ee41ace
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/plugins/highcharts/renderer/helpers/prepare-data.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import moment from 'moment';
import lodashMin from 'lodash/min';
import {i18n} from '../../../../i18n';
import {ChartKitError, CHARTKIT_ERROR_CODE} from '../../../../libs';
import {DEFAULT_LINES_LIMIT} from './constants';

Expand Down Expand Up @@ -108,7 +109,10 @@ export function prepareData(data, options, holidays) {
)) ||
(Array.isArray(data) && !data.length)
) {
throw new ChartKitError({code: CHARTKIT_ERROR_CODE.NO_DATA});
throw new ChartKitError({
code: CHARTKIT_ERROR_CODE.NO_DATA,
message: i18n('error', 'label_no-data'),
});
}

if (data.graphs) {
Expand Down

0 comments on commit ee41ace

Please sign in to comment.