@xh/hoist 77.0.0-SNAPSHOT.1760139387105 → 77.0.0-SNAPSHOT.1760194879110
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.
|
@@ -26,6 +26,8 @@ export declare class ChartModel extends HoistModel {
|
|
|
26
26
|
* be done via {@link setHighchartsConfig} or {@link setSeries}.
|
|
27
27
|
*/
|
|
28
28
|
highchart: any;
|
|
29
|
+
/** True if this chart has no series to display */
|
|
30
|
+
get empty(): boolean;
|
|
29
31
|
constructor(config?: ChartConfig);
|
|
30
32
|
/**
|
|
31
33
|
* Update the Highcharts instance configuration.
|
package/cmp/chart/ChartModel.ts
CHANGED
|
@@ -8,8 +8,8 @@ import {type MouseEvent} from 'react';
|
|
|
8
8
|
import type {ChartContextMenuSpec, ChartMenuToken} from '@xh/hoist/cmp/chart/Types';
|
|
9
9
|
import {getContextMenuItems} from '@xh/hoist/cmp/chart/impl/ChartContextMenuItems';
|
|
10
10
|
import {HoistModel, PlainObject, Some, XH} from '@xh/hoist/core';
|
|
11
|
-
import {action, makeObservable, observable} from '@xh/hoist/mobx';
|
|
12
|
-
import {castArray, cloneDeep, isFunction, isNil} from 'lodash';
|
|
11
|
+
import {action, computed, makeObservable, observable} from '@xh/hoist/mobx';
|
|
12
|
+
import {castArray, cloneDeep, isEmpty, isFunction, isNil} from 'lodash';
|
|
13
13
|
import {mergeDeep} from '@xh/hoist/utils/js';
|
|
14
14
|
|
|
15
15
|
interface ChartConfig {
|
|
@@ -59,6 +59,12 @@ export class ChartModel extends HoistModel {
|
|
|
59
59
|
@observable.ref
|
|
60
60
|
highchart: any;
|
|
61
61
|
|
|
62
|
+
/** True if this chart has no series to display */
|
|
63
|
+
@computed
|
|
64
|
+
get empty(): boolean {
|
|
65
|
+
return isEmpty(this.series);
|
|
66
|
+
}
|
|
67
|
+
|
|
62
68
|
constructor(config?: ChartConfig) {
|
|
63
69
|
super();
|
|
64
70
|
makeObservable(this);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist",
|
|
3
|
-
"version": "77.0.0-SNAPSHOT.
|
|
3
|
+
"version": "77.0.0-SNAPSHOT.1760194879110",
|
|
4
4
|
"description": "Hoist add-on for building and deploying React Applications.",
|
|
5
5
|
"repository": "github:xh/hoist-react",
|
|
6
6
|
"homepage": "https://xh.io",
|