cx 24.4.6 → 24.4.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/dist/charts.js +1 -0
- package/dist/manifest.js +650 -650
- package/dist/widgets.js +1 -1
- package/package.json +1 -1
- package/src/charts/Chart.js +75 -75
- package/src/charts/ColumnBarBase.d.ts +64 -64
- package/src/charts/ColumnBarGraphBase.d.ts +73 -73
- package/src/charts/Legend.js +1 -0
- package/src/charts/LineGraph.d.ts +92 -92
- package/src/charts/PieLabel.js +71 -71
- package/src/charts/ScatterGraph.d.ts +64 -64
- package/src/charts/axis/Axis.d.ts +96 -96
- package/src/charts/axis/Axis.js +254 -254
- package/src/charts/axis/CategoryAxis.d.ts +24 -24
- package/src/charts/axis/CategoryAxis.js +212 -212
- package/src/data/StringTemplate.spec.js +105 -105
- package/src/data/getAccessor.spec.js +11 -11
- package/src/svg/Text.d.ts +40 -40
- package/src/ui/Controller.d.ts +182 -182
- package/src/ui/Culture.js +129 -129
- package/src/ui/FocusManager.js +171 -171
- package/src/ui/Instance.d.ts +72 -72
- package/src/ui/index.d.ts +42 -42
- package/src/util/Console.d.ts +4 -4
- package/src/widgets/drag-drop/DropZone.js +214 -213
- package/src/widgets/form/UploadButton.d.ts +34 -34
- package/src/widgets/grid/variables.scss +88 -88
package/dist/widgets.js
CHANGED
|
@@ -19323,7 +19323,7 @@ var DropZoneComponent = /*#__PURE__*/ (function (_VDOM$Component) {
|
|
|
19323
19323
|
var nearDistance = widget.nearDistance;
|
|
19324
19324
|
var over = rect.left <= clientX && clientX < rect.right && rect.top <= clientY && clientY < rect.bottom;
|
|
19325
19325
|
return {
|
|
19326
|
-
over: over &&
|
|
19326
|
+
over: over && Math.abs(clientX - (rect.left + rect.right) / 2) + Math.abs(clientY - (rect.top + rect.bottom) / 2),
|
|
19327
19327
|
near: nearDistance && (over || distance < nearDistance),
|
|
19328
19328
|
};
|
|
19329
19329
|
};
|
package/package.json
CHANGED
package/src/charts/Chart.js
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import { Widget, VDOM, getContent } from "../ui/Widget";
|
|
2
|
-
import { BoundedObject } from "../svg/BoundedObject";
|
|
3
|
-
import { Axis } from "./axis/Axis";
|
|
4
|
-
|
|
5
|
-
export class Chart extends BoundedObject {
|
|
6
|
-
init() {
|
|
7
|
-
super.init();
|
|
8
|
-
|
|
9
|
-
if (!this.axes) this.axes = {};
|
|
10
|
-
|
|
11
|
-
for (let axis in this.axes) {
|
|
12
|
-
this.axes[axis] = Axis.create(this.axes[axis]);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
explore(context, instance) {
|
|
17
|
-
instance.calculators = { ...context.axes };
|
|
18
|
-
|
|
19
|
-
context.push("axes", instance.calculators);
|
|
20
|
-
instance.axes = {};
|
|
21
|
-
|
|
22
|
-
//axes need to be registered before children to be processed first
|
|
23
|
-
for (let axis in this.axes) {
|
|
24
|
-
let axisInstance = instance.getChild(context, this.axes[axis]);
|
|
25
|
-
if (axisInstance.scheduleExploreIfVisible(context)) {
|
|
26
|
-
instance.axes[axis] = axisInstance;
|
|
27
|
-
instance.calculators[axis] = this.axes[axis].report(context, axisInstance);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
super.explore(context, instance);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
exploreCleanup(context, instance) {
|
|
35
|
-
context.pop("axes");
|
|
36
|
-
|
|
37
|
-
for (let axis in instance.axes) {
|
|
38
|
-
instance.axes[axis].widget.reportData(context, instance.axes[axis]);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
prepare(context, instance) {
|
|
43
|
-
context.push("axes", instance.calculators);
|
|
44
|
-
super.prepare(context, instance);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
prepareCleanup(context, instance) {
|
|
48
|
-
context.pop("axes");
|
|
49
|
-
super.prepareCleanup(context, instance);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
render(context, instance, key) {
|
|
53
|
-
let axes = [];
|
|
54
|
-
for (let k in instance.axes) {
|
|
55
|
-
axes.push(getContent(instance.axes[k].render(context, key + "-axis-" + k)));
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
let result = [];
|
|
59
|
-
|
|
60
|
-
if (!this.axesOnTop) result.push(axes);
|
|
61
|
-
|
|
62
|
-
result.push(this.renderChildren(context, instance));
|
|
63
|
-
|
|
64
|
-
if (this.axesOnTop) result.push(axes);
|
|
65
|
-
|
|
66
|
-
return result;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
Chart.prototype.anchors = "0 1 1 0";
|
|
71
|
-
Chart.prototype.styled = true;
|
|
72
|
-
Chart.prototype.isPureContainer = true;
|
|
73
|
-
Chart.prototype.axesOnTop = false;
|
|
74
|
-
|
|
75
|
-
Widget.alias("chart", Chart);
|
|
1
|
+
import { Widget, VDOM, getContent } from "../ui/Widget";
|
|
2
|
+
import { BoundedObject } from "../svg/BoundedObject";
|
|
3
|
+
import { Axis } from "./axis/Axis";
|
|
4
|
+
|
|
5
|
+
export class Chart extends BoundedObject {
|
|
6
|
+
init() {
|
|
7
|
+
super.init();
|
|
8
|
+
|
|
9
|
+
if (!this.axes) this.axes = {};
|
|
10
|
+
|
|
11
|
+
for (let axis in this.axes) {
|
|
12
|
+
this.axes[axis] = Axis.create(this.axes[axis]);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
explore(context, instance) {
|
|
17
|
+
instance.calculators = { ...context.axes };
|
|
18
|
+
|
|
19
|
+
context.push("axes", instance.calculators);
|
|
20
|
+
instance.axes = {};
|
|
21
|
+
|
|
22
|
+
//axes need to be registered before children to be processed first
|
|
23
|
+
for (let axis in this.axes) {
|
|
24
|
+
let axisInstance = instance.getChild(context, this.axes[axis]);
|
|
25
|
+
if (axisInstance.scheduleExploreIfVisible(context)) {
|
|
26
|
+
instance.axes[axis] = axisInstance;
|
|
27
|
+
instance.calculators[axis] = this.axes[axis].report(context, axisInstance);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
super.explore(context, instance);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
exploreCleanup(context, instance) {
|
|
35
|
+
context.pop("axes");
|
|
36
|
+
|
|
37
|
+
for (let axis in instance.axes) {
|
|
38
|
+
instance.axes[axis].widget.reportData(context, instance.axes[axis]);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
prepare(context, instance) {
|
|
43
|
+
context.push("axes", instance.calculators);
|
|
44
|
+
super.prepare(context, instance);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
prepareCleanup(context, instance) {
|
|
48
|
+
context.pop("axes");
|
|
49
|
+
super.prepareCleanup(context, instance);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
render(context, instance, key) {
|
|
53
|
+
let axes = [];
|
|
54
|
+
for (let k in instance.axes) {
|
|
55
|
+
axes.push(getContent(instance.axes[k].render(context, key + "-axis-" + k)));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
let result = [];
|
|
59
|
+
|
|
60
|
+
if (!this.axesOnTop) result.push(axes);
|
|
61
|
+
|
|
62
|
+
result.push(this.renderChildren(context, instance));
|
|
63
|
+
|
|
64
|
+
if (this.axesOnTop) result.push(axes);
|
|
65
|
+
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
Chart.prototype.anchors = "0 1 1 0";
|
|
71
|
+
Chart.prototype.styled = true;
|
|
72
|
+
Chart.prototype.isPureContainer = true;
|
|
73
|
+
Chart.prototype.axesOnTop = false;
|
|
74
|
+
|
|
75
|
+
Widget.alias("chart", Chart);
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import * as Cx from "../core";
|
|
2
|
-
|
|
3
|
-
interface ColumnBarBaseProps extends Cx.StyledContainerProps {
|
|
4
|
-
/** The `x` value binding or expression. */
|
|
5
|
-
x?: Cx.Prop<string | number>;
|
|
6
|
-
|
|
7
|
-
/** The `y` value binding or expression. */
|
|
8
|
-
y?: Cx.Prop<string | number>;
|
|
9
|
-
|
|
10
|
-
disabled?: Cx.BooleanProp;
|
|
11
|
-
|
|
12
|
-
/** Index of a color from the standard palette of colors. 0-15. */
|
|
13
|
-
colorIndex?: Cx.NumberProp;
|
|
14
|
-
|
|
15
|
-
/** Used to automatically assign a color based on the `name` and the contextual `ColorMap` widget. */
|
|
16
|
-
colorMap?: Cx.StringProp;
|
|
17
|
-
|
|
18
|
-
/** Name used to resolve the color. If not provided, `name` is used instead. */
|
|
19
|
-
colorName?: Cx.StringProp;
|
|
20
|
-
|
|
21
|
-
/** Name of the item as it will appear in the legend. */
|
|
22
|
-
name?: Cx.StringProp;
|
|
23
|
-
|
|
24
|
-
/** Used to indicate if an item is active or not. Inactive items are shown only in the legend. */
|
|
25
|
-
active?: Cx.BooleanProp;
|
|
26
|
-
|
|
27
|
-
/** Indicate that columns should be stacked on top of the other columns. Default value is `false`. */
|
|
28
|
-
stacked?: Cx.BooleanProp;
|
|
29
|
-
|
|
30
|
-
/** Name of the stack. If multiple stacks are used, each should have a unique name. Default value is `stack`. */
|
|
31
|
-
stack?: Cx.StringProp;
|
|
32
|
-
|
|
33
|
-
/** Of center offset of the column. Use this in combination with `size` to align multiple series on the same chart. */
|
|
34
|
-
offset?: Cx.NumberProp;
|
|
35
|
-
|
|
36
|
-
/** Border radius of the column/bar. */
|
|
37
|
-
borderRadius?: Cx.NumberProp;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Name of the horizontal axis. The value should match one of the horizontal axes set
|
|
41
|
-
* in the `axes` configuration of the parent `Chart` component. Default value is `x`.
|
|
42
|
-
*/
|
|
43
|
-
xAxis?: string;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Name of the vertical axis. The value should match one of the vertical axes set
|
|
47
|
-
* in the `axes` configuration if the parent `Chart` component. Default value is `y`.
|
|
48
|
-
*/
|
|
49
|
-
yAxis?: string;
|
|
50
|
-
|
|
51
|
-
/** Name of the legend to be used. Default is `legend`. Set to `false` to hide the legend entry. */
|
|
52
|
-
legend?: string | false;
|
|
53
|
-
|
|
54
|
-
legendAction?: string;
|
|
55
|
-
legendShape?: string;
|
|
56
|
-
|
|
57
|
-
/** A value used to identify the group of components participating in hover effect synchronization. */
|
|
58
|
-
hoverChannel?: string;
|
|
59
|
-
|
|
60
|
-
/** A value used to uniquely identify the record within the hover sync group. */
|
|
61
|
-
hoverId?: Cx.StringProp;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export class ColumnBarBase extends Cx.Widget<ColumnBarBaseProps> {}
|
|
1
|
+
import * as Cx from "../core";
|
|
2
|
+
|
|
3
|
+
interface ColumnBarBaseProps extends Cx.StyledContainerProps {
|
|
4
|
+
/** The `x` value binding or expression. */
|
|
5
|
+
x?: Cx.Prop<string | number>;
|
|
6
|
+
|
|
7
|
+
/** The `y` value binding or expression. */
|
|
8
|
+
y?: Cx.Prop<string | number>;
|
|
9
|
+
|
|
10
|
+
disabled?: Cx.BooleanProp;
|
|
11
|
+
|
|
12
|
+
/** Index of a color from the standard palette of colors. 0-15. */
|
|
13
|
+
colorIndex?: Cx.NumberProp;
|
|
14
|
+
|
|
15
|
+
/** Used to automatically assign a color based on the `name` and the contextual `ColorMap` widget. */
|
|
16
|
+
colorMap?: Cx.StringProp;
|
|
17
|
+
|
|
18
|
+
/** Name used to resolve the color. If not provided, `name` is used instead. */
|
|
19
|
+
colorName?: Cx.StringProp;
|
|
20
|
+
|
|
21
|
+
/** Name of the item as it will appear in the legend. */
|
|
22
|
+
name?: Cx.StringProp;
|
|
23
|
+
|
|
24
|
+
/** Used to indicate if an item is active or not. Inactive items are shown only in the legend. */
|
|
25
|
+
active?: Cx.BooleanProp;
|
|
26
|
+
|
|
27
|
+
/** Indicate that columns should be stacked on top of the other columns. Default value is `false`. */
|
|
28
|
+
stacked?: Cx.BooleanProp;
|
|
29
|
+
|
|
30
|
+
/** Name of the stack. If multiple stacks are used, each should have a unique name. Default value is `stack`. */
|
|
31
|
+
stack?: Cx.StringProp;
|
|
32
|
+
|
|
33
|
+
/** Of center offset of the column. Use this in combination with `size` to align multiple series on the same chart. */
|
|
34
|
+
offset?: Cx.NumberProp;
|
|
35
|
+
|
|
36
|
+
/** Border radius of the column/bar. */
|
|
37
|
+
borderRadius?: Cx.NumberProp;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Name of the horizontal axis. The value should match one of the horizontal axes set
|
|
41
|
+
* in the `axes` configuration of the parent `Chart` component. Default value is `x`.
|
|
42
|
+
*/
|
|
43
|
+
xAxis?: string;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Name of the vertical axis. The value should match one of the vertical axes set
|
|
47
|
+
* in the `axes` configuration if the parent `Chart` component. Default value is `y`.
|
|
48
|
+
*/
|
|
49
|
+
yAxis?: string;
|
|
50
|
+
|
|
51
|
+
/** Name of the legend to be used. Default is `legend`. Set to `false` to hide the legend entry. */
|
|
52
|
+
legend?: string | false;
|
|
53
|
+
|
|
54
|
+
legendAction?: string;
|
|
55
|
+
legendShape?: string;
|
|
56
|
+
|
|
57
|
+
/** A value used to identify the group of components participating in hover effect synchronization. */
|
|
58
|
+
hoverChannel?: string;
|
|
59
|
+
|
|
60
|
+
/** A value used to uniquely identify the record within the hover sync group. */
|
|
61
|
+
hoverId?: Cx.StringProp;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export class ColumnBarBase extends Cx.Widget<ColumnBarBaseProps> {}
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import * as Cx from "../core";
|
|
2
|
-
import { KeySelection, PropertySelection } from "../ui/selection";
|
|
3
|
-
|
|
4
|
-
interface ColumnBarGraphBaseProps extends Cx.WidgetProps {
|
|
5
|
-
/**
|
|
6
|
-
* Data for the graph. Each entry should be an object with at least two properties
|
|
7
|
-
* whose names should match the `xField` and `yField` values.
|
|
8
|
-
*/
|
|
9
|
-
data?: Cx.RecordsProp;
|
|
10
|
-
|
|
11
|
-
/** Index of a color from the standard palette of colors. 0-15. */
|
|
12
|
-
colorIndex?: Cx.NumberProp;
|
|
13
|
-
|
|
14
|
-
/** Used to automatically assign a color based on the `name` and the contextual `ColorMap` widget. */
|
|
15
|
-
colorMap?: Cx.StringProp;
|
|
16
|
-
|
|
17
|
-
/** Name used to resolve the color. If not provided, `name` is used instead. */
|
|
18
|
-
colorName?: Cx.StringProp;
|
|
19
|
-
|
|
20
|
-
/** Name of the item as it will appear in the legend. */
|
|
21
|
-
name?: Cx.StringProp;
|
|
22
|
-
|
|
23
|
-
/** Size (width) of the column in axis units. */
|
|
24
|
-
size?: Cx.NumberProp;
|
|
25
|
-
|
|
26
|
-
/** Of center offset of the column. Use this in combination with `size` to align multiple series on the same chart. */
|
|
27
|
-
offset?: Cx.NumberProp;
|
|
28
|
-
|
|
29
|
-
/** Set to true to auto-calculate size and offset. Available only if the x axis is a category axis. */
|
|
30
|
-
autoSize?: Cx.BooleanProp;
|
|
31
|
-
|
|
32
|
-
/** Used to indicate if an item is active or not. Inactive items are shown only in the legend. */
|
|
33
|
-
active?: Cx.BooleanProp;
|
|
34
|
-
|
|
35
|
-
/** Indicate that columns should be stacked on top of the other columns. Default value is `false`. */
|
|
36
|
-
stacked?: Cx.BooleanProp;
|
|
37
|
-
|
|
38
|
-
/** Border radius of the column/bar. */
|
|
39
|
-
borderRadius?: Cx.NumberProp;
|
|
40
|
-
|
|
41
|
-
/** Name of the stack. If multiple stacks are used, each should have a unique name. Default value is `stack`. */
|
|
42
|
-
stack?: Cx.StringProp;
|
|
43
|
-
|
|
44
|
-
/** Name of the horizontal axis. The value should match one of the horizontal axes set
|
|
45
|
-
* in the `axes` configuration of the parent `Chart` component. Default value is `x`.
|
|
46
|
-
*/
|
|
47
|
-
xAxis?: string;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Name of the vertical axis. The value should match one of the vertical axes set
|
|
51
|
-
* in the `axes` configuration if the parent `Chart` component. Default value is `y`.
|
|
52
|
-
*/
|
|
53
|
-
yAxis?: string;
|
|
54
|
-
|
|
55
|
-
/** Name of the property which holds the x value. Default value is `x`. */
|
|
56
|
-
xField?: string;
|
|
57
|
-
|
|
58
|
-
/** Name of the property which holds the y value. Default value is `y`. */
|
|
59
|
-
yField?: string;
|
|
60
|
-
|
|
61
|
-
colorIndexField?: boolean;
|
|
62
|
-
|
|
63
|
-
/** Name of the legend to be used. Default is `legend`. Set to `false` to hide the legend entry. */
|
|
64
|
-
legend?: string | false;
|
|
65
|
-
|
|
66
|
-
legendAction?: string;
|
|
67
|
-
legendShape?: string;
|
|
68
|
-
|
|
69
|
-
/** Selection configuration. */
|
|
70
|
-
selection?: { type: typeof PropertySelection | typeof KeySelection; [prop: string]: any };
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export class ColumnBarGraphBase extends Cx.Widget<ColumnBarGraphBaseProps> {}
|
|
1
|
+
import * as Cx from "../core";
|
|
2
|
+
import { KeySelection, PropertySelection } from "../ui/selection";
|
|
3
|
+
|
|
4
|
+
interface ColumnBarGraphBaseProps extends Cx.WidgetProps {
|
|
5
|
+
/**
|
|
6
|
+
* Data for the graph. Each entry should be an object with at least two properties
|
|
7
|
+
* whose names should match the `xField` and `yField` values.
|
|
8
|
+
*/
|
|
9
|
+
data?: Cx.RecordsProp;
|
|
10
|
+
|
|
11
|
+
/** Index of a color from the standard palette of colors. 0-15. */
|
|
12
|
+
colorIndex?: Cx.NumberProp;
|
|
13
|
+
|
|
14
|
+
/** Used to automatically assign a color based on the `name` and the contextual `ColorMap` widget. */
|
|
15
|
+
colorMap?: Cx.StringProp;
|
|
16
|
+
|
|
17
|
+
/** Name used to resolve the color. If not provided, `name` is used instead. */
|
|
18
|
+
colorName?: Cx.StringProp;
|
|
19
|
+
|
|
20
|
+
/** Name of the item as it will appear in the legend. */
|
|
21
|
+
name?: Cx.StringProp;
|
|
22
|
+
|
|
23
|
+
/** Size (width) of the column in axis units. */
|
|
24
|
+
size?: Cx.NumberProp;
|
|
25
|
+
|
|
26
|
+
/** Of center offset of the column. Use this in combination with `size` to align multiple series on the same chart. */
|
|
27
|
+
offset?: Cx.NumberProp;
|
|
28
|
+
|
|
29
|
+
/** Set to true to auto-calculate size and offset. Available only if the x axis is a category axis. */
|
|
30
|
+
autoSize?: Cx.BooleanProp;
|
|
31
|
+
|
|
32
|
+
/** Used to indicate if an item is active or not. Inactive items are shown only in the legend. */
|
|
33
|
+
active?: Cx.BooleanProp;
|
|
34
|
+
|
|
35
|
+
/** Indicate that columns should be stacked on top of the other columns. Default value is `false`. */
|
|
36
|
+
stacked?: Cx.BooleanProp;
|
|
37
|
+
|
|
38
|
+
/** Border radius of the column/bar. */
|
|
39
|
+
borderRadius?: Cx.NumberProp;
|
|
40
|
+
|
|
41
|
+
/** Name of the stack. If multiple stacks are used, each should have a unique name. Default value is `stack`. */
|
|
42
|
+
stack?: Cx.StringProp;
|
|
43
|
+
|
|
44
|
+
/** Name of the horizontal axis. The value should match one of the horizontal axes set
|
|
45
|
+
* in the `axes` configuration of the parent `Chart` component. Default value is `x`.
|
|
46
|
+
*/
|
|
47
|
+
xAxis?: string;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Name of the vertical axis. The value should match one of the vertical axes set
|
|
51
|
+
* in the `axes` configuration if the parent `Chart` component. Default value is `y`.
|
|
52
|
+
*/
|
|
53
|
+
yAxis?: string;
|
|
54
|
+
|
|
55
|
+
/** Name of the property which holds the x value. Default value is `x`. */
|
|
56
|
+
xField?: string;
|
|
57
|
+
|
|
58
|
+
/** Name of the property which holds the y value. Default value is `y`. */
|
|
59
|
+
yField?: string;
|
|
60
|
+
|
|
61
|
+
colorIndexField?: boolean;
|
|
62
|
+
|
|
63
|
+
/** Name of the legend to be used. Default is `legend`. Set to `false` to hide the legend entry. */
|
|
64
|
+
legend?: string | false;
|
|
65
|
+
|
|
66
|
+
legendAction?: string;
|
|
67
|
+
legendShape?: string;
|
|
68
|
+
|
|
69
|
+
/** Selection configuration. */
|
|
70
|
+
selection?: { type: typeof PropertySelection | typeof KeySelection; [prop: string]: any };
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export class ColumnBarGraphBase extends Cx.Widget<ColumnBarGraphBaseProps> {}
|
package/src/charts/Legend.js
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
import * as Cx from "../core";
|
|
2
|
-
|
|
3
|
-
interface LineGraphProps extends Cx.WidgetProps {
|
|
4
|
-
/**
|
|
5
|
-
* Data for the graph. Each entry should be an object with at least two properties
|
|
6
|
-
* whose names should match the `xField` and `yField` values.
|
|
7
|
-
*/
|
|
8
|
-
data?: Cx.RecordsProp;
|
|
9
|
-
|
|
10
|
-
/** Index of a color from the standard palette of colors. 0-15. */
|
|
11
|
-
colorIndex?: Cx.NumberProp;
|
|
12
|
-
|
|
13
|
-
/** Used to automatically assign a color based on the `name` and the contextual `ColorMap` widget. */
|
|
14
|
-
colorMap?: Cx.StringProp;
|
|
15
|
-
|
|
16
|
-
/** Name used to resolve the color. If not provided, `name` is used instead. */
|
|
17
|
-
colorName?: Cx.StringProp;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Additional CSS classes to be applied to the field.
|
|
21
|
-
* If an object is provided, all keys with a "truthy" value will be added to the CSS class list.
|
|
22
|
-
*/
|
|
23
|
-
class?: Cx.ClassProp;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Additional CSS classes to be applied to the field.
|
|
27
|
-
* If an object is provided, all keys with a "truthy" value will be added to the CSS class list.
|
|
28
|
-
*/
|
|
29
|
-
className?: Cx.ClassProp;
|
|
30
|
-
|
|
31
|
-
/** Additional styles to be applied to the line element. */
|
|
32
|
-
lineStyle?: Cx.StyleProp;
|
|
33
|
-
|
|
34
|
-
/** Additional styles to be applied to the area below the line. */
|
|
35
|
-
areaStyle?: Cx.StyleProp;
|
|
36
|
-
|
|
37
|
-
/** Area switch. Default value is `false`. */
|
|
38
|
-
area?: Cx.BooleanProp;
|
|
39
|
-
|
|
40
|
-
/** Line switch. By default, the line is shown. Set to `false` to hide the line and draw only the area. */
|
|
41
|
-
line?: Cx.BooleanProp;
|
|
42
|
-
|
|
43
|
-
/** Base value used for area charts. Default value is `0`. */
|
|
44
|
-
y0?: Cx.NumberProp;
|
|
45
|
-
|
|
46
|
-
/** Name of the item as it will appear in the legend. */
|
|
47
|
-
name?: Cx.StringProp;
|
|
48
|
-
|
|
49
|
-
/** Used to indicate if an item is active or not. Inactive items are shown only in the legend. */
|
|
50
|
-
active?: Cx.BooleanProp;
|
|
51
|
-
|
|
52
|
-
/** Name of the stack. If multiple stacks are used, each should have a unique name. Default value is `stack`. */
|
|
53
|
-
stack?: Cx.StringProp;
|
|
54
|
-
|
|
55
|
-
/** Indicate that columns should be stacked on top of the other columns. Default value is `false`. */
|
|
56
|
-
stacked?: Cx.BooleanProp;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Name of the horizontal axis. The value should match one of the horizontal axes set
|
|
60
|
-
* in the `axes` configuration of the parent `Chart` component. Default value is `x`.
|
|
61
|
-
*/
|
|
62
|
-
xAxis?: string;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Name of the vertical axis. The value should match one of the vertical axes set
|
|
66
|
-
* in the `axes` configuration if the parent `Chart` component. Default value is `y`.
|
|
67
|
-
*/
|
|
68
|
-
yAxis?: string;
|
|
69
|
-
|
|
70
|
-
/** Name of the property which holds the x value. Default value is `x`. */
|
|
71
|
-
xField?: string;
|
|
72
|
-
|
|
73
|
-
/** Name of the property which holds the y value. Default value is `y`. */
|
|
74
|
-
yField?: string;
|
|
75
|
-
|
|
76
|
-
/** Base CSS class to be applied to the element. Defaults to `linegraph`. */
|
|
77
|
-
baseClass?: string;
|
|
78
|
-
|
|
79
|
-
/** Name of the property which holds the y0 value. Default value is `false`, which means y0 value is not read from the data array. */
|
|
80
|
-
y0Field?: string | false;
|
|
81
|
-
|
|
82
|
-
/** Name of the legend to be used. Default is `legend`. Set to `false` to hide the legend entry. */
|
|
83
|
-
legend?: string | false;
|
|
84
|
-
|
|
85
|
-
legendAction?: string;
|
|
86
|
-
legendShape?: string;
|
|
87
|
-
|
|
88
|
-
/** Set to true to avoid forcing the vertical axis to accommodate y0 values. */
|
|
89
|
-
hiddenBase?: boolean;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export class LineGraph extends Cx.Widget<LineGraphProps> {}
|
|
1
|
+
import * as Cx from "../core";
|
|
2
|
+
|
|
3
|
+
interface LineGraphProps extends Cx.WidgetProps {
|
|
4
|
+
/**
|
|
5
|
+
* Data for the graph. Each entry should be an object with at least two properties
|
|
6
|
+
* whose names should match the `xField` and `yField` values.
|
|
7
|
+
*/
|
|
8
|
+
data?: Cx.RecordsProp;
|
|
9
|
+
|
|
10
|
+
/** Index of a color from the standard palette of colors. 0-15. */
|
|
11
|
+
colorIndex?: Cx.NumberProp;
|
|
12
|
+
|
|
13
|
+
/** Used to automatically assign a color based on the `name` and the contextual `ColorMap` widget. */
|
|
14
|
+
colorMap?: Cx.StringProp;
|
|
15
|
+
|
|
16
|
+
/** Name used to resolve the color. If not provided, `name` is used instead. */
|
|
17
|
+
colorName?: Cx.StringProp;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Additional CSS classes to be applied to the field.
|
|
21
|
+
* If an object is provided, all keys with a "truthy" value will be added to the CSS class list.
|
|
22
|
+
*/
|
|
23
|
+
class?: Cx.ClassProp;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Additional CSS classes to be applied to the field.
|
|
27
|
+
* If an object is provided, all keys with a "truthy" value will be added to the CSS class list.
|
|
28
|
+
*/
|
|
29
|
+
className?: Cx.ClassProp;
|
|
30
|
+
|
|
31
|
+
/** Additional styles to be applied to the line element. */
|
|
32
|
+
lineStyle?: Cx.StyleProp;
|
|
33
|
+
|
|
34
|
+
/** Additional styles to be applied to the area below the line. */
|
|
35
|
+
areaStyle?: Cx.StyleProp;
|
|
36
|
+
|
|
37
|
+
/** Area switch. Default value is `false`. */
|
|
38
|
+
area?: Cx.BooleanProp;
|
|
39
|
+
|
|
40
|
+
/** Line switch. By default, the line is shown. Set to `false` to hide the line and draw only the area. */
|
|
41
|
+
line?: Cx.BooleanProp;
|
|
42
|
+
|
|
43
|
+
/** Base value used for area charts. Default value is `0`. */
|
|
44
|
+
y0?: Cx.NumberProp;
|
|
45
|
+
|
|
46
|
+
/** Name of the item as it will appear in the legend. */
|
|
47
|
+
name?: Cx.StringProp;
|
|
48
|
+
|
|
49
|
+
/** Used to indicate if an item is active or not. Inactive items are shown only in the legend. */
|
|
50
|
+
active?: Cx.BooleanProp;
|
|
51
|
+
|
|
52
|
+
/** Name of the stack. If multiple stacks are used, each should have a unique name. Default value is `stack`. */
|
|
53
|
+
stack?: Cx.StringProp;
|
|
54
|
+
|
|
55
|
+
/** Indicate that columns should be stacked on top of the other columns. Default value is `false`. */
|
|
56
|
+
stacked?: Cx.BooleanProp;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Name of the horizontal axis. The value should match one of the horizontal axes set
|
|
60
|
+
* in the `axes` configuration of the parent `Chart` component. Default value is `x`.
|
|
61
|
+
*/
|
|
62
|
+
xAxis?: string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Name of the vertical axis. The value should match one of the vertical axes set
|
|
66
|
+
* in the `axes` configuration if the parent `Chart` component. Default value is `y`.
|
|
67
|
+
*/
|
|
68
|
+
yAxis?: string;
|
|
69
|
+
|
|
70
|
+
/** Name of the property which holds the x value. Default value is `x`. */
|
|
71
|
+
xField?: string;
|
|
72
|
+
|
|
73
|
+
/** Name of the property which holds the y value. Default value is `y`. */
|
|
74
|
+
yField?: string;
|
|
75
|
+
|
|
76
|
+
/** Base CSS class to be applied to the element. Defaults to `linegraph`. */
|
|
77
|
+
baseClass?: string;
|
|
78
|
+
|
|
79
|
+
/** Name of the property which holds the y0 value. Default value is `false`, which means y0 value is not read from the data array. */
|
|
80
|
+
y0Field?: string | false;
|
|
81
|
+
|
|
82
|
+
/** Name of the legend to be used. Default is `legend`. Set to `false` to hide the legend entry. */
|
|
83
|
+
legend?: string | false;
|
|
84
|
+
|
|
85
|
+
legendAction?: string;
|
|
86
|
+
legendShape?: string;
|
|
87
|
+
|
|
88
|
+
/** Set to true to avoid forcing the vertical axis to accommodate y0 values. */
|
|
89
|
+
hiddenBase?: boolean;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export class LineGraph extends Cx.Widget<LineGraphProps> {}
|