cx 24.7.3 → 24.7.5
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/dist/charts.js +24 -21
- package/dist/manifest.js +719 -719
- package/dist/widgets.js +1 -0
- package/package.json +1 -1
- package/src/charts/Column.d.ts +5 -3
- package/src/charts/Column.js +1 -1
- package/src/charts/ColumnBarBase.js +25 -21
- package/src/charts/LegendEntry.d.ts +15 -13
- package/src/widgets/grid/Grid.js +2 -1
package/dist/widgets.js
CHANGED
|
@@ -16259,6 +16259,7 @@ var Grid = /*#__PURE__*/ (function (_Container) {
|
|
|
16259
16259
|
},
|
|
16260
16260
|
]
|
|
16261
16261
|
: null;
|
|
16262
|
+
if (sorters == null) field = null;
|
|
16262
16263
|
instance.set("sorters", sorters);
|
|
16263
16264
|
instance.set("sortField", field);
|
|
16264
16265
|
instance.set("sortDirection", direction);
|
package/package.json
CHANGED
package/src/charts/Column.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as Cx from "../core";
|
|
2
2
|
import { ColumnBarBaseProps } from "./ColumnBarBase";
|
|
3
|
-
import { Selection } from "../ui/selection";
|
|
4
3
|
|
|
5
4
|
interface ColumnProps extends ColumnBarBaseProps {
|
|
6
5
|
/** Column base value. Default value is `0`. */
|
|
@@ -17,8 +16,11 @@ interface ColumnProps extends ColumnBarBaseProps {
|
|
|
17
16
|
|
|
18
17
|
width?: number;
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
/** Selection configuration. */
|
|
20
|
+
selection?: Config;
|
|
21
|
+
|
|
22
|
+
/** Tooltip configuration. For more info see Tooltips. */
|
|
23
|
+
tooltip?: Cx.StringProp | Cx.StructuredProp;
|
|
22
24
|
|
|
23
25
|
/** Minimum column size in pixels. Useful for indicating very small values. Default value is 0.5. */
|
|
24
26
|
minPixelHeight?: number;
|
package/src/charts/Column.js
CHANGED
|
@@ -62,7 +62,7 @@ export class Column extends ColumnBarBase {
|
|
|
62
62
|
var y2 = data.stacked ? instance.yAxis.stack(data.stack, data.x, data.y) : instance.yAxis.map(data.y);
|
|
63
63
|
|
|
64
64
|
if (Math.abs(y2 - y1) < this.minPixelHeight) {
|
|
65
|
-
if (y1
|
|
65
|
+
if (y1 < y2) y2 = y1 + this.minPixelHeight;
|
|
66
66
|
else y2 = y1 - this.minPixelHeight;
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -30,6 +30,7 @@ export class ColumnBarBase extends PureContainer {
|
|
|
30
30
|
offset: undefined,
|
|
31
31
|
hoverId: undefined,
|
|
32
32
|
borderRadius: undefined,
|
|
33
|
+
hidden: undefined,
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
36
|
|
|
@@ -120,30 +121,32 @@ export class ColumnBarBase extends PureContainer {
|
|
|
120
121
|
|
|
121
122
|
return (
|
|
122
123
|
<g className={data.classNames} key={key}>
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
onMouseMove(e
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
onMouseLeave(e
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
124
|
+
{!data.hidden && (
|
|
125
|
+
<rect
|
|
126
|
+
className={this.CSS.element(this.baseClass, "rect", stateMods)}
|
|
127
|
+
style={data.style}
|
|
128
|
+
x={bounds.l}
|
|
129
|
+
y={bounds.t}
|
|
130
|
+
width={bounds.width()}
|
|
131
|
+
height={bounds.height()}
|
|
132
|
+
rx={data.borderRadius}
|
|
133
|
+
onMouseMove={(e) => {
|
|
134
|
+
onMouseMove(e, instance);
|
|
135
|
+
tooltipMouseMove(e, instance, this.tooltip);
|
|
136
|
+
}}
|
|
137
|
+
onMouseLeave={(e) => {
|
|
138
|
+
onMouseLeave(e, instance);
|
|
139
|
+
tooltipMouseLeave(e, instance, this.tooltip);
|
|
140
|
+
}}
|
|
141
|
+
onClick={(e) => {
|
|
142
|
+
this.handleClick(e, instance);
|
|
143
|
+
}}
|
|
144
|
+
/>
|
|
145
|
+
)}
|
|
143
146
|
{this.renderChildren(context, instance)}
|
|
144
147
|
</g>
|
|
145
148
|
);
|
|
146
|
-
}
|
|
149
|
+
},
|
|
147
150
|
);
|
|
148
151
|
}
|
|
149
152
|
|
|
@@ -170,3 +173,4 @@ ColumnBarBase.prototype.legendShape = "rect";
|
|
|
170
173
|
ColumnBarBase.prototype.styled = true;
|
|
171
174
|
ColumnBarBase.prototype.hoverChannel = "default";
|
|
172
175
|
ColumnBarBase.prototype.borderRadius = 0;
|
|
176
|
+
ColumnBarBase.prototype.hidden = false;
|
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
import * as Cx from
|
|
1
|
+
import * as Cx from "../core";
|
|
2
2
|
|
|
3
3
|
interface LegendEntryProps extends Cx.HtmlElementProps {
|
|
4
|
-
|
|
5
4
|
/** Indicate that entry is selected. */
|
|
6
|
-
selected?: Cx.BooleanProp
|
|
5
|
+
selected?: Cx.BooleanProp;
|
|
7
6
|
|
|
8
7
|
/** Shape of the symbol. `square`, `circle`, `triangle` etc. */
|
|
9
|
-
shape?: Cx.StringProp
|
|
8
|
+
shape?: Cx.StringProp;
|
|
10
9
|
|
|
11
10
|
/** Size of the symbol in pixels. Default value is `18`. */
|
|
12
|
-
size?: Cx.NumberProp
|
|
11
|
+
size?: Cx.NumberProp;
|
|
13
12
|
|
|
14
13
|
/** Index of a color from the standard palette of colors. 0-15. */
|
|
15
|
-
colorIndex?: Cx.NumberProp
|
|
14
|
+
colorIndex?: Cx.NumberProp;
|
|
16
15
|
|
|
17
16
|
/** Used to automatically assign a color based on the `name` and the contextual `ColorMap` widget. */
|
|
18
|
-
colorMap?: Cx.StringProp
|
|
17
|
+
colorMap?: Cx.StringProp;
|
|
19
18
|
|
|
20
19
|
/** Name used to resolve the color. If not provided, `name` is used instead. */
|
|
21
|
-
colorName?: Cx.StringProp
|
|
20
|
+
colorName?: Cx.StringProp;
|
|
22
21
|
|
|
23
22
|
/** Name of the item as it will appear in the legend. */
|
|
24
|
-
name?: Cx.StringProp
|
|
23
|
+
name?: Cx.StringProp;
|
|
25
24
|
|
|
26
25
|
/** Used to indicate if an item is active or not. Inactive items are shown only in the legend. */
|
|
27
|
-
active?: Cx.BooleanProp
|
|
26
|
+
active?: Cx.BooleanProp;
|
|
28
27
|
|
|
29
28
|
/** Base CSS class to be applied to the element. No class is applied by default. */
|
|
30
|
-
baseClass?: string
|
|
29
|
+
baseClass?: string;
|
|
31
30
|
|
|
32
|
-
legendAction?: string
|
|
31
|
+
legendAction?: string;
|
|
33
32
|
|
|
34
33
|
/** Size of the svg shape container in pixels. Default value is 20. */
|
|
35
34
|
svgSize?: number;
|
|
@@ -47,6 +46,9 @@ interface LegendEntryProps extends Cx.HtmlElementProps {
|
|
|
47
46
|
* If unit is not specified, it defaults to `px`.
|
|
48
47
|
*/
|
|
49
48
|
ry?: Cx.StringProp | Cx.NumberProp;
|
|
49
|
+
|
|
50
|
+
/** Selection configuration. */
|
|
51
|
+
selection?: Cx.Config;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
|
-
export class LegendEntry extends Cx.Widget<LegendEntryProps> {}
|
|
54
|
+
export class LegendEntry extends Cx.Widget<LegendEntryProps> {}
|
package/src/widgets/grid/Grid.js
CHANGED
|
@@ -657,7 +657,6 @@ export class Grid extends Container {
|
|
|
657
657
|
|
|
658
658
|
if (hdwidget.sortable && header.widget.allowSorting) {
|
|
659
659
|
mods.push("sortable");
|
|
660
|
-
|
|
661
660
|
if (data.sorters && data.sorters[0].field == (hdwidget.sortField || hdwidget.field)) {
|
|
662
661
|
mods.push("sorted-" + data.sorters[0].direction.toLowerCase());
|
|
663
662
|
sortIcon = <DropDownIcon className={CSS.element(baseClass, "column-sort-icon")} />;
|
|
@@ -860,6 +859,8 @@ export class Grid extends Container {
|
|
|
860
859
|
]
|
|
861
860
|
: null;
|
|
862
861
|
|
|
862
|
+
if (sorters == null) field = null;
|
|
863
|
+
|
|
863
864
|
instance.set("sorters", sorters);
|
|
864
865
|
instance.set("sortField", field);
|
|
865
866
|
instance.set("sortDirection", direction);
|