cx 25.10.0 → 25.10.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/LICENSE-THIRD-PARTY.md +91 -91
- package/LICENSE.md +7 -7
- package/README.md +46 -46
- package/dist/manifest.js +570 -570
- package/dist/ui.js +1 -3
- package/package.json +1 -1
- package/src/charts/Bar.d.ts +27 -27
- package/src/charts/BarGraph.d.ts +15 -15
- package/src/charts/Chart.d.ts +12 -12
- package/src/charts/ColorMap.d.ts +21 -21
- package/src/charts/Column.d.ts +29 -29
- package/src/charts/ColumnBarBase.d.ts +64 -64
- package/src/charts/ColumnBarGraphBase.d.ts +73 -73
- package/src/charts/ColumnGraph.d.ts +18 -18
- package/src/charts/Gridlines.d.ts +24 -24
- package/src/charts/Legend.d.ts +45 -45
- package/src/charts/LegendEntry.d.ts +54 -54
- package/src/charts/LineGraph.d.ts +101 -101
- package/src/charts/Marker.d.ts +110 -110
- package/src/charts/MarkerLine.d.ts +56 -56
- package/src/charts/MouseTracker.d.ts +16 -16
- package/src/charts/PieChart.d.ts +92 -92
- package/src/charts/PieLabel.d.ts +26 -26
- package/src/charts/PieLabelsContainer.d.ts +6 -6
- package/src/charts/Range.d.ts +74 -74
- package/src/charts/RangeMarker.d.ts +35 -35
- package/src/charts/ScatterGraph.d.ts +64 -64
- package/src/charts/Swimlane.d.ts +24 -24
- package/src/charts/Swimlanes.d.ts +41 -41
- package/src/charts/axis/Axis.d.ts +113 -113
- package/src/charts/axis/Axis.scss +22 -22
- package/src/charts/axis/CategoryAxis.d.ts +30 -30
- package/src/charts/axis/NumericAxis.d.ts +46 -46
- package/src/charts/axis/Stack.d.ts +10 -10
- package/src/charts/axis/TimeAxis.d.ts +31 -31
- package/src/charts/axis/index.d.ts +3 -3
- package/src/charts/axis/index.scss +5 -5
- package/src/charts/axis/variables.scss +2 -2
- package/src/charts/helpers/MinMaxFinder.d.ts +22 -22
- package/src/charts/helpers/PointReducer.d.ts +24 -24
- package/src/charts/helpers/SnapPointFinder.d.ts +30 -30
- package/src/charts/helpers/ValueAtFinder.d.ts +16 -16
- package/src/charts/helpers/index.d.ts +4 -4
- package/src/charts/index.d.ts +27 -27
- package/src/charts/index.scss +22 -22
- package/src/charts/shapes.d.ts +22 -22
- package/src/global.scss +13 -13
- package/src/index.scss +6 -6
- package/src/svg/index.scss +8 -8
- package/src/ui/Instance.js +1 -4
- package/src/ui/index.scss +2 -2
- package/src/ui/layout/index.scss +3 -3
- package/src/ui/layout/variables.scss +2 -2
- package/src/ui/variables.scss +1 -1
- package/src/util/call-once.scss +6 -6
- package/src/util/index.scss +10 -10
- package/src/util/scss/divide.scss +3 -3
- package/src/util/scss/index.scss +9 -9
- package/src/variables.scss +217 -217
- package/src/widgets/AccessorBindings.spec.tsx +66 -66
- package/src/widgets/Button.d.ts +58 -58
- package/src/widgets/CxCredit.d.ts +12 -12
- package/src/widgets/DocumentTitle.d.ts +11 -11
- package/src/widgets/FlexBox.d.ts +69 -69
- package/src/widgets/Heading.d.ts +16 -16
- package/src/widgets/HighlightedSearchText.d.ts +9 -9
- package/src/widgets/HtmlElement.d.ts +30 -30
- package/src/widgets/Icon.d.ts +34 -34
- package/src/widgets/ProgressBar.d.ts +17 -17
- package/src/widgets/Resizer.d.ts +27 -27
- package/src/widgets/Sandbox.d.ts +18 -18
- package/src/widgets/Section.d.ts +52 -52
- package/src/widgets/animations.scss +10 -10
- package/src/widgets/autoFocus.d.ts +1 -1
- package/src/widgets/cx.d.ts +1 -1
- package/src/widgets/drag-drop/DragSource.d.ts +45 -45
- package/src/widgets/drag-drop/DropZone.d.ts +98 -98
- package/src/widgets/drag-drop/index.d.ts +4 -4
- package/src/widgets/drag-drop/index.scss +3 -3
- package/src/widgets/drag-drop/ops.d.ts +56 -56
- package/src/widgets/enableAllInternalDependencies.d.ts +1 -1
- package/src/widgets/form/Calendar.variables.scss +63 -63
- package/src/widgets/form/Checkbox.variables.scss +39 -39
- package/src/widgets/form/ColorPicker.variables.scss +22 -22
- package/src/widgets/form/Radio.variables.scss +45 -45
- package/src/widgets/form/index.scss +24 -24
- package/src/widgets/grid/Grid.d.ts +442 -442
- package/src/widgets/grid/GridCell.d.ts +38 -38
- package/src/widgets/grid/Pagination.d.ts +14 -14
- package/src/widgets/grid/TreeNode.d.ts +23 -23
- package/src/widgets/grid/index.d.ts +3 -3
- package/src/widgets/grid/index.scss +3 -3
- package/src/widgets/icons/arrow-down.svg +3 -3
- package/src/widgets/icons/arrow-right.svg +2 -2
- package/src/widgets/icons/base.svg +104 -104
- package/src/widgets/icons/calendar-old.svg +169 -169
- package/src/widgets/icons/calendar.svg +187 -187
- package/src/widgets/icons/clear.svg +74 -74
- package/src/widgets/icons/close.svg +74 -74
- package/src/widgets/icons/dropdown-arrow.svg +61 -61
- package/src/widgets/icons/file.svg +4 -4
- package/src/widgets/icons/folder-open.svg +5 -5
- package/src/widgets/icons/folder.svg +58 -58
- package/src/widgets/icons/forward.svg +67 -67
- package/src/widgets/icons/loading.svg +4 -4
- package/src/widgets/icons/search.svg +107 -107
- package/src/widgets/icons/sort-asc.svg +3 -3
- package/src/widgets/index.d.ts +55 -55
- package/src/widgets/index.scss +16 -16
- package/src/widgets/nav/Link.d.ts +26 -26
- package/src/widgets/nav/LinkButton.d.ts +34 -34
- package/src/widgets/nav/Menu.d.ts +27 -27
- package/src/widgets/nav/MenuItem.d.ts +31 -31
- package/src/widgets/nav/MenuSpacer.d.ts +5 -5
- package/src/widgets/nav/RedirectRoute.d.ts +9 -9
- package/src/widgets/nav/Route.d.ts +21 -21
- package/src/widgets/nav/Scroller.d.ts +17 -17
- package/src/widgets/nav/Submenu.d.ts +6 -6
- package/src/widgets/nav/Tab.d.ts +33 -33
- package/src/widgets/nav/Tab.variables.scss +84 -84
- package/src/widgets/nav/index.d.ts +10 -10
- package/src/widgets/nav/index.scss +5 -5
- package/src/widgets/overlay/ContextMenu.d.ts +10 -10
- package/src/widgets/overlay/Dropdown.d.ts +32 -32
- package/src/widgets/overlay/FlyweightTooltipTracker.d.ts +8 -8
- package/src/widgets/overlay/MsgBox.d.ts +16 -16
- package/src/widgets/overlay/Overlay.d.ts +73 -73
- package/src/widgets/overlay/Toast.d.ts +30 -30
- package/src/widgets/overlay/Tooltip.d.ts +50 -50
- package/src/widgets/overlay/Window.d.ts +42 -42
- package/src/widgets/overlay/Window.variables.scss +62 -62
- package/src/widgets/overlay/alerts.d.ts +7 -7
- package/src/widgets/overlay/captureMouse.d.ts +53 -53
- package/src/widgets/overlay/captureMouse.scss +13 -13
- package/src/widgets/overlay/createHotPromiseWindowFactory.d.ts +18 -18
- package/src/widgets/overlay/index.d.ts +11 -11
- package/src/widgets/overlay/index.scss +15 -15
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import * as Cx from "../core";
|
|
2
|
-
import { PropertySelection, KeySelection } from "../ui/selection";
|
|
3
|
-
|
|
4
|
-
interface ScatterGraphProps extends Cx.StyledContainerProps {
|
|
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
|
-
/** Size (width) of the column in axis units. */
|
|
12
|
-
size?: Cx.NumberProp;
|
|
13
|
-
|
|
14
|
-
shape?: Cx.StringProp;
|
|
15
|
-
|
|
16
|
-
/** Index of a color from the standard palette of colors. 0-15. */
|
|
17
|
-
colorIndex?: Cx.NumberProp;
|
|
18
|
-
|
|
19
|
-
/** Used to automatically assign a color based on the `name` and the contextual `ColorMap` widget. */
|
|
20
|
-
colorMap?: Cx.StringProp;
|
|
21
|
-
|
|
22
|
-
/** Name used to resolve the color. If not provided, `name` is used instead. */
|
|
23
|
-
colorName?: Cx.StringProp;
|
|
24
|
-
|
|
25
|
-
/** Name of the item as it will appear in the legend. */
|
|
26
|
-
name?: Cx.StringProp;
|
|
27
|
-
|
|
28
|
-
/** Used to indicate if an item is active or not. Inactive items are shown only in the legend. */
|
|
29
|
-
active?: Cx.BooleanProp;
|
|
30
|
-
|
|
31
|
-
/** Base CSS class to be applied to the element. Defaults to `scattergraph`. */
|
|
32
|
-
baseClass?: string;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Name of the horizontal axis. The value should match one of the horizontal axes set
|
|
36
|
-
* in the `axes` configuration of the parent `Chart` component. Default value is `x`.
|
|
37
|
-
*/
|
|
38
|
-
xAxis?: string;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Name of the vertical axis. The value should match one of the vertical axes set
|
|
42
|
-
* in the `axes` configuration if the parent `Chart` component. Default value is `y`.
|
|
43
|
-
*/
|
|
44
|
-
yAxis?: string;
|
|
45
|
-
|
|
46
|
-
/** Name of the property which holds the x value. Default value is `x`. */
|
|
47
|
-
xField?: string;
|
|
48
|
-
|
|
49
|
-
/** Name of the property which holds the y value. Default value is `y`. */
|
|
50
|
-
yField?: string;
|
|
51
|
-
|
|
52
|
-
/** Name of the property which holds the size value. Do not set if `size` is used. */
|
|
53
|
-
sizeField?: string | false;
|
|
54
|
-
|
|
55
|
-
/** Name of the legend to be used. Default is `legend`. Set to `false` to hide the legend entry. */
|
|
56
|
-
legend?: string | false;
|
|
57
|
-
|
|
58
|
-
legendAction?: string;
|
|
59
|
-
|
|
60
|
-
/** Selection configuration. */
|
|
61
|
-
selection?: { type: typeof PropertySelection | typeof KeySelection; [prop: string]: any };
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export class ScatterGraph extends Cx.Widget<ScatterGraphProps> {}
|
|
1
|
+
import * as Cx from "../core";
|
|
2
|
+
import { PropertySelection, KeySelection } from "../ui/selection";
|
|
3
|
+
|
|
4
|
+
interface ScatterGraphProps extends Cx.StyledContainerProps {
|
|
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
|
+
/** Size (width) of the column in axis units. */
|
|
12
|
+
size?: Cx.NumberProp;
|
|
13
|
+
|
|
14
|
+
shape?: Cx.StringProp;
|
|
15
|
+
|
|
16
|
+
/** Index of a color from the standard palette of colors. 0-15. */
|
|
17
|
+
colorIndex?: Cx.NumberProp;
|
|
18
|
+
|
|
19
|
+
/** Used to automatically assign a color based on the `name` and the contextual `ColorMap` widget. */
|
|
20
|
+
colorMap?: Cx.StringProp;
|
|
21
|
+
|
|
22
|
+
/** Name used to resolve the color. If not provided, `name` is used instead. */
|
|
23
|
+
colorName?: Cx.StringProp;
|
|
24
|
+
|
|
25
|
+
/** Name of the item as it will appear in the legend. */
|
|
26
|
+
name?: Cx.StringProp;
|
|
27
|
+
|
|
28
|
+
/** Used to indicate if an item is active or not. Inactive items are shown only in the legend. */
|
|
29
|
+
active?: Cx.BooleanProp;
|
|
30
|
+
|
|
31
|
+
/** Base CSS class to be applied to the element. Defaults to `scattergraph`. */
|
|
32
|
+
baseClass?: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Name of the horizontal axis. The value should match one of the horizontal axes set
|
|
36
|
+
* in the `axes` configuration of the parent `Chart` component. Default value is `x`.
|
|
37
|
+
*/
|
|
38
|
+
xAxis?: string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Name of the vertical axis. The value should match one of the vertical axes set
|
|
42
|
+
* in the `axes` configuration if the parent `Chart` component. Default value is `y`.
|
|
43
|
+
*/
|
|
44
|
+
yAxis?: string;
|
|
45
|
+
|
|
46
|
+
/** Name of the property which holds the x value. Default value is `x`. */
|
|
47
|
+
xField?: string;
|
|
48
|
+
|
|
49
|
+
/** Name of the property which holds the y value. Default value is `y`. */
|
|
50
|
+
yField?: string;
|
|
51
|
+
|
|
52
|
+
/** Name of the property which holds the size value. Do not set if `size` is used. */
|
|
53
|
+
sizeField?: string | false;
|
|
54
|
+
|
|
55
|
+
/** Name of the legend to be used. Default is `legend`. Set to `false` to hide the legend entry. */
|
|
56
|
+
legend?: string | false;
|
|
57
|
+
|
|
58
|
+
legendAction?: string;
|
|
59
|
+
|
|
60
|
+
/** Selection configuration. */
|
|
61
|
+
selection?: { type: typeof PropertySelection | typeof KeySelection; [prop: string]: any };
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export class ScatterGraph extends Cx.Widget<ScatterGraphProps> {}
|
package/src/charts/Swimlane.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import * as Cx from "../core";
|
|
2
|
-
import { BoundedObjectProps } from "../svg";
|
|
3
|
-
|
|
4
|
-
interface SwimlaneProps extends BoundedObjectProps {
|
|
5
|
-
/** The `x` value binding or expression. */
|
|
6
|
-
x?: Cx.Prop<string | number>;
|
|
7
|
-
|
|
8
|
-
/** The `y` value binding or expression. */
|
|
9
|
-
y?: Cx.Prop<string | number>;
|
|
10
|
-
|
|
11
|
-
/** Represents a swimlane size. */
|
|
12
|
-
size?: Cx.NumberProp;
|
|
13
|
-
|
|
14
|
-
/** Switch to vertical swimlanes. */
|
|
15
|
-
vertical?: boolean;
|
|
16
|
-
|
|
17
|
-
/**The laneOffset property adjusts the positioning of lane elements, enhancing their alignment and readability. */
|
|
18
|
-
laneOffset?: Cx.NumberProp;
|
|
19
|
-
|
|
20
|
-
/** Style object applied to the swimlanes. */
|
|
21
|
-
laneStyle?: StyleProp;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export class Swimlane extends Cx.Widget<SwimlaneProps> {}
|
|
1
|
+
import * as Cx from "../core";
|
|
2
|
+
import { BoundedObjectProps } from "../svg";
|
|
3
|
+
|
|
4
|
+
interface SwimlaneProps extends BoundedObjectProps {
|
|
5
|
+
/** The `x` value binding or expression. */
|
|
6
|
+
x?: Cx.Prop<string | number>;
|
|
7
|
+
|
|
8
|
+
/** The `y` value binding or expression. */
|
|
9
|
+
y?: Cx.Prop<string | number>;
|
|
10
|
+
|
|
11
|
+
/** Represents a swimlane size. */
|
|
12
|
+
size?: Cx.NumberProp;
|
|
13
|
+
|
|
14
|
+
/** Switch to vertical swimlanes. */
|
|
15
|
+
vertical?: boolean;
|
|
16
|
+
|
|
17
|
+
/**The laneOffset property adjusts the positioning of lane elements, enhancing their alignment and readability. */
|
|
18
|
+
laneOffset?: Cx.NumberProp;
|
|
19
|
+
|
|
20
|
+
/** Style object applied to the swimlanes. */
|
|
21
|
+
laneStyle?: StyleProp;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export class Swimlane extends Cx.Widget<SwimlaneProps> {}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import * as Cx from "../core";
|
|
2
|
-
import { BoundedObject, BoundedObjectProps } from "../svg/BoundedObject";
|
|
3
|
-
|
|
4
|
-
interface SwimlanesProps extends BoundedObjectProps {
|
|
5
|
-
/**
|
|
6
|
-
* Name of the horizontal axis. The value should match one of the horizontal axes set
|
|
7
|
-
* in the `axes` configuration of the parent `Chart` component. Default value is `x`.
|
|
8
|
-
* Set to `false` to hide the grid lines in x direction.
|
|
9
|
-
*/
|
|
10
|
-
xAxis?: string | boolean;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Name of the vertical axis. The value should match one of the vertical axes set
|
|
14
|
-
* in the `axes` configuration if the parent `Chart` component. Default value is `y`.
|
|
15
|
-
* Set to `false` to hide the grid lines in y direction.
|
|
16
|
-
*/
|
|
17
|
-
yAxis?: string | boolean;
|
|
18
|
-
|
|
19
|
-
/** Base CSS class to be applied to the element. Defaults to `swimlanes`. */
|
|
20
|
-
baseClass?: string;
|
|
21
|
-
|
|
22
|
-
/** Represents a swimlane size. */
|
|
23
|
-
size?: Cx.NumberProp;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Represents a swimlane step. Define a step on which a swimlane will be rendered. (eg. step 2 will render
|
|
27
|
-
* every second swimlane in the chart.)
|
|
28
|
-
*/
|
|
29
|
-
step?: Cx.NumberProp;
|
|
30
|
-
|
|
31
|
-
/** Switch to vertical swimlanes. */
|
|
32
|
-
vertical?: boolean;
|
|
33
|
-
|
|
34
|
-
/**The laneOffset property adjusts the positioning of lane elements, enhancing their alignment and readability. */
|
|
35
|
-
laneOffset?: Cx.NumberProp;
|
|
36
|
-
|
|
37
|
-
/** Style object applied to the swimlanes. */
|
|
38
|
-
laneStyle?: StyleProp;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export class Swimlanes extends Cx.Widget<SwimlanesProps> {}
|
|
1
|
+
import * as Cx from "../core";
|
|
2
|
+
import { BoundedObject, BoundedObjectProps } from "../svg/BoundedObject";
|
|
3
|
+
|
|
4
|
+
interface SwimlanesProps extends BoundedObjectProps {
|
|
5
|
+
/**
|
|
6
|
+
* Name of the horizontal axis. The value should match one of the horizontal axes set
|
|
7
|
+
* in the `axes` configuration of the parent `Chart` component. Default value is `x`.
|
|
8
|
+
* Set to `false` to hide the grid lines in x direction.
|
|
9
|
+
*/
|
|
10
|
+
xAxis?: string | boolean;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Name of the vertical axis. The value should match one of the vertical axes set
|
|
14
|
+
* in the `axes` configuration if the parent `Chart` component. Default value is `y`.
|
|
15
|
+
* Set to `false` to hide the grid lines in y direction.
|
|
16
|
+
*/
|
|
17
|
+
yAxis?: string | boolean;
|
|
18
|
+
|
|
19
|
+
/** Base CSS class to be applied to the element. Defaults to `swimlanes`. */
|
|
20
|
+
baseClass?: string;
|
|
21
|
+
|
|
22
|
+
/** Represents a swimlane size. */
|
|
23
|
+
size?: Cx.NumberProp;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Represents a swimlane step. Define a step on which a swimlane will be rendered. (eg. step 2 will render
|
|
27
|
+
* every second swimlane in the chart.)
|
|
28
|
+
*/
|
|
29
|
+
step?: Cx.NumberProp;
|
|
30
|
+
|
|
31
|
+
/** Switch to vertical swimlanes. */
|
|
32
|
+
vertical?: boolean;
|
|
33
|
+
|
|
34
|
+
/**The laneOffset property adjusts the positioning of lane elements, enhancing their alignment and readability. */
|
|
35
|
+
laneOffset?: Cx.NumberProp;
|
|
36
|
+
|
|
37
|
+
/** Style object applied to the swimlanes. */
|
|
38
|
+
laneStyle?: StyleProp;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export class Swimlanes extends Cx.Widget<SwimlanesProps> {}
|
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
import { Instance } from "./../../ui/Instance.d";
|
|
2
|
-
import * as Cx from "../../core";
|
|
3
|
-
import { BoundedObject, BoundedObjectProps } from "../../svg/BoundedObject";
|
|
4
|
-
|
|
5
|
-
export interface AxisProps extends BoundedObjectProps {
|
|
6
|
-
/** Set to `true` for vertical axes. */
|
|
7
|
-
vertical?: boolean;
|
|
8
|
-
|
|
9
|
-
/** Used as a secondary axis. Displayed at the top/right. */
|
|
10
|
-
secondary?: boolean;
|
|
11
|
-
|
|
12
|
-
/** When set to `true`, the values are displayed in descending order. */
|
|
13
|
-
inverted?: Cx.BooleanProp;
|
|
14
|
-
|
|
15
|
-
/** When set to `true`, rendering of visual elements of the axis, such as ticks and labels, is skipped, but their function is preserved. */
|
|
16
|
-
hidden?: boolean;
|
|
17
|
-
|
|
18
|
-
/** Size of the axis tick line. Defaults to 3. */
|
|
19
|
-
tickSize?: number;
|
|
20
|
-
|
|
21
|
-
/** Distance between ticks and the axis. Default is 0. Use negative values for offset to make ticks appear on both sides of the axis. */
|
|
22
|
-
tickOffset?: number;
|
|
23
|
-
|
|
24
|
-
/** The smallest distance between two ticks on the axis. Defaults to 25. */
|
|
25
|
-
minTickDistance?: number;
|
|
26
|
-
|
|
27
|
-
/** The smallest distance between two labels on the vertical axis. Defaults to 40. */
|
|
28
|
-
minLabelDistanceVertical?: number;
|
|
29
|
-
|
|
30
|
-
/** The smallest distance between two labels on the horizontal axis. Defaults to 50. */
|
|
31
|
-
minLabelDistanceHorizontal?: number;
|
|
32
|
-
|
|
33
|
-
/** Distance between labels and the axis. Defaults to 10. */
|
|
34
|
-
labelOffset?: number | string;
|
|
35
|
-
|
|
36
|
-
/** Label rotation angle in degrees. */
|
|
37
|
-
labelRotation?: Cx.Prop<number | string>;
|
|
38
|
-
|
|
39
|
-
/** Label text-anchor value. Allowed values are start, end and middle. Default value is set based on the value of vertical and secondary flags. */
|
|
40
|
-
labelAnchor?: "start" | "end" | "middle" | "auto";
|
|
41
|
-
|
|
42
|
-
/** Horizontal text offset. */
|
|
43
|
-
labelDx?: number | string;
|
|
44
|
-
|
|
45
|
-
/** Vertical text offset which can be used for vertical alignment. */
|
|
46
|
-
labelDy?: number | string;
|
|
47
|
-
|
|
48
|
-
/** Set to `true` to break long labels into multiple lines. Default value is `false`. Text is split at space characters. See also `labelMaxLineLength` and `labelLineCountDyFactor`. */
|
|
49
|
-
labelWrap?: boolean;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Used for vertical adjustment of multi-line labels. Default value is `auto` which means
|
|
53
|
-
* that value is initialized based on axis configuration. Value `0` means that label will grow towards
|
|
54
|
-
* the bottom of the screen. Value `-1` will make labels to grow towards the top of the screen.
|
|
55
|
-
* `-0.5` will make labels vertically centered.
|
|
56
|
-
*/
|
|
57
|
-
labelLineCountDyFactor?: number | string;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Used for vertical adjustment of multi-line labels. Default value is 1 which means
|
|
61
|
-
* that labels are stacked without any space between them. Value of 1.4 will add 40% of the label height as a space between labels.
|
|
62
|
-
*/
|
|
63
|
-
labelLineHeight?: number | string;
|
|
64
|
-
|
|
65
|
-
/** If `labelWrap` is on, this number is used as a measure to split labels into multiple lines. Default value is `10`. */
|
|
66
|
-
labelMaxLineLength?: number;
|
|
67
|
-
|
|
68
|
-
/** Set to true to hide the axis labels. */
|
|
69
|
-
hideLabels?: boolean;
|
|
70
|
-
|
|
71
|
-
/** Set to true to hide the axis line. */
|
|
72
|
-
hideLine?: boolean;
|
|
73
|
-
|
|
74
|
-
/** Set to true to hide the axis ticks. */
|
|
75
|
-
hideTicks?: boolean;
|
|
76
|
-
|
|
77
|
-
/** Additional CSS style to be applied to the axis line. */
|
|
78
|
-
lineStyle?: Cx.StyleProp;
|
|
79
|
-
|
|
80
|
-
/** Additional CSS style to be applied to the axis ticks. */
|
|
81
|
-
tickStyle?: Cx.StyleProp;
|
|
82
|
-
|
|
83
|
-
/** Additional CSS style to be applied to the axis labels. */
|
|
84
|
-
labelStyle?: Cx.StyleProp;
|
|
85
|
-
|
|
86
|
-
/** Additional CSS class to be applied to the axis line. */
|
|
87
|
-
lineClass?: Cx.ClassProp;
|
|
88
|
-
|
|
89
|
-
/** Additional CSS class to be applied to the axis ticks. */
|
|
90
|
-
tickClass?: Cx.ClassProp;
|
|
91
|
-
|
|
92
|
-
/** Additional CSS class to be applied to the axis labels. */
|
|
93
|
-
labelClass?: Cx.ClassProp;
|
|
94
|
-
|
|
95
|
-
onMeasured?: (info: any, instance: Instance) => void;
|
|
96
|
-
|
|
97
|
-
/** A function used to create a formatter function for axis labels. See Complex Labels example in the CxJS documentation for more info. */
|
|
98
|
-
onCreateLabelFormatter?:
|
|
99
|
-
| string
|
|
100
|
-
| ((
|
|
101
|
-
context: any,
|
|
102
|
-
instance: Instance,
|
|
103
|
-
) => (
|
|
104
|
-
formattedValue: string,
|
|
105
|
-
value: any,
|
|
106
|
-
{ tickIndex, serieIndex }: { tickIndex: number; serieIndex: number },
|
|
107
|
-
) => { text: string; style?: any; className?: string }[]);
|
|
108
|
-
|
|
109
|
-
/** Distance between the even labels and the axis. */
|
|
110
|
-
alternateLabelOffset?: number | string;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export class Axis extends BoundedObject {}
|
|
1
|
+
import { Instance } from "./../../ui/Instance.d";
|
|
2
|
+
import * as Cx from "../../core";
|
|
3
|
+
import { BoundedObject, BoundedObjectProps } from "../../svg/BoundedObject";
|
|
4
|
+
|
|
5
|
+
export interface AxisProps extends BoundedObjectProps {
|
|
6
|
+
/** Set to `true` for vertical axes. */
|
|
7
|
+
vertical?: boolean;
|
|
8
|
+
|
|
9
|
+
/** Used as a secondary axis. Displayed at the top/right. */
|
|
10
|
+
secondary?: boolean;
|
|
11
|
+
|
|
12
|
+
/** When set to `true`, the values are displayed in descending order. */
|
|
13
|
+
inverted?: Cx.BooleanProp;
|
|
14
|
+
|
|
15
|
+
/** When set to `true`, rendering of visual elements of the axis, such as ticks and labels, is skipped, but their function is preserved. */
|
|
16
|
+
hidden?: boolean;
|
|
17
|
+
|
|
18
|
+
/** Size of the axis tick line. Defaults to 3. */
|
|
19
|
+
tickSize?: number;
|
|
20
|
+
|
|
21
|
+
/** Distance between ticks and the axis. Default is 0. Use negative values for offset to make ticks appear on both sides of the axis. */
|
|
22
|
+
tickOffset?: number;
|
|
23
|
+
|
|
24
|
+
/** The smallest distance between two ticks on the axis. Defaults to 25. */
|
|
25
|
+
minTickDistance?: number;
|
|
26
|
+
|
|
27
|
+
/** The smallest distance between two labels on the vertical axis. Defaults to 40. */
|
|
28
|
+
minLabelDistanceVertical?: number;
|
|
29
|
+
|
|
30
|
+
/** The smallest distance between two labels on the horizontal axis. Defaults to 50. */
|
|
31
|
+
minLabelDistanceHorizontal?: number;
|
|
32
|
+
|
|
33
|
+
/** Distance between labels and the axis. Defaults to 10. */
|
|
34
|
+
labelOffset?: number | string;
|
|
35
|
+
|
|
36
|
+
/** Label rotation angle in degrees. */
|
|
37
|
+
labelRotation?: Cx.Prop<number | string>;
|
|
38
|
+
|
|
39
|
+
/** Label text-anchor value. Allowed values are start, end and middle. Default value is set based on the value of vertical and secondary flags. */
|
|
40
|
+
labelAnchor?: "start" | "end" | "middle" | "auto";
|
|
41
|
+
|
|
42
|
+
/** Horizontal text offset. */
|
|
43
|
+
labelDx?: number | string;
|
|
44
|
+
|
|
45
|
+
/** Vertical text offset which can be used for vertical alignment. */
|
|
46
|
+
labelDy?: number | string;
|
|
47
|
+
|
|
48
|
+
/** Set to `true` to break long labels into multiple lines. Default value is `false`. Text is split at space characters. See also `labelMaxLineLength` and `labelLineCountDyFactor`. */
|
|
49
|
+
labelWrap?: boolean;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Used for vertical adjustment of multi-line labels. Default value is `auto` which means
|
|
53
|
+
* that value is initialized based on axis configuration. Value `0` means that label will grow towards
|
|
54
|
+
* the bottom of the screen. Value `-1` will make labels to grow towards the top of the screen.
|
|
55
|
+
* `-0.5` will make labels vertically centered.
|
|
56
|
+
*/
|
|
57
|
+
labelLineCountDyFactor?: number | string;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Used for vertical adjustment of multi-line labels. Default value is 1 which means
|
|
61
|
+
* that labels are stacked without any space between them. Value of 1.4 will add 40% of the label height as a space between labels.
|
|
62
|
+
*/
|
|
63
|
+
labelLineHeight?: number | string;
|
|
64
|
+
|
|
65
|
+
/** If `labelWrap` is on, this number is used as a measure to split labels into multiple lines. Default value is `10`. */
|
|
66
|
+
labelMaxLineLength?: number;
|
|
67
|
+
|
|
68
|
+
/** Set to true to hide the axis labels. */
|
|
69
|
+
hideLabels?: boolean;
|
|
70
|
+
|
|
71
|
+
/** Set to true to hide the axis line. */
|
|
72
|
+
hideLine?: boolean;
|
|
73
|
+
|
|
74
|
+
/** Set to true to hide the axis ticks. */
|
|
75
|
+
hideTicks?: boolean;
|
|
76
|
+
|
|
77
|
+
/** Additional CSS style to be applied to the axis line. */
|
|
78
|
+
lineStyle?: Cx.StyleProp;
|
|
79
|
+
|
|
80
|
+
/** Additional CSS style to be applied to the axis ticks. */
|
|
81
|
+
tickStyle?: Cx.StyleProp;
|
|
82
|
+
|
|
83
|
+
/** Additional CSS style to be applied to the axis labels. */
|
|
84
|
+
labelStyle?: Cx.StyleProp;
|
|
85
|
+
|
|
86
|
+
/** Additional CSS class to be applied to the axis line. */
|
|
87
|
+
lineClass?: Cx.ClassProp;
|
|
88
|
+
|
|
89
|
+
/** Additional CSS class to be applied to the axis ticks. */
|
|
90
|
+
tickClass?: Cx.ClassProp;
|
|
91
|
+
|
|
92
|
+
/** Additional CSS class to be applied to the axis labels. */
|
|
93
|
+
labelClass?: Cx.ClassProp;
|
|
94
|
+
|
|
95
|
+
onMeasured?: (info: any, instance: Instance) => void;
|
|
96
|
+
|
|
97
|
+
/** A function used to create a formatter function for axis labels. See Complex Labels example in the CxJS documentation for more info. */
|
|
98
|
+
onCreateLabelFormatter?:
|
|
99
|
+
| string
|
|
100
|
+
| ((
|
|
101
|
+
context: any,
|
|
102
|
+
instance: Instance,
|
|
103
|
+
) => (
|
|
104
|
+
formattedValue: string,
|
|
105
|
+
value: any,
|
|
106
|
+
{ tickIndex, serieIndex }: { tickIndex: number; serieIndex: number },
|
|
107
|
+
) => { text: string; style?: any; className?: string }[]);
|
|
108
|
+
|
|
109
|
+
/** Distance between the even labels and the axis. */
|
|
110
|
+
alternateLabelOffset?: number | string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export class Axis extends BoundedObject {}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
@mixin cxb-axis() {
|
|
3
|
-
shape-rendering: crispEdges;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
@mixin cxe-axis-ticks() {
|
|
7
|
-
stroke: $cx-axis-ticks-stroke;
|
|
8
|
-
stroke-width: 1px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
@mixin cxe-axis-line() {
|
|
12
|
-
stroke: $cx-axis-line-stroke;
|
|
13
|
-
stroke-width: 1px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@mixin cxe-axis-label() {
|
|
17
|
-
font-size: smaller;
|
|
18
|
-
fill: currentColor;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@mixin cxe-axis-label-offset() {
|
|
22
|
-
visibility: hidden;
|
|
1
|
+
|
|
2
|
+
@mixin cxb-axis() {
|
|
3
|
+
shape-rendering: crispEdges;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
@mixin cxe-axis-ticks() {
|
|
7
|
+
stroke: $cx-axis-ticks-stroke;
|
|
8
|
+
stroke-width: 1px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@mixin cxe-axis-line() {
|
|
12
|
+
stroke: $cx-axis-line-stroke;
|
|
13
|
+
stroke-width: 1px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@mixin cxe-axis-label() {
|
|
17
|
+
font-size: smaller;
|
|
18
|
+
fill: currentColor;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@mixin cxe-axis-label-offset() {
|
|
22
|
+
visibility: hidden;
|
|
23
23
|
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import * as Cx from "../../core";
|
|
2
|
-
import { AxisProps } from "./Axis";
|
|
3
|
-
|
|
4
|
-
interface CategoryAxisProps extends AxisProps {
|
|
5
|
-
/** Uniform axes provide exact size and offset for all entries, while non-uniform axes adapt their size and offset to the number of entries under each category. */
|
|
6
|
-
uniform?: Cx.BooleanProp;
|
|
7
|
-
|
|
8
|
-
/** Names corresponding the given `values`. For example, `values` may be 0 .. 11 and `names` could be Jan .. Dec. */
|
|
9
|
-
names?: Cx.Prop<any[] | Cx.Config>;
|
|
10
|
-
|
|
11
|
-
/** Values used to initialize the axis. If an object is provided, keys are used for values and values are used for names. */
|
|
12
|
-
values?: Cx.Prop<any[] | Cx.Config>;
|
|
13
|
-
|
|
14
|
-
/** Sometimes, there is not enough data and each category takes a lot of space. `minSize` can be used to add fake entries up to the specified number, so everything looks normal. */
|
|
15
|
-
minSize?: Cx.NumberProp;
|
|
16
|
-
|
|
17
|
-
/** Base CSS class to be applied to the element. Defaults to `categoryaxis`. */
|
|
18
|
-
baseClass?: string;
|
|
19
|
-
|
|
20
|
-
/** Output value that can be used to calculate chart dimensions based on discovered category values. */
|
|
21
|
-
categoryCount?: Binding | Cx.AccessorChain<number> | Cx.GetSet<number>;
|
|
22
|
-
|
|
23
|
-
/** Set to true to show ticks aligned with gridlines instead of labels. Default is false. */
|
|
24
|
-
useGridlineTicks?: boolean;
|
|
25
|
-
|
|
26
|
-
/** Additional label formatting. No format is set by default, values appear as is. Useful when values are not strings or string values that are too long.*/
|
|
27
|
-
format?: Cx.StringProp;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export class CategoryAxis extends Cx.Widget<CategoryAxisProps> {}
|
|
1
|
+
import * as Cx from "../../core";
|
|
2
|
+
import { AxisProps } from "./Axis";
|
|
3
|
+
|
|
4
|
+
interface CategoryAxisProps extends AxisProps {
|
|
5
|
+
/** Uniform axes provide exact size and offset for all entries, while non-uniform axes adapt their size and offset to the number of entries under each category. */
|
|
6
|
+
uniform?: Cx.BooleanProp;
|
|
7
|
+
|
|
8
|
+
/** Names corresponding the given `values`. For example, `values` may be 0 .. 11 and `names` could be Jan .. Dec. */
|
|
9
|
+
names?: Cx.Prop<any[] | Cx.Config>;
|
|
10
|
+
|
|
11
|
+
/** Values used to initialize the axis. If an object is provided, keys are used for values and values are used for names. */
|
|
12
|
+
values?: Cx.Prop<any[] | Cx.Config>;
|
|
13
|
+
|
|
14
|
+
/** Sometimes, there is not enough data and each category takes a lot of space. `minSize` can be used to add fake entries up to the specified number, so everything looks normal. */
|
|
15
|
+
minSize?: Cx.NumberProp;
|
|
16
|
+
|
|
17
|
+
/** Base CSS class to be applied to the element. Defaults to `categoryaxis`. */
|
|
18
|
+
baseClass?: string;
|
|
19
|
+
|
|
20
|
+
/** Output value that can be used to calculate chart dimensions based on discovered category values. */
|
|
21
|
+
categoryCount?: Binding | Cx.AccessorChain<number> | Cx.GetSet<number>;
|
|
22
|
+
|
|
23
|
+
/** Set to true to show ticks aligned with gridlines instead of labels. Default is false. */
|
|
24
|
+
useGridlineTicks?: boolean;
|
|
25
|
+
|
|
26
|
+
/** Additional label formatting. No format is set by default, values appear as is. Useful when values are not strings or string values that are too long.*/
|
|
27
|
+
format?: Cx.StringProp;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export class CategoryAxis extends Cx.Widget<CategoryAxisProps> {}
|