cx 25.9.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/charts.js +25 -11
- package/dist/manifest.js +493 -493
- 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.js +8 -0
- 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,46 +1,46 @@
|
|
|
1
|
-
import * as Cx from "../../core";
|
|
2
|
-
import { AxisProps } from "./Axis";
|
|
3
|
-
|
|
4
|
-
interface NumericAxisProps extends AxisProps {
|
|
5
|
-
/** Minimum value. */
|
|
6
|
-
min?: Cx.NumberProp;
|
|
7
|
-
|
|
8
|
-
/** Maximum value. */
|
|
9
|
-
max?: Cx.NumberProp;
|
|
10
|
-
|
|
11
|
-
/** Set to `true` to normalize the input range. */
|
|
12
|
-
normalized?: Cx.BooleanProp;
|
|
13
|
-
|
|
14
|
-
/** Number used to divide values before rendering axis labels. Default value is `1`. */
|
|
15
|
-
labelDivisor?: Cx.NumberProp;
|
|
16
|
-
|
|
17
|
-
/** Base CSS class to be applied to the element. Defaults to `numericaxis`. */
|
|
18
|
-
baseClass?: string;
|
|
19
|
-
|
|
20
|
-
tickDivisions?: Array<number[]>;
|
|
21
|
-
|
|
22
|
-
/** A number ranged between `0-2`. `0` means that the range is aligned with the lowest ticks. Default value is `1`, which means that the range is aligned with medium ticks. Use value `2` to align with major ticks. */
|
|
23
|
-
snapToTicks?: 0 | 1 | 2;
|
|
24
|
-
|
|
25
|
-
/** Value format. Default is `n`. */
|
|
26
|
-
format?: Cx.StringProp;
|
|
27
|
-
|
|
28
|
-
/** Size of a zone reserved for labels for both lower and upper end of the axis. */
|
|
29
|
-
deadZone?: Cx.NumberProp;
|
|
30
|
-
|
|
31
|
-
/** Size of a zone reserved for labels near the upper (higher) end of the axis. */
|
|
32
|
-
upperDeadZone?: Cx.NumberProp;
|
|
33
|
-
|
|
34
|
-
/** Size of a zone reserved for labels near the lower end of the axis. */
|
|
35
|
-
lowerDeadZone?: Cx.NumberProp;
|
|
36
|
-
|
|
37
|
-
/** Specifies minimum value increment between labels. Useful when formatting is not flexible enough, i.e. set to 1 for integer axes to avoid duplicate labels. */
|
|
38
|
-
minLabelTickSize?: number;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export class NumericAxis extends Cx.Widget<NumericAxisProps> {
|
|
42
|
-
static XY(): {
|
|
43
|
-
x: { type: NumericAxis };
|
|
44
|
-
y: { type: NumericAxis; vertical: true };
|
|
45
|
-
};
|
|
46
|
-
}
|
|
1
|
+
import * as Cx from "../../core";
|
|
2
|
+
import { AxisProps } from "./Axis";
|
|
3
|
+
|
|
4
|
+
interface NumericAxisProps extends AxisProps {
|
|
5
|
+
/** Minimum value. */
|
|
6
|
+
min?: Cx.NumberProp;
|
|
7
|
+
|
|
8
|
+
/** Maximum value. */
|
|
9
|
+
max?: Cx.NumberProp;
|
|
10
|
+
|
|
11
|
+
/** Set to `true` to normalize the input range. */
|
|
12
|
+
normalized?: Cx.BooleanProp;
|
|
13
|
+
|
|
14
|
+
/** Number used to divide values before rendering axis labels. Default value is `1`. */
|
|
15
|
+
labelDivisor?: Cx.NumberProp;
|
|
16
|
+
|
|
17
|
+
/** Base CSS class to be applied to the element. Defaults to `numericaxis`. */
|
|
18
|
+
baseClass?: string;
|
|
19
|
+
|
|
20
|
+
tickDivisions?: Array<number[]>;
|
|
21
|
+
|
|
22
|
+
/** A number ranged between `0-2`. `0` means that the range is aligned with the lowest ticks. Default value is `1`, which means that the range is aligned with medium ticks. Use value `2` to align with major ticks. */
|
|
23
|
+
snapToTicks?: 0 | 1 | 2;
|
|
24
|
+
|
|
25
|
+
/** Value format. Default is `n`. */
|
|
26
|
+
format?: Cx.StringProp;
|
|
27
|
+
|
|
28
|
+
/** Size of a zone reserved for labels for both lower and upper end of the axis. */
|
|
29
|
+
deadZone?: Cx.NumberProp;
|
|
30
|
+
|
|
31
|
+
/** Size of a zone reserved for labels near the upper (higher) end of the axis. */
|
|
32
|
+
upperDeadZone?: Cx.NumberProp;
|
|
33
|
+
|
|
34
|
+
/** Size of a zone reserved for labels near the lower end of the axis. */
|
|
35
|
+
lowerDeadZone?: Cx.NumberProp;
|
|
36
|
+
|
|
37
|
+
/** Specifies minimum value increment between labels. Useful when formatting is not flexible enough, i.e. set to 1 for integer axes to avoid duplicate labels. */
|
|
38
|
+
minLabelTickSize?: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export class NumericAxis extends Cx.Widget<NumericAxisProps> {
|
|
42
|
+
static XY(): {
|
|
43
|
+
x: { type: NumericAxis };
|
|
44
|
+
y: { type: NumericAxis; vertical: true };
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export class Stack {
|
|
2
|
-
|
|
3
|
-
reset() : void;
|
|
4
|
-
|
|
5
|
-
acknowledge(ordinal: string, value?: number) : void;
|
|
6
|
-
|
|
7
|
-
measure(normalized: boolean) : [number, number];
|
|
8
|
-
|
|
9
|
-
stack(ordinal: string, value?: number) : number | null;
|
|
10
|
-
|
|
1
|
+
export class Stack {
|
|
2
|
+
|
|
3
|
+
reset() : void;
|
|
4
|
+
|
|
5
|
+
acknowledge(ordinal: string, value?: number) : void;
|
|
6
|
+
|
|
7
|
+
measure(normalized: boolean) : [number, number];
|
|
8
|
+
|
|
9
|
+
stack(ordinal: string, value?: number) : number | null;
|
|
10
|
+
|
|
11
11
|
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import * as Cx from "../../core";
|
|
2
|
-
import { AxisProps } from "./Axis";
|
|
3
|
-
|
|
4
|
-
interface TimeAxisProps extends AxisProps {
|
|
5
|
-
/** Minimum value. */
|
|
6
|
-
min?: Cx.NumberProp;
|
|
7
|
-
|
|
8
|
-
/** Maximum value. */
|
|
9
|
-
max?: Cx.NumberProp;
|
|
10
|
-
|
|
11
|
-
/** Base CSS class to be applied to the element. Defaults to `timeaxis`. */
|
|
12
|
-
baseClass?: string;
|
|
13
|
-
|
|
14
|
-
/** A number ranged between `0-2`. `0` means that the range is aligned with the lowest ticks. Default value is `1`, which means that the range is aligned with medium ticks. Use value `2` to align with major ticks. */
|
|
15
|
-
snapToTicks?: 0 | 1 | 2 | false;
|
|
16
|
-
|
|
17
|
-
tickDivisions?: { [prop: string]: Array<number[]> };
|
|
18
|
-
minLabelDistance?: number;
|
|
19
|
-
minTickUnit?: string;
|
|
20
|
-
|
|
21
|
-
/** Set to true to apply precise label distances from minLabelDistanceFormatOverride based on the resolved label format. */
|
|
22
|
-
useLabelDistanceFormatOverrides?: boolean;
|
|
23
|
-
|
|
24
|
-
/** Mapping of formats to label distances, i.e. { "datetime;YYYYMM": 80 } */
|
|
25
|
-
minLabelDistanceFormatOverride?: Record<string, number>;
|
|
26
|
-
|
|
27
|
-
/** Axis labels format string override. */
|
|
28
|
-
format?: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export class TimeAxis extends Cx.Widget<TimeAxisProps> {}
|
|
1
|
+
import * as Cx from "../../core";
|
|
2
|
+
import { AxisProps } from "./Axis";
|
|
3
|
+
|
|
4
|
+
interface TimeAxisProps extends AxisProps {
|
|
5
|
+
/** Minimum value. */
|
|
6
|
+
min?: Cx.NumberProp;
|
|
7
|
+
|
|
8
|
+
/** Maximum value. */
|
|
9
|
+
max?: Cx.NumberProp;
|
|
10
|
+
|
|
11
|
+
/** Base CSS class to be applied to the element. Defaults to `timeaxis`. */
|
|
12
|
+
baseClass?: string;
|
|
13
|
+
|
|
14
|
+
/** A number ranged between `0-2`. `0` means that the range is aligned with the lowest ticks. Default value is `1`, which means that the range is aligned with medium ticks. Use value `2` to align with major ticks. */
|
|
15
|
+
snapToTicks?: 0 | 1 | 2 | false;
|
|
16
|
+
|
|
17
|
+
tickDivisions?: { [prop: string]: Array<number[]> };
|
|
18
|
+
minLabelDistance?: number;
|
|
19
|
+
minTickUnit?: string;
|
|
20
|
+
|
|
21
|
+
/** Set to true to apply precise label distances from minLabelDistanceFormatOverride based on the resolved label format. */
|
|
22
|
+
useLabelDistanceFormatOverrides?: boolean;
|
|
23
|
+
|
|
24
|
+
/** Mapping of formats to label distances, i.e. { "datetime;YYYYMM": 80 } */
|
|
25
|
+
minLabelDistanceFormatOverride?: Record<string, number>;
|
|
26
|
+
|
|
27
|
+
/** Axis labels format string override. */
|
|
28
|
+
format?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export class TimeAxis extends Cx.Widget<TimeAxisProps> {}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './Axis';
|
|
2
|
-
export * from './NumericAxis';
|
|
3
|
-
export * from './CategoryAxis';
|
|
1
|
+
export * from './Axis';
|
|
2
|
+
export * from './NumericAxis';
|
|
3
|
+
export * from './CategoryAxis';
|
|
4
4
|
export * from './TimeAxis';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
@import 'Axis';
|
|
3
|
-
@import "NumericAxis";
|
|
4
|
-
@import "CategoryAxis";
|
|
5
|
-
@import "TimeAxis";
|
|
1
|
+
|
|
2
|
+
@import 'Axis';
|
|
3
|
+
@import "NumericAxis";
|
|
4
|
+
@import "CategoryAxis";
|
|
5
|
+
@import "TimeAxis";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
$cx-axis-line-stroke: rgba(128, 128, 128, 0.2) !default;
|
|
1
|
+
|
|
2
|
+
$cx-axis-line-stroke: rgba(128, 128, 128, 0.2) !default;
|
|
3
3
|
$cx-axis-ticks-stroke: rgba(128, 128, 128, 0.3) !default;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import * as Cx from "../../core";
|
|
2
|
-
import { PointReducerProps } from "./PointReducer";
|
|
3
|
-
|
|
4
|
-
interface MinMaxFinderProps extends PointReducerProps {
|
|
5
|
-
/* A binding used to receive the x value of the point with the minimum value */
|
|
6
|
-
minX?: Cx.Bind | Cx.AccessorChain<number>;
|
|
7
|
-
|
|
8
|
-
/* A binding used to receive the y value of the point with the minimum value */
|
|
9
|
-
minY?: Cx.Bind | Cx.AccessorChain<number>;
|
|
10
|
-
|
|
11
|
-
/* A binding used to receive the x value of the point with the maximum value */
|
|
12
|
-
maxX?: Cx.Bind | Cx.AccessorChain<number>;
|
|
13
|
-
|
|
14
|
-
/* A binding used to receive the x value of the point with the maximum value */
|
|
15
|
-
maxY?: Cx.Bind | Cx.AccessorChain<number>;
|
|
16
|
-
|
|
17
|
-
/* An object used for filtering data points. Available as accumulator.params inside the onMap function. */
|
|
18
|
-
params?: Cx.StructuredProp;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/** Find minimum and maximum points of a point series */
|
|
22
|
-
export class MinMaxFinder extends Cx.Widget<MinMaxFinderProps> {}
|
|
1
|
+
import * as Cx from "../../core";
|
|
2
|
+
import { PointReducerProps } from "./PointReducer";
|
|
3
|
+
|
|
4
|
+
interface MinMaxFinderProps extends PointReducerProps {
|
|
5
|
+
/* A binding used to receive the x value of the point with the minimum value */
|
|
6
|
+
minX?: Cx.Bind | Cx.AccessorChain<number>;
|
|
7
|
+
|
|
8
|
+
/* A binding used to receive the y value of the point with the minimum value */
|
|
9
|
+
minY?: Cx.Bind | Cx.AccessorChain<number>;
|
|
10
|
+
|
|
11
|
+
/* A binding used to receive the x value of the point with the maximum value */
|
|
12
|
+
maxX?: Cx.Bind | Cx.AccessorChain<number>;
|
|
13
|
+
|
|
14
|
+
/* A binding used to receive the x value of the point with the maximum value */
|
|
15
|
+
maxY?: Cx.Bind | Cx.AccessorChain<number>;
|
|
16
|
+
|
|
17
|
+
/* An object used for filtering data points. Available as accumulator.params inside the onMap function. */
|
|
18
|
+
params?: Cx.StructuredProp;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Find minimum and maximum points of a point series */
|
|
22
|
+
export class MinMaxFinder extends Cx.Widget<MinMaxFinderProps> {}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import * as Cx from "../../core";
|
|
2
|
-
import { Instance } from "../../ui/Instance";
|
|
3
|
-
|
|
4
|
-
export interface PointReducerProps extends Cx.PureContainerProps {
|
|
5
|
-
/** A callback function used to initialize the accumulator. */
|
|
6
|
-
onInitAccumulator?: (accumulator: Cx.Record, instance?: Instance) => void;
|
|
7
|
-
|
|
8
|
-
/** A callback function used to collect information about all data points. */
|
|
9
|
-
onMap?: (accumulator: Cx.Record, x?: number, y?: number, name?: string) => void;
|
|
10
|
-
|
|
11
|
-
/** A callback function used to process accumulated information and write results. */
|
|
12
|
-
onReduce?: (accumulator: Cx.Record, instance?: Instance) => void;
|
|
13
|
-
|
|
14
|
-
/** Parameters that trigger filter predicate re-creation. */
|
|
15
|
-
filterParams?: StructuredProp;
|
|
16
|
-
|
|
17
|
-
/** A callback function used to create a predicate for filtering points. */
|
|
18
|
-
onCreatePointFilter?: (
|
|
19
|
-
filterParams: any,
|
|
20
|
-
instance: Instance,
|
|
21
|
-
) => (x: number, y: number, name: string, data: any, array?: any[], index?: number) => boolean;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export class PointReducer extends Cx.Widget<PointReducerProps> {}
|
|
1
|
+
import * as Cx from "../../core";
|
|
2
|
+
import { Instance } from "../../ui/Instance";
|
|
3
|
+
|
|
4
|
+
export interface PointReducerProps extends Cx.PureContainerProps {
|
|
5
|
+
/** A callback function used to initialize the accumulator. */
|
|
6
|
+
onInitAccumulator?: (accumulator: Cx.Record, instance?: Instance) => void;
|
|
7
|
+
|
|
8
|
+
/** A callback function used to collect information about all data points. */
|
|
9
|
+
onMap?: (accumulator: Cx.Record, x?: number, y?: number, name?: string) => void;
|
|
10
|
+
|
|
11
|
+
/** A callback function used to process accumulated information and write results. */
|
|
12
|
+
onReduce?: (accumulator: Cx.Record, instance?: Instance) => void;
|
|
13
|
+
|
|
14
|
+
/** Parameters that trigger filter predicate re-creation. */
|
|
15
|
+
filterParams?: StructuredProp;
|
|
16
|
+
|
|
17
|
+
/** A callback function used to create a predicate for filtering points. */
|
|
18
|
+
onCreatePointFilter?: (
|
|
19
|
+
filterParams: any,
|
|
20
|
+
instance: Instance,
|
|
21
|
+
) => (x: number, y: number, name: string, data: any, array?: any[], index?: number) => boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export class PointReducer extends Cx.Widget<PointReducerProps> {}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import * as Cx from "../../core";
|
|
2
|
-
import { PointReducerProps } from "./PointReducer";
|
|
3
|
-
|
|
4
|
-
interface SnapPointFinderProps extends PointReducerProps {
|
|
5
|
-
/* Cursor X value. */
|
|
6
|
-
cursorX?: Cx.NumberProp;
|
|
7
|
-
|
|
8
|
-
/* Cursor Y value */
|
|
9
|
-
cursorY?: Cx.NumberProp;
|
|
10
|
-
|
|
11
|
-
/* A binding used to receive the x value of the nearest point.*/
|
|
12
|
-
snapX?: Cx.Bind | Cx.AccessorChain<number> | Cx.AccessorChain<string>;
|
|
13
|
-
|
|
14
|
-
/* A binding used to receive the y value of the nearest point. */
|
|
15
|
-
snapY?: Cx.Bind | Cx.AccessorChain<number> | Cx.AccessorChain<string>;
|
|
16
|
-
|
|
17
|
-
/* A binding used to receive the record prop */
|
|
18
|
-
snapRecord?: Cx.Prop<Cx.Record>;
|
|
19
|
-
|
|
20
|
-
/* Maximum distance between cursor and the snap point. Default value is 50. Adjust accordingly for large distances, e.g. set to Infinity when using TimeAxis */
|
|
21
|
-
maxDistance?: number;
|
|
22
|
-
|
|
23
|
-
/* A function used to convert x values into numeric format. Commonly used with dates. */
|
|
24
|
-
convertX?: (value: number | string) => number;
|
|
25
|
-
|
|
26
|
-
/* A function used to convert y values into numeric format. Commonly used with dates. */
|
|
27
|
-
convertY?: (value: number | string) => number;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export class SnapPointFinder extends Cx.Widget<SnapPointFinderProps> {}
|
|
1
|
+
import * as Cx from "../../core";
|
|
2
|
+
import { PointReducerProps } from "./PointReducer";
|
|
3
|
+
|
|
4
|
+
interface SnapPointFinderProps extends PointReducerProps {
|
|
5
|
+
/* Cursor X value. */
|
|
6
|
+
cursorX?: Cx.NumberProp;
|
|
7
|
+
|
|
8
|
+
/* Cursor Y value */
|
|
9
|
+
cursorY?: Cx.NumberProp;
|
|
10
|
+
|
|
11
|
+
/* A binding used to receive the x value of the nearest point.*/
|
|
12
|
+
snapX?: Cx.Bind | Cx.AccessorChain<number> | Cx.AccessorChain<string>;
|
|
13
|
+
|
|
14
|
+
/* A binding used to receive the y value of the nearest point. */
|
|
15
|
+
snapY?: Cx.Bind | Cx.AccessorChain<number> | Cx.AccessorChain<string>;
|
|
16
|
+
|
|
17
|
+
/* A binding used to receive the record prop */
|
|
18
|
+
snapRecord?: Cx.Prop<Cx.Record>;
|
|
19
|
+
|
|
20
|
+
/* Maximum distance between cursor and the snap point. Default value is 50. Adjust accordingly for large distances, e.g. set to Infinity when using TimeAxis */
|
|
21
|
+
maxDistance?: number;
|
|
22
|
+
|
|
23
|
+
/* A function used to convert x values into numeric format. Commonly used with dates. */
|
|
24
|
+
convertX?: (value: number | string) => number;
|
|
25
|
+
|
|
26
|
+
/* A function used to convert y values into numeric format. Commonly used with dates. */
|
|
27
|
+
convertY?: (value: number | string) => number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export class SnapPointFinder extends Cx.Widget<SnapPointFinderProps> {}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import * as Cx from "../../core";
|
|
2
|
-
import { PointReducerProps } from "./PointReducer";
|
|
3
|
-
|
|
4
|
-
interface ValueAtFinderProps extends PointReducerProps {
|
|
5
|
-
/* X axis probe value. */
|
|
6
|
-
at?: Cx.NumberProp | Cx.StringProp;
|
|
7
|
-
|
|
8
|
-
/* A binding used to receive the measured y axis value */
|
|
9
|
-
value?: Cx.Bind | Cx.AccessorChain<number>;
|
|
10
|
-
|
|
11
|
-
/* A function used to convert x values into numeric format. Commonly used with dates. */
|
|
12
|
-
convert?: (value: number | string) => number;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/** Calculate value at a given point on the graph */
|
|
16
|
-
export class ValueAtFinder extends Cx.Widget<ValueAtFinderProps> {}
|
|
1
|
+
import * as Cx from "../../core";
|
|
2
|
+
import { PointReducerProps } from "./PointReducer";
|
|
3
|
+
|
|
4
|
+
interface ValueAtFinderProps extends PointReducerProps {
|
|
5
|
+
/* X axis probe value. */
|
|
6
|
+
at?: Cx.NumberProp | Cx.StringProp;
|
|
7
|
+
|
|
8
|
+
/* A binding used to receive the measured y axis value */
|
|
9
|
+
value?: Cx.Bind | Cx.AccessorChain<number>;
|
|
10
|
+
|
|
11
|
+
/* A function used to convert x values into numeric format. Commonly used with dates. */
|
|
12
|
+
convert?: (value: number | string) => number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Calculate value at a given point on the graph */
|
|
16
|
+
export class ValueAtFinder extends Cx.Widget<ValueAtFinderProps> {}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './PointReducer';
|
|
2
|
-
export * from './MinMaxFinder';
|
|
3
|
-
export * from './SnapPointFinder';
|
|
4
|
-
export * from './ValueAtFinder';
|
|
1
|
+
export * from './PointReducer';
|
|
2
|
+
export * from './MinMaxFinder';
|
|
3
|
+
export * from './SnapPointFinder';
|
|
4
|
+
export * from './ValueAtFinder';
|
package/src/charts/index.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
export * from "./Chart";
|
|
2
|
-
export * from "./PieChart";
|
|
3
|
-
export * from "./Pie";
|
|
4
|
-
export * from "./PieLabel";
|
|
5
|
-
export * from "./PieLabelsContainer";
|
|
6
|
-
export * from "./Column";
|
|
7
|
-
export * from "./Bar";
|
|
8
|
-
export * from "./Legend";
|
|
9
|
-
export * from "./LegendEntry";
|
|
10
|
-
export * from "./ColorMap";
|
|
11
|
-
export * from "./Marker";
|
|
12
|
-
export * from "./MarkerLine";
|
|
13
|
-
export * from "./Range";
|
|
14
|
-
export * from "./Gridlines";
|
|
15
|
-
export * from "./Swimlanes";
|
|
16
|
-
export * from "./LineGraph";
|
|
17
|
-
export * from "./ColumnGraph";
|
|
18
|
-
export * from "./BarGraph";
|
|
19
|
-
export * from "./ScatterGraph";
|
|
20
|
-
export * from "./BubbleGraph";
|
|
21
|
-
export * from "./shapes";
|
|
22
|
-
export * from "./MouseTracker";
|
|
23
|
-
export * from "./RangeMarker";
|
|
24
|
-
export * from "./Swimlane";
|
|
25
|
-
|
|
26
|
-
export * from "./axis/index";
|
|
27
|
-
export * from "./helpers/index";
|
|
1
|
+
export * from "./Chart";
|
|
2
|
+
export * from "./PieChart";
|
|
3
|
+
export * from "./Pie";
|
|
4
|
+
export * from "./PieLabel";
|
|
5
|
+
export * from "./PieLabelsContainer";
|
|
6
|
+
export * from "./Column";
|
|
7
|
+
export * from "./Bar";
|
|
8
|
+
export * from "./Legend";
|
|
9
|
+
export * from "./LegendEntry";
|
|
10
|
+
export * from "./ColorMap";
|
|
11
|
+
export * from "./Marker";
|
|
12
|
+
export * from "./MarkerLine";
|
|
13
|
+
export * from "./Range";
|
|
14
|
+
export * from "./Gridlines";
|
|
15
|
+
export * from "./Swimlanes";
|
|
16
|
+
export * from "./LineGraph";
|
|
17
|
+
export * from "./ColumnGraph";
|
|
18
|
+
export * from "./BarGraph";
|
|
19
|
+
export * from "./ScatterGraph";
|
|
20
|
+
export * from "./BubbleGraph";
|
|
21
|
+
export * from "./shapes";
|
|
22
|
+
export * from "./MouseTracker";
|
|
23
|
+
export * from "./RangeMarker";
|
|
24
|
+
export * from "./Swimlane";
|
|
25
|
+
|
|
26
|
+
export * from "./axis/index";
|
|
27
|
+
export * from "./helpers/index";
|
package/src/charts/index.scss
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
@import "axis/index";
|
|
2
|
-
|
|
3
|
-
@import "PieChart";
|
|
4
|
-
@import "Legend";
|
|
5
|
-
@import "LegendEntry";
|
|
6
|
-
@import "Gridlines";
|
|
7
|
-
@import "Swimlanes";
|
|
8
|
-
@import "Column";
|
|
9
|
-
@import "Bar";
|
|
10
|
-
@import "LineGraph";
|
|
11
|
-
@import "ColumnGraph";
|
|
12
|
-
@import "BarGraph";
|
|
13
|
-
@import "ScatterGraph";
|
|
14
|
-
@import "BubbleGraph";
|
|
15
|
-
@import "Marker";
|
|
16
|
-
@import "MarkerLine";
|
|
17
|
-
@import "Range";
|
|
18
|
-
@import "RangeMarker";
|
|
19
|
-
@import "Swimlane";
|
|
20
|
-
|
|
21
|
-
//define last for higher priority
|
|
22
|
-
@import "palette";
|
|
1
|
+
@import "axis/index";
|
|
2
|
+
|
|
3
|
+
@import "PieChart";
|
|
4
|
+
@import "Legend";
|
|
5
|
+
@import "LegendEntry";
|
|
6
|
+
@import "Gridlines";
|
|
7
|
+
@import "Swimlanes";
|
|
8
|
+
@import "Column";
|
|
9
|
+
@import "Bar";
|
|
10
|
+
@import "LineGraph";
|
|
11
|
+
@import "ColumnGraph";
|
|
12
|
+
@import "BarGraph";
|
|
13
|
+
@import "ScatterGraph";
|
|
14
|
+
@import "BubbleGraph";
|
|
15
|
+
@import "Marker";
|
|
16
|
+
@import "MarkerLine";
|
|
17
|
+
@import "Range";
|
|
18
|
+
@import "RangeMarker";
|
|
19
|
+
@import "Swimlane";
|
|
20
|
+
|
|
21
|
+
//define last for higher priority
|
|
22
|
+
@import "palette";
|
package/src/charts/shapes.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import * as Cx from '../core';
|
|
2
|
-
|
|
3
|
-
type ShapeRender = (cx: number, cy: number, size: number, props?: Cx.Config, options?: Cx.Config) => JSX.Element;
|
|
4
|
-
|
|
5
|
-
export function registerShape(name: string, callback: (cx: number, cy: number, size: number) => any);
|
|
6
|
-
|
|
7
|
-
export function getShape(shapeName: string): string;
|
|
8
|
-
|
|
9
|
-
export function getAvailableShapes(): string[];
|
|
10
|
-
|
|
11
|
-
export const circle: ShapeRender;
|
|
12
|
-
|
|
13
|
-
export const square: ShapeRender;
|
|
14
|
-
|
|
15
|
-
export const bar: ShapeRender;
|
|
16
|
-
|
|
17
|
-
export const column: ShapeRender;
|
|
18
|
-
|
|
19
|
-
export const line: ShapeRender;
|
|
20
|
-
|
|
21
|
-
export const vline: ShapeRender;
|
|
22
|
-
|
|
1
|
+
import * as Cx from '../core';
|
|
2
|
+
|
|
3
|
+
type ShapeRender = (cx: number, cy: number, size: number, props?: Cx.Config, options?: Cx.Config) => JSX.Element;
|
|
4
|
+
|
|
5
|
+
export function registerShape(name: string, callback: (cx: number, cy: number, size: number) => any);
|
|
6
|
+
|
|
7
|
+
export function getShape(shapeName: string): string;
|
|
8
|
+
|
|
9
|
+
export function getAvailableShapes(): string[];
|
|
10
|
+
|
|
11
|
+
export const circle: ShapeRender;
|
|
12
|
+
|
|
13
|
+
export const square: ShapeRender;
|
|
14
|
+
|
|
15
|
+
export const bar: ShapeRender;
|
|
16
|
+
|
|
17
|
+
export const column: ShapeRender;
|
|
18
|
+
|
|
19
|
+
export const line: ShapeRender;
|
|
20
|
+
|
|
21
|
+
export const vline: ShapeRender;
|
|
22
|
+
|
|
23
23
|
export const triangle: ShapeRender;
|
package/src/global.scss
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
$cx-include-global-rules: false !default;
|
|
3
|
-
|
|
4
|
-
@mixin cx-global-rules() {
|
|
5
|
-
@each $tag, $styles in $cx-element-style-map {
|
|
6
|
-
#{$tag} {
|
|
7
|
-
@include cx-add-rules($styles)
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
@if ($cx-include-global-rules and cx-call-once('cx/globals')) {
|
|
13
|
-
@include cx-global-rules();
|
|
1
|
+
|
|
2
|
+
$cx-include-global-rules: false !default;
|
|
3
|
+
|
|
4
|
+
@mixin cx-global-rules() {
|
|
5
|
+
@each $tag, $styles in $cx-element-style-map {
|
|
6
|
+
#{$tag} {
|
|
7
|
+
@include cx-add-rules($styles)
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@if ($cx-include-global-rules and cx-call-once('cx/globals')) {
|
|
13
|
+
@include cx-global-rules();
|
|
14
14
|
}
|
package/src/index.scss
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@import "global";
|
|
2
|
-
@import "util/index";
|
|
3
|
-
@import "ui/index";
|
|
4
|
-
@import "widgets/index";
|
|
5
|
-
@import "svg/index";
|
|
6
|
-
@import "charts/index";
|
|
1
|
+
@import "global";
|
|
2
|
+
@import "util/index";
|
|
3
|
+
@import "ui/index";
|
|
4
|
+
@import "widgets/index";
|
|
5
|
+
@import "svg/index";
|
|
6
|
+
@import "charts/index";
|
package/src/svg/index.scss
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
.cxs-text-anchor-middle {
|
|
2
|
-
text-anchor: middle;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.cxs-text-anchor-right {
|
|
6
|
-
text-anchor: end;
|
|
7
|
-
}
|
|
8
|
-
|
|
1
|
+
.cxs-text-anchor-middle {
|
|
2
|
+
text-anchor: middle;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.cxs-text-anchor-right {
|
|
6
|
+
text-anchor: end;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
9
|
@import "Svg";
|
package/src/ui/Instance.js
CHANGED
|
@@ -36,14 +36,11 @@ export class Instance {
|
|
|
36
36
|
// widget is initialized when the first instance is initialized
|
|
37
37
|
if (!this.widget.initialized) {
|
|
38
38
|
this.widget.init(context);
|
|
39
|
-
|
|
40
|
-
// init default values
|
|
41
|
-
this.widget.selector.init(this.parentStore);
|
|
42
|
-
|
|
43
39
|
this.widget.initialized = true;
|
|
44
40
|
}
|
|
45
41
|
|
|
46
42
|
if (!this.dataSelector) {
|
|
43
|
+
this.widget.selector.init(this.parentStore);
|
|
47
44
|
this.dataSelector = this.widget.selector.createStoreSelector();
|
|
48
45
|
}
|
|
49
46
|
|
package/src/ui/index.scss
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
@import 'layout/index';
|
|
1
|
+
|
|
2
|
+
@import 'layout/index';
|
package/src/ui/layout/index.scss
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
@import "LabelsLeftLayout";
|
|
3
|
-
@import "LabelsTopLayout";
|
|
1
|
+
|
|
2
|
+
@import "LabelsLeftLayout";
|
|
3
|
+
@import "LabelsTopLayout";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
// Layout variables
|
|
1
|
+
|
|
2
|
+
// Layout variables
|