@ivanmatiaspascual/interactive 1.3.1-sp1-beta.0.1.0
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/CHANGELOG.md +190 -0
- package/LICENSE +24 -0
- package/README.md +5 -0
- package/lib/Brush.d.ts +35 -0
- package/lib/Brush.js +103 -0
- package/lib/Brush.js.map +1 -0
- package/lib/ClickCallback.d.ts +18 -0
- package/lib/ClickCallback.js +12 -0
- package/lib/ClickCallback.js.map +1 -0
- package/lib/DrawingObjectSelector.d.ts +18 -0
- package/lib/DrawingObjectSelector.js +73 -0
- package/lib/DrawingObjectSelector.js.map +1 -0
- package/lib/EquidistantChannel.d.ts +74 -0
- package/lib/EquidistantChannel.js +149 -0
- package/lib/EquidistantChannel.js.map +1 -0
- package/lib/FibonacciRetracement.d.ts +83 -0
- package/lib/FibonacciRetracement.js +163 -0
- package/lib/FibonacciRetracement.js.map +1 -0
- package/lib/GannFan.d.ts +78 -0
- package/lib/GannFan.js +128 -0
- package/lib/GannFan.js.map +1 -0
- package/lib/InteractiveText.d.ts +70 -0
- package/lib/InteractiveText.js +89 -0
- package/lib/InteractiveText.js.map +1 -0
- package/lib/InteractiveYCoordinate.d.ts +128 -0
- package/lib/InteractiveYCoordinate.js +106 -0
- package/lib/InteractiveYCoordinate.js.map +1 -0
- package/lib/StandardDeviationChannel.d.ts +74 -0
- package/lib/StandardDeviationChannel.js +125 -0
- package/lib/StandardDeviationChannel.js.map +1 -0
- package/lib/TrendLine.d.ts +77 -0
- package/lib/TrendLine.js +125 -0
- package/lib/TrendLine.js.map +1 -0
- package/lib/ZoomButtons.d.ts +37 -0
- package/lib/ZoomButtons.js +85 -0
- package/lib/ZoomButtons.js.map +1 -0
- package/lib/components/ChannelWithArea.d.ts +30 -0
- package/lib/components/ChannelWithArea.js +126 -0
- package/lib/components/ChannelWithArea.js.map +1 -0
- package/lib/components/ClickableCircle.d.ts +26 -0
- package/lib/components/ClickableCircle.js +48 -0
- package/lib/components/ClickableCircle.js.map +1 -0
- package/lib/components/ClickableShape.d.ts +33 -0
- package/lib/components/ClickableShape.js +64 -0
- package/lib/components/ClickableShape.js.map +1 -0
- package/lib/components/GannFan.d.ts +32 -0
- package/lib/components/GannFan.js +134 -0
- package/lib/components/GannFan.js.map +1 -0
- package/lib/components/HoverTextNearMouse.d.ts +35 -0
- package/lib/components/HoverTextNearMouse.js +113 -0
- package/lib/components/HoverTextNearMouse.js.map +1 -0
- package/lib/components/InteractiveStraightLine.d.ts +57 -0
- package/lib/components/InteractiveStraightLine.js +220 -0
- package/lib/components/InteractiveStraightLine.js.map +1 -0
- package/lib/components/InteractiveText.d.ts +37 -0
- package/lib/components/InteractiveText.js +84 -0
- package/lib/components/InteractiveText.js.map +1 -0
- package/lib/components/InteractiveYCoordinate.d.ts +46 -0
- package/lib/components/InteractiveYCoordinate.js +109 -0
- package/lib/components/InteractiveYCoordinate.js.map +1 -0
- package/lib/components/LinearRegressionChannelWithArea.d.ts +31 -0
- package/lib/components/LinearRegressionChannelWithArea.js +104 -0
- package/lib/components/LinearRegressionChannelWithArea.js.map +1 -0
- package/lib/components/MouseLocationIndicator.d.ts +34 -0
- package/lib/components/MouseLocationIndicator.js +79 -0
- package/lib/components/MouseLocationIndicator.js.map +1 -0
- package/lib/components/Text.d.ts +17 -0
- package/lib/components/Text.js +26 -0
- package/lib/components/Text.js.map +1 -0
- package/lib/components/index.d.ts +11 -0
- package/lib/components/index.js +12 -0
- package/lib/components/index.js.map +1 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.js +13 -0
- package/lib/index.js.map +1 -0
- package/lib/utils.d.ts +7 -0
- package/lib/utils.js +84 -0
- package/lib/utils.js.map +1 -0
- package/lib/wrapper/EachEquidistantChannel.d.ts +59 -0
- package/lib/wrapper/EachEquidistantChannel.js +172 -0
- package/lib/wrapper/EachEquidistantChannel.js.map +1 -0
- package/lib/wrapper/EachFibRetracement.d.ts +77 -0
- package/lib/wrapper/EachFibRetracement.js +197 -0
- package/lib/wrapper/EachFibRetracement.js.map +1 -0
- package/lib/wrapper/EachGannFan.d.ts +81 -0
- package/lib/wrapper/EachGannFan.js +161 -0
- package/lib/wrapper/EachGannFan.js.map +1 -0
- package/lib/wrapper/EachInteractiveYCoordinate.d.ts +50 -0
- package/lib/wrapper/EachInteractiveYCoordinate.js +80 -0
- package/lib/wrapper/EachInteractiveYCoordinate.js.map +1 -0
- package/lib/wrapper/EachLinearRegressionChannel.d.ts +75 -0
- package/lib/wrapper/EachLinearRegressionChannel.js +89 -0
- package/lib/wrapper/EachLinearRegressionChannel.js.map +1 -0
- package/lib/wrapper/EachText.d.ts +58 -0
- package/lib/wrapper/EachText.js +79 -0
- package/lib/wrapper/EachText.js.map +1 -0
- package/lib/wrapper/EachTrendLine.d.ts +76 -0
- package/lib/wrapper/EachTrendLine.js +141 -0
- package/lib/wrapper/EachTrendLine.js.map +1 -0
- package/lib/wrapper/index.d.ts +7 -0
- package/lib/wrapper/index.js +8 -0
- package/lib/wrapper/index.js.map +1 -0
- package/package.json +55 -0
- package/src/Brush.tsx +177 -0
- package/src/ClickCallback.tsx +37 -0
- package/src/DrawingObjectSelector.tsx +97 -0
- package/src/EquidistantChannel.tsx +268 -0
- package/src/FibonacciRetracement.tsx +298 -0
- package/src/GannFan.tsx +233 -0
- package/src/InteractiveText.tsx +185 -0
- package/src/InteractiveYCoordinate.tsx +205 -0
- package/src/StandardDeviationChannel.tsx +269 -0
- package/src/TrendLine.tsx +283 -0
- package/src/ZoomButtons.tsx +172 -0
- package/src/components/ChannelWithArea.tsx +199 -0
- package/src/components/ClickableCircle.tsx +91 -0
- package/src/components/ClickableShape.tsx +114 -0
- package/src/components/GannFan.tsx +189 -0
- package/src/components/HoverTextNearMouse.tsx +174 -0
- package/src/components/InteractiveStraightLine.tsx +317 -0
- package/src/components/InteractiveText.tsx +153 -0
- package/src/components/InteractiveYCoordinate.tsx +205 -0
- package/src/components/LinearRegressionChannelWithArea.tsx +169 -0
- package/src/components/MouseLocationIndicator.tsx +128 -0
- package/src/components/Text.tsx +47 -0
- package/src/components/index.ts +11 -0
- package/src/index.ts +12 -0
- package/src/utils.ts +101 -0
- package/src/wrapper/EachEquidistantChannel.tsx +302 -0
- package/src/wrapper/EachFibRetracement.tsx +342 -0
- package/src/wrapper/EachGannFan.tsx +289 -0
- package/src/wrapper/EachInteractiveYCoordinate.tsx +198 -0
- package/src/wrapper/EachLinearRegressionChannel.tsx +202 -0
- package/src/wrapper/EachText.tsx +183 -0
- package/src/wrapper/EachTrendLine.tsx +297 -0
- package/src/wrapper/index.ts +7 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { isHover, saveNodeType } from "../utils";
|
|
3
|
+
import { ClickableShape, InteractiveYCoordinate } from "../components";
|
|
4
|
+
export class EachInteractiveYCoordinate extends React.Component {
|
|
5
|
+
constructor(props) {
|
|
6
|
+
super(props);
|
|
7
|
+
this.handleCloseIconHover = (_, moreProps) => {
|
|
8
|
+
if (this.state.closeIconHover !== moreProps.hovering) {
|
|
9
|
+
this.setState({
|
|
10
|
+
closeIconHover: moreProps.hovering,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
this.handleHover = (e, moreProps) => {
|
|
15
|
+
if (this.state.hover !== moreProps.hovering) {
|
|
16
|
+
this.setState({
|
|
17
|
+
hover: moreProps.hovering,
|
|
18
|
+
closeIconHover: moreProps.hovering ? this.state.closeIconHover : false,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
this.handleDelete = (e, moreProps) => {
|
|
23
|
+
const { index, onDelete } = this.props;
|
|
24
|
+
if (onDelete !== undefined) {
|
|
25
|
+
onDelete(e, index, moreProps);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
this.handleDrag = (e, moreProps) => {
|
|
29
|
+
const { index, onDrag } = this.props;
|
|
30
|
+
if (onDrag === undefined) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const { mouseXY: [, mouseY], chartConfig: { yScale }, } = moreProps;
|
|
34
|
+
const { dy } = this.dragStartPosition;
|
|
35
|
+
const newYValue = yScale.invert(mouseY - dy);
|
|
36
|
+
onDrag(e, index, newYValue);
|
|
37
|
+
};
|
|
38
|
+
this.handleDragStart = (_, moreProps) => {
|
|
39
|
+
const { yValue } = this.props;
|
|
40
|
+
const { mouseXY } = moreProps;
|
|
41
|
+
const { chartConfig: { yScale }, } = moreProps;
|
|
42
|
+
const [, mouseY] = mouseXY;
|
|
43
|
+
const dy = mouseY - yScale(yValue);
|
|
44
|
+
this.dragStartPosition = {
|
|
45
|
+
yValue,
|
|
46
|
+
dy,
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
this.isHover = isHover.bind(this);
|
|
50
|
+
this.saveNodeType = saveNodeType.bind(this);
|
|
51
|
+
this.state = {
|
|
52
|
+
hover: false,
|
|
53
|
+
closeIconHover: false,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
|
+
const { yValue, bgFill, textFill, fontFamily, fontSize, fontWeight, fontStyle, text, selected, onDragComplete, stroke, strokeDasharray, strokeWidth, edge, textBox, draggable, } = this.props;
|
|
58
|
+
const { hover, closeIconHover } = this.state;
|
|
59
|
+
const hoverHandler = {
|
|
60
|
+
onHover: this.handleHover,
|
|
61
|
+
onUnHover: this.handleHover,
|
|
62
|
+
};
|
|
63
|
+
const dragProps = draggable
|
|
64
|
+
? {
|
|
65
|
+
onDragStart: this.handleDragStart,
|
|
66
|
+
onDrag: this.handleDrag,
|
|
67
|
+
onDragComplete,
|
|
68
|
+
}
|
|
69
|
+
: {};
|
|
70
|
+
return (React.createElement("g", null,
|
|
71
|
+
React.createElement(InteractiveYCoordinate, Object.assign({ ref: this.saveNodeType("priceCoordinate"), selected: selected && !closeIconHover, hovering: hover || closeIconHover, interactiveCursorClass: "react-financial-charts-move-cursor" }, hoverHandler, dragProps, { yValue: yValue, bgFillStyle: bgFill, textFill: textFill, fontFamily: fontFamily, fontStyle: fontStyle, fontWeight: fontWeight, fontSize: fontSize, strokeStyle: stroke, strokeDasharray: strokeDasharray, strokeWidth: strokeWidth, text: text, textBox: textBox, edge: edge })),
|
|
72
|
+
React.createElement(ClickableShape, { show: true, hovering: closeIconHover, text: text, yValue: yValue, fontFamily: fontFamily, fontStyle: fontStyle, fontWeight: fontWeight, fontSize: fontSize, textBox: textBox, strokeStyle: stroke, onHover: this.handleCloseIconHover, onUnHover: this.handleCloseIconHover, onClick: this.handleDelete })));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
EachInteractiveYCoordinate.defaultProps = {
|
|
76
|
+
strokeWidth: 1,
|
|
77
|
+
selected: false,
|
|
78
|
+
draggable: false,
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=EachInteractiveYCoordinate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EachInteractiveYCoordinate.js","sourceRoot":"","sources":["../../src/wrapper/EachInteractiveYCoordinate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAkCvE,MAAM,OAAO,0BAA2B,SAAQ,KAAK,CAAC,SAGrD;IAYG,YAAmB,KAAsC;QACrD,KAAK,CAAC,KAAK,CAAC,CAAC;QAuFA,yBAAoB,GAAG,CAAC,CAAmB,EAAE,SAAc,EAAE,EAAE;YAC5E,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,KAAK,SAAS,CAAC,QAAQ,EAAE;gBAClD,IAAI,CAAC,QAAQ,CAAC;oBACV,cAAc,EAAE,SAAS,CAAC,QAAQ;iBACrC,CAAC,CAAC;aACN;QACL,CAAC,CAAC;QAEe,gBAAW,GAAG,CAAC,CAAmB,EAAE,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,QAAQ,EAAE,QAAQ,IAAI,CAAC,cAAc,EACrC,QAAQ,EAAE,KAAK,IAAI,cAAc,EACjC,sBAAsB,EAAC,oCAAoC,IACvD,YAAY,EACZ,SAAS,IACb,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,IACZ;YACF,oBAAC,cAAc,IACX,IAAI,QACJ,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAClC,SAAS,EAAE,IAAI,CAAC,oBAAoB,EACpC,OAAO,EAAE,IAAI,CAAC,YAAY,GAC5B,CACF,CACP,CAAC;IACN,CAAC;;AAjGa,uCAAY,GAAG;IACzB,WAAW,EAAE,CAAC;IACd,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,KAAK;CACnB,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface EachLinearRegressionChannelProps {
|
|
3
|
+
readonly defaultClassName?: string;
|
|
4
|
+
readonly x1Value: any;
|
|
5
|
+
readonly x2Value: any;
|
|
6
|
+
readonly index?: number;
|
|
7
|
+
readonly appearance: {
|
|
8
|
+
readonly stroke: string;
|
|
9
|
+
readonly strokeWidth: number;
|
|
10
|
+
readonly fill: string;
|
|
11
|
+
readonly edgeStrokeWidth: number;
|
|
12
|
+
readonly edgeStroke: string;
|
|
13
|
+
readonly edgeFill: string;
|
|
14
|
+
readonly r: number;
|
|
15
|
+
};
|
|
16
|
+
readonly edgeInteractiveCursor?: string;
|
|
17
|
+
readonly onDrag?: (e: React.MouseEvent, index: number | undefined, x1y1: {
|
|
18
|
+
x1Value: any;
|
|
19
|
+
x2Value: any;
|
|
20
|
+
}) => void;
|
|
21
|
+
readonly onDragComplete?: (e: React.MouseEvent, moreProps: any) => void;
|
|
22
|
+
readonly snapTo?: (datum: any) => number;
|
|
23
|
+
readonly interactive: boolean;
|
|
24
|
+
readonly selected: boolean;
|
|
25
|
+
readonly hoverText: {
|
|
26
|
+
readonly enable: boolean;
|
|
27
|
+
readonly fontFamily: string;
|
|
28
|
+
readonly fontSize: number;
|
|
29
|
+
readonly fill: string;
|
|
30
|
+
readonly text: string;
|
|
31
|
+
readonly bgFill: string;
|
|
32
|
+
readonly bgOpacity: number;
|
|
33
|
+
readonly bgWidth: number | string;
|
|
34
|
+
readonly bgHeight: number | string;
|
|
35
|
+
readonly selectedText: string;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
interface EachLinearRegressionChannelState {
|
|
39
|
+
hover: boolean;
|
|
40
|
+
}
|
|
41
|
+
export declare class EachLinearRegressionChannel extends React.Component<EachLinearRegressionChannelProps, EachLinearRegressionChannelState> {
|
|
42
|
+
static defaultProps: {
|
|
43
|
+
appearance: {
|
|
44
|
+
stroke: string;
|
|
45
|
+
strokeWidth: number;
|
|
46
|
+
fill: string;
|
|
47
|
+
edgeStrokeWidth: number;
|
|
48
|
+
edgeStroke: string;
|
|
49
|
+
edgeFill: string;
|
|
50
|
+
r: number;
|
|
51
|
+
};
|
|
52
|
+
interactive: boolean;
|
|
53
|
+
selected: boolean;
|
|
54
|
+
hoverText: {
|
|
55
|
+
enable: boolean;
|
|
56
|
+
bgHeight: number;
|
|
57
|
+
bgWidth: number;
|
|
58
|
+
text: string;
|
|
59
|
+
fontFamily: string;
|
|
60
|
+
fontSize: number;
|
|
61
|
+
fill: string;
|
|
62
|
+
bgFill: string;
|
|
63
|
+
bgOpacity: number;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
private isHover;
|
|
67
|
+
private saveNodeType;
|
|
68
|
+
constructor(props: EachLinearRegressionChannelProps);
|
|
69
|
+
render(): JSX.Element;
|
|
70
|
+
private readonly handleHover;
|
|
71
|
+
private readonly handleEdge2Drag;
|
|
72
|
+
private readonly handleEdge1Drag;
|
|
73
|
+
}
|
|
74
|
+
export declare function getNewXY(moreProps: any, snapTo: any): any[];
|
|
75
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { getCurrentItem } from "@ivanmatiaspascual/core/lib/utils/ChartDataUtil";
|
|
13
|
+
import * as React from "react";
|
|
14
|
+
import { isHover, saveNodeType } from "../utils";
|
|
15
|
+
import { HoverTextNearMouse, ClickableCircle } from "../components";
|
|
16
|
+
import { edge1Provider, edge2Provider, LinearRegressionChannelWithArea, } from "../components/LinearRegressionChannelWithArea";
|
|
17
|
+
export class EachLinearRegressionChannel extends React.Component {
|
|
18
|
+
constructor(props) {
|
|
19
|
+
super(props);
|
|
20
|
+
this.handleHover = (_, moreProps) => {
|
|
21
|
+
if (this.state.hover !== moreProps.hovering) {
|
|
22
|
+
this.setState({
|
|
23
|
+
hover: moreProps.hovering,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
this.handleEdge2Drag = (e, moreProps) => {
|
|
28
|
+
const { index, onDrag, snapTo, x1Value } = this.props;
|
|
29
|
+
if (onDrag === undefined) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const [x2Value] = getNewXY(moreProps, snapTo);
|
|
33
|
+
onDrag(e, index, {
|
|
34
|
+
x1Value,
|
|
35
|
+
x2Value,
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
this.handleEdge1Drag = (e, moreProps) => {
|
|
39
|
+
const { index, onDrag, snapTo, x2Value } = this.props;
|
|
40
|
+
if (onDrag === undefined) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const [x1Value] = getNewXY(moreProps, snapTo);
|
|
44
|
+
onDrag(e, index, {
|
|
45
|
+
x1Value,
|
|
46
|
+
x2Value,
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
this.isHover = isHover.bind(this);
|
|
50
|
+
this.saveNodeType = saveNodeType.bind(this);
|
|
51
|
+
this.state = {
|
|
52
|
+
hover: false,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
const { x1Value, x2Value, appearance, edgeInteractiveCursor, hoverText, interactive, selected, onDragComplete, } = this.props;
|
|
57
|
+
const { stroke, strokeWidth, fill, r, edgeStrokeWidth, edgeFill, edgeStroke } = appearance;
|
|
58
|
+
const { hover } = this.state;
|
|
59
|
+
const hoverHandler = interactive ? { onHover: this.handleHover, onUnHover: this.handleHover } : {};
|
|
60
|
+
const { enable: hoverTextEnabled, selectedText: hoverTextSelected, text: hoverTextUnselected } = hoverText, restHoverTextProps = __rest(hoverText, ["enable", "selectedText", "text"]);
|
|
61
|
+
return (React.createElement("g", null,
|
|
62
|
+
React.createElement(LinearRegressionChannelWithArea, Object.assign({ ref: this.saveNodeType("area"), selected: selected || hover }, hoverHandler, { x1Value: x1Value, x2Value: x2Value, fillStyle: fill, strokeStyle: stroke, strokeWidth: hover || selected ? strokeWidth + 1 : strokeWidth })),
|
|
63
|
+
React.createElement(ClickableCircle, { ref: this.saveNodeType("edge1"), show: selected || hover, xyProvider: edge1Provider(this.props), r: r, fillStyle: edgeFill, strokeStyle: edgeStroke, strokeWidth: edgeStrokeWidth, interactiveCursorClass: edgeInteractiveCursor, onDrag: this.handleEdge1Drag, onDragComplete: onDragComplete }),
|
|
64
|
+
React.createElement(ClickableCircle, { ref: this.saveNodeType("edge2"), show: selected || hover, xyProvider: edge2Provider(this.props), r: r, fillStyle: edgeFill, strokeStyle: edgeStroke, strokeWidth: edgeStrokeWidth, interactiveCursorClass: edgeInteractiveCursor, onDrag: this.handleEdge2Drag, onDragComplete: onDragComplete }),
|
|
65
|
+
React.createElement(HoverTextNearMouse, Object.assign({ show: hoverTextEnabled && hover }, restHoverTextProps, { text: selected ? hoverTextSelected : hoverTextUnselected }))));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
EachLinearRegressionChannel.defaultProps = {
|
|
69
|
+
appearance: {
|
|
70
|
+
stroke: "#000000",
|
|
71
|
+
strokeWidth: 1,
|
|
72
|
+
fill: "rgba(138, 175, 226, 0.7)",
|
|
73
|
+
edgeStrokeWidth: 2,
|
|
74
|
+
edgeStroke: "#000000",
|
|
75
|
+
edgeFill: "#FFFFFF",
|
|
76
|
+
r: 5,
|
|
77
|
+
},
|
|
78
|
+
interactive: true,
|
|
79
|
+
selected: false,
|
|
80
|
+
hoverText: Object.assign(Object.assign({}, HoverTextNearMouse.defaultProps), { enable: true, bgHeight: 18, bgWidth: 175, text: "Click and drag the edge circles" }),
|
|
81
|
+
};
|
|
82
|
+
export function getNewXY(moreProps, snapTo) {
|
|
83
|
+
const { xScale, xAccessor, plotData, mouseXY } = moreProps;
|
|
84
|
+
const currentItem = getCurrentItem(xScale, xAccessor, mouseXY, plotData);
|
|
85
|
+
const x = xAccessor(currentItem);
|
|
86
|
+
const y = snapTo(currentItem);
|
|
87
|
+
return [x, y];
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=EachLinearRegressionChannel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EachLinearRegressionChannel.js","sourceRoot":"","sources":["../../src/wrapper/EachLinearRegressionChannel.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EACH,aAAa,EACb,aAAa,EACb,+BAA+B,GAClC,MAAM,+CAA+C,CAAC;AAwCvD,MAAM,OAAO,2BAA4B,SAAQ,KAAK,CAAC,SAGtD;IA0BG,YAAmB,KAAuC;QACtD,KAAK,CAAC,KAAK,CAAC,CAAC;QA8EA,gBAAW,GAAG,CAAC,CAAmB,EAAE,SAAc,EAAE,EAAE;YACnE,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,QAAQ,EAAE;gBACzC,IAAI,CAAC,QAAQ,CAAC;oBACV,KAAK,EAAE,SAAS,CAAC,QAAQ;iBAC5B,CAAC,CAAC;aACN;QACL,CAAC,CAAC;QAEe,oBAAe,GAAG,CAAC,CAAmB,EAAE,SAAc,EAAE,EAAE;YACvE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YACtD,IAAI,MAAM,KAAK,SAAS,EAAE;gBACtB,OAAO;aACV;YAED,MAAM,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YAE9C,MAAM,CAAC,CAAC,EAAE,KAAK,EAA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,EAAE,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,mBAAmB,IAC1D,CACF,CACP,CAAC;IACN,CAAC;;AAtGa,wCAAY,GAAG;IACzB,UAAU,EAAE;QACR,MAAM,EAAE,SAAS;QACjB,WAAW,EAAE,CAAC;QACd,IAAI,EAAE,0BAA0B;QAChC,eAAe,EAAE,CAAC;QAClB,UAAU,EAAE,SAAS;QACrB,QAAQ,EAAE,SAAS;QACnB,CAAC,EAAE,CAAC;KACP;IACD,WAAW,EAAE,IAAI;IACjB,QAAQ,EAAE,KAAK;IACf,SAAS,kCACF,kBAAkB,CAAC,YAAY,KAClC,MAAM,EAAE,IAAI,EACZ,QAAQ,EAAE,EAAE,EACZ,OAAO,EAAE,GAAG,EACZ,IAAI,EAAE,iCAAiC,GAC1C;CACJ,CAAC;AA0HN,MAAM,UAAU,QAAQ,CAAC,SAAc,EAAE,MAAW;IAChD,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;IAE3D,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IACzE,MAAM,CAAC,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC;IACjC,MAAM,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;IAE9B,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface EachTextProps {
|
|
3
|
+
readonly index?: number;
|
|
4
|
+
readonly position?: any;
|
|
5
|
+
readonly bgFill: string;
|
|
6
|
+
readonly bgStrokeWidth: number;
|
|
7
|
+
readonly bgStroke?: string;
|
|
8
|
+
readonly textFill: string;
|
|
9
|
+
readonly fontWeight: string;
|
|
10
|
+
readonly fontFamily: string;
|
|
11
|
+
readonly fontStyle: string;
|
|
12
|
+
readonly fontSize: number;
|
|
13
|
+
readonly text: string;
|
|
14
|
+
readonly selected: boolean;
|
|
15
|
+
readonly onDrag?: (e: React.MouseEvent, index: number | undefined, xyValue: number[]) => void;
|
|
16
|
+
readonly onDragComplete?: (e: React.MouseEvent, moreProps: any) => void;
|
|
17
|
+
readonly hoverText: {
|
|
18
|
+
readonly enable: boolean;
|
|
19
|
+
readonly fontFamily: string;
|
|
20
|
+
readonly fontSize: number;
|
|
21
|
+
readonly fill: string;
|
|
22
|
+
readonly text: string;
|
|
23
|
+
readonly selectedText: string;
|
|
24
|
+
readonly bgFill: string;
|
|
25
|
+
readonly bgOpacity: number;
|
|
26
|
+
readonly bgWidth: number | string;
|
|
27
|
+
readonly bgHeight: number | string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
interface EachTextState {
|
|
31
|
+
hover: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare class EachText extends React.Component<EachTextProps, EachTextState> {
|
|
34
|
+
static defaultProps: {
|
|
35
|
+
bgStrokeWidth: number;
|
|
36
|
+
selected: boolean;
|
|
37
|
+
hoverText: {
|
|
38
|
+
enable: boolean;
|
|
39
|
+
bgHeight: string;
|
|
40
|
+
bgWidth: string;
|
|
41
|
+
text: string;
|
|
42
|
+
fontFamily: string;
|
|
43
|
+
fontSize: number;
|
|
44
|
+
fill: string;
|
|
45
|
+
bgFill: string;
|
|
46
|
+
bgOpacity: number;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
private dragStartPosition;
|
|
50
|
+
private isHover;
|
|
51
|
+
private saveNodeType;
|
|
52
|
+
constructor(props: EachTextProps);
|
|
53
|
+
render(): JSX.Element;
|
|
54
|
+
private readonly handleHover;
|
|
55
|
+
private readonly handleDrag;
|
|
56
|
+
private readonly handleDragStart;
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import * as React from "react";
|
|
13
|
+
import { getXValue } from "@ivanmatiaspascual/core/lib/utils/ChartDataUtil";
|
|
14
|
+
import { isHover, saveNodeType } from "../utils";
|
|
15
|
+
import { HoverTextNearMouse, InteractiveText } from "../components";
|
|
16
|
+
export class EachText extends React.Component {
|
|
17
|
+
constructor(props) {
|
|
18
|
+
super(props);
|
|
19
|
+
this.handleHover = (_, moreProps) => {
|
|
20
|
+
if (this.state.hover !== moreProps.hovering) {
|
|
21
|
+
this.setState({
|
|
22
|
+
hover: moreProps.hovering,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
this.handleDrag = (e, moreProps) => {
|
|
27
|
+
const { index, onDrag } = this.props;
|
|
28
|
+
if (onDrag === undefined) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const { mouseXY: [, mouseY], chartConfig: { yScale }, xAccessor, mouseXY, plotData, xScale, } = moreProps;
|
|
32
|
+
const { dx, dy } = this.dragStartPosition;
|
|
33
|
+
const xValue = xScale.invert(xScale(getXValue(xScale, xAccessor, mouseXY, plotData)) - dx);
|
|
34
|
+
// xScale.invert(xScale(xAccessor(currentItem)) - dx);
|
|
35
|
+
const xyValue = [xValue, yScale.invert(mouseY - dy)];
|
|
36
|
+
onDrag(e, index, xyValue);
|
|
37
|
+
};
|
|
38
|
+
this.handleDragStart = (_, moreProps) => {
|
|
39
|
+
const { position } = this.props;
|
|
40
|
+
const { mouseXY } = moreProps;
|
|
41
|
+
const { chartConfig: { yScale }, xScale, } = moreProps;
|
|
42
|
+
const [mouseX, mouseY] = mouseXY;
|
|
43
|
+
const [textCX, textCY] = position;
|
|
44
|
+
const dx = mouseX - xScale(textCX);
|
|
45
|
+
const dy = mouseY - yScale(textCY);
|
|
46
|
+
this.dragStartPosition = {
|
|
47
|
+
position,
|
|
48
|
+
dx,
|
|
49
|
+
dy,
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
this.handleHover = this.handleHover.bind(this);
|
|
53
|
+
this.handleDragStart = this.handleDragStart.bind(this);
|
|
54
|
+
this.handleDrag = this.handleDrag.bind(this);
|
|
55
|
+
this.isHover = isHover.bind(this);
|
|
56
|
+
this.saveNodeType = saveNodeType.bind(this);
|
|
57
|
+
this.state = {
|
|
58
|
+
hover: false,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
render() {
|
|
62
|
+
const { position, bgFill, bgStroke, bgStrokeWidth, textFill, fontFamily, fontSize, fontWeight, fontStyle, text, hoverText, selected, onDragComplete, } = this.props;
|
|
63
|
+
const { hover } = this.state;
|
|
64
|
+
const hoverHandler = {
|
|
65
|
+
onHover: this.handleHover,
|
|
66
|
+
onUnHover: this.handleHover,
|
|
67
|
+
};
|
|
68
|
+
const { enable: hoverTextEnabled, selectedText: hoverTextSelected, text: hoverTextUnselected } = hoverText, restHoverTextProps = __rest(hoverText, ["enable", "selectedText", "text"]);
|
|
69
|
+
return (React.createElement("g", null,
|
|
70
|
+
React.createElement(InteractiveText, Object.assign({ ref: this.saveNodeType("text"), selected: selected || hover, interactiveCursorClass: "react-financial-charts-move-cursor" }, hoverHandler, { onDragStart: this.handleDragStart, onDrag: this.handleDrag, onDragComplete: onDragComplete, position: position, bgFillStyle: bgFill, bgStroke: bgStroke || textFill, bgStrokeWidth: bgStrokeWidth, textFill: textFill, fontFamily: fontFamily, fontStyle: fontStyle, fontWeight: fontWeight, fontSize: fontSize, text: text })),
|
|
71
|
+
React.createElement(HoverTextNearMouse, Object.assign({ show: hoverTextEnabled && hover }, restHoverTextProps, { text: selected ? hoverTextSelected : hoverTextUnselected }))));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
EachText.defaultProps = {
|
|
75
|
+
bgStrokeWidth: 1,
|
|
76
|
+
selected: false,
|
|
77
|
+
hoverText: Object.assign(Object.assign({}, HoverTextNearMouse.defaultProps), { enable: true, bgHeight: "auto", bgWidth: "auto", text: "Click to select object" }),
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=EachText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EachText.js","sourceRoot":"","sources":["../../src/wrapper/EachText.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAmCpE,MAAM,OAAO,QAAS,SAAQ,KAAK,CAAC,SAAuC;IAkBvE,YAAmB,KAAoB;QACnC,KAAK,CAAC,KAAK,CAAC,CAAC;QA2EA,gBAAW,GAAG,CAAC,CAAmB,EAAE,SAAc,EAAE,EAAE;YACnE,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,QAAQ,EAAE;gBACzC,IAAI,CAAC,QAAQ,CAAC;oBACV,KAAK,EAAE,SAAS,CAAC,QAAQ;iBAC5B,CAAC,CAAC;aACN;QACL,CAAC,CAAC;QAEe,eAAU,GAAG,CAAC,CAAmB,EAAE,SAAc,EAAE,EAAE;YAClE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YACrC,IAAI,MAAM,KAAK,SAAS,EAAE;gBACtB,OAAO;aACV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9B,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,IACZ;YACF,oBAAC,kBAAkB,kBACf,IAAI,EAAE,gBAAgB,IAAI,KAAK,IAC3B,kBAAkB,IACtB,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,mBAAmB,IAC1D,CACF,CACP,CAAC;IACN,CAAC;;AA3Fa,qBAAY,GAAG;IACzB,aAAa,EAAE,CAAC;IAChB,QAAQ,EAAE,KAAK;IACf,SAAS,kCACF,kBAAkB,CAAC,YAAY,KAClC,MAAM,EAAE,IAAI,EACZ,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,wBAAwB,GACjC;CACJ,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { strokeDashTypes } from "@ivanmatiaspascual/core";
|
|
3
|
+
export interface EachTrendLineProps {
|
|
4
|
+
readonly x1Value: any;
|
|
5
|
+
readonly x2Value: any;
|
|
6
|
+
readonly y1Value: any;
|
|
7
|
+
readonly y2Value: any;
|
|
8
|
+
readonly index?: number;
|
|
9
|
+
readonly type: "XLINE" | "RAY" | "LINE";
|
|
10
|
+
readonly onDrag: (e: React.MouseEvent, index: number | undefined, moreProps: any) => void;
|
|
11
|
+
readonly onEdge1Drag: any;
|
|
12
|
+
readonly onEdge2Drag: any;
|
|
13
|
+
readonly onDragComplete?: (e: React.MouseEvent, moreProps: any) => void;
|
|
14
|
+
readonly onSelect: (e: React.MouseEvent, interactives: any[], moreProps: any) => void;
|
|
15
|
+
readonly r: number;
|
|
16
|
+
readonly strokeOpacity: number;
|
|
17
|
+
readonly defaultClassName?: string;
|
|
18
|
+
readonly selected?: boolean;
|
|
19
|
+
readonly strokeStyle: string;
|
|
20
|
+
readonly strokeWidth: number;
|
|
21
|
+
readonly strokeDasharray: strokeDashTypes;
|
|
22
|
+
readonly edgeStrokeWidth: number;
|
|
23
|
+
readonly edgeStroke: string;
|
|
24
|
+
readonly edgeInteractiveCursor: string;
|
|
25
|
+
readonly lineInteractiveCursor: string;
|
|
26
|
+
readonly edgeFill: string;
|
|
27
|
+
readonly hoverText: {
|
|
28
|
+
readonly enable: boolean;
|
|
29
|
+
readonly fontFamily: string;
|
|
30
|
+
readonly fontSize: number;
|
|
31
|
+
readonly fill: string;
|
|
32
|
+
readonly text: string;
|
|
33
|
+
readonly selectedText: string;
|
|
34
|
+
readonly bgFill: string;
|
|
35
|
+
readonly bgOpacity: number;
|
|
36
|
+
readonly bgWidth: number | string;
|
|
37
|
+
readonly bgHeight: number | string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
interface EachTrendLineState {
|
|
41
|
+
anchor?: string;
|
|
42
|
+
hover?: any;
|
|
43
|
+
}
|
|
44
|
+
export declare class EachTrendLine extends React.Component<EachTrendLineProps, EachTrendLineState> {
|
|
45
|
+
static defaultProps: {
|
|
46
|
+
onDrag: () => void;
|
|
47
|
+
onEdge1Drag: () => void;
|
|
48
|
+
onEdge2Drag: () => void;
|
|
49
|
+
onSelect: () => void;
|
|
50
|
+
selected: boolean;
|
|
51
|
+
edgeStroke: string;
|
|
52
|
+
edgeFill: string;
|
|
53
|
+
edgeStrokeWidth: number;
|
|
54
|
+
r: number;
|
|
55
|
+
strokeWidth: number;
|
|
56
|
+
strokeDasharray: string;
|
|
57
|
+
hoverText: {
|
|
58
|
+
enable: boolean;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
private dragStart;
|
|
62
|
+
private isHover;
|
|
63
|
+
private saveNodeType;
|
|
64
|
+
constructor(props: EachTrendLineProps);
|
|
65
|
+
render(): JSX.Element;
|
|
66
|
+
private readonly handleHover;
|
|
67
|
+
private readonly handleEdge2Drag;
|
|
68
|
+
private readonly handleEdge1Drag;
|
|
69
|
+
private readonly handleDragComplete;
|
|
70
|
+
private readonly handleEdge2DragStart;
|
|
71
|
+
private readonly handleEdge1DragStart;
|
|
72
|
+
private readonly handleLineDrag;
|
|
73
|
+
private readonly handleLineDragStart;
|
|
74
|
+
}
|
|
75
|
+
export declare function getNewXY(moreProps: any): any[];
|
|
76
|
+
export {};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import * as React from "react";
|
|
13
|
+
import { ascending as d3Ascending } from "d3-array";
|
|
14
|
+
import { noop } from "@ivanmatiaspascual/core";
|
|
15
|
+
import { getXValue } from "@ivanmatiaspascual/core/lib/utils/ChartDataUtil";
|
|
16
|
+
import { isHover, saveNodeType } from "../utils";
|
|
17
|
+
import { ClickableCircle, HoverTextNearMouse, InteractiveStraightLine } from "../components";
|
|
18
|
+
export class EachTrendLine extends React.Component {
|
|
19
|
+
constructor(props) {
|
|
20
|
+
super(props);
|
|
21
|
+
this.handleHover = (_, moreProps) => {
|
|
22
|
+
if (this.state.hover !== moreProps.hovering) {
|
|
23
|
+
this.setState({
|
|
24
|
+
hover: moreProps.hovering,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
this.handleEdge2Drag = (e, moreProps) => {
|
|
29
|
+
const { index, onDrag, x1Value, y1Value } = this.props;
|
|
30
|
+
const [x2Value, y2Value] = getNewXY(moreProps);
|
|
31
|
+
onDrag(e, index, {
|
|
32
|
+
x1Value,
|
|
33
|
+
y1Value,
|
|
34
|
+
x2Value,
|
|
35
|
+
y2Value,
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
this.handleEdge1Drag = (e, moreProps) => {
|
|
39
|
+
const { index, onDrag, x2Value, y2Value } = this.props;
|
|
40
|
+
const [x1Value, y1Value] = getNewXY(moreProps);
|
|
41
|
+
onDrag(e, index, {
|
|
42
|
+
x1Value,
|
|
43
|
+
y1Value,
|
|
44
|
+
x2Value,
|
|
45
|
+
y2Value,
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
this.handleDragComplete = (e, moreProps) => {
|
|
49
|
+
this.setState({
|
|
50
|
+
anchor: undefined,
|
|
51
|
+
});
|
|
52
|
+
const { onDragComplete } = this.props;
|
|
53
|
+
if (onDragComplete === undefined) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
onDragComplete(e, moreProps);
|
|
57
|
+
};
|
|
58
|
+
this.handleEdge2DragStart = () => {
|
|
59
|
+
this.setState({
|
|
60
|
+
anchor: "edge1",
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
this.handleEdge1DragStart = () => {
|
|
64
|
+
this.setState({
|
|
65
|
+
anchor: "edge2",
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
this.handleLineDrag = (e, moreProps) => {
|
|
69
|
+
const { index, onDrag } = this.props;
|
|
70
|
+
const { x1Value, y1Value, x2Value, y2Value } = this.dragStart;
|
|
71
|
+
const { xScale, chartConfig: { yScale }, xAccessor, fullData, } = moreProps;
|
|
72
|
+
const { startPos, mouseXY } = moreProps;
|
|
73
|
+
const x1 = xScale(x1Value);
|
|
74
|
+
const y1 = yScale(y1Value);
|
|
75
|
+
const x2 = xScale(x2Value);
|
|
76
|
+
const y2 = yScale(y2Value);
|
|
77
|
+
const dx = startPos[0] - mouseXY[0];
|
|
78
|
+
const dy = startPos[1] - mouseXY[1];
|
|
79
|
+
const newX1Value = getXValue(xScale, xAccessor, [x1 - dx, y1 - dy], fullData);
|
|
80
|
+
const newY1Value = yScale.invert(y1 - dy);
|
|
81
|
+
const newX2Value = getXValue(xScale, xAccessor, [x2 - dx, y2 - dy], fullData);
|
|
82
|
+
const newY2Value = yScale.invert(y2 - dy);
|
|
83
|
+
onDrag(e, index, {
|
|
84
|
+
x1Value: newX1Value,
|
|
85
|
+
y1Value: newY1Value,
|
|
86
|
+
x2Value: newX2Value,
|
|
87
|
+
y2Value: newY2Value,
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
this.handleLineDragStart = () => {
|
|
91
|
+
const { x1Value, y1Value, x2Value, y2Value } = this.props;
|
|
92
|
+
this.dragStart = {
|
|
93
|
+
x1Value,
|
|
94
|
+
y1Value,
|
|
95
|
+
x2Value,
|
|
96
|
+
y2Value,
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
this.isHover = isHover.bind(this);
|
|
100
|
+
this.saveNodeType = saveNodeType.bind(this);
|
|
101
|
+
this.state = {
|
|
102
|
+
hover: false,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
render() {
|
|
106
|
+
const { x1Value, y1Value, x2Value, y2Value, type, strokeStyle, strokeWidth, strokeDasharray, r, edgeStrokeWidth, edgeFill, edgeStroke, edgeInteractiveCursor, lineInteractiveCursor, hoverText, selected, onDragComplete, } = this.props;
|
|
107
|
+
const { enable: hoverTextEnabled, selectedText: hoverTextSelected, text: hoverTextUnselected } = hoverText, restHoverTextProps = __rest(hoverText, ["enable", "selectedText", "text"]);
|
|
108
|
+
const { hover, anchor } = this.state;
|
|
109
|
+
return (React.createElement("g", null,
|
|
110
|
+
React.createElement(InteractiveStraightLine, { ref: this.saveNodeType("line"), selected: selected || hover, onHover: this.handleHover, onUnHover: this.handleHover, x1Value: x1Value, y1Value: y1Value, x2Value: x2Value, y2Value: y2Value, type: type, strokeStyle: strokeStyle, strokeWidth: hover || selected ? strokeWidth + 1 : strokeWidth, strokeDasharray: strokeDasharray, interactiveCursorClass: lineInteractiveCursor, onDragStart: this.handleLineDragStart, onDrag: this.handleLineDrag, onDragComplete: onDragComplete }),
|
|
111
|
+
React.createElement(ClickableCircle, { ref: this.saveNodeType("edge1"), show: selected || hover, cx: x1Value, cy: y1Value, r: r, fillStyle: edgeFill, strokeStyle: anchor === "edge1" ? strokeStyle : edgeStroke, strokeWidth: edgeStrokeWidth, interactiveCursorClass: edgeInteractiveCursor, onDragStart: this.handleEdge1DragStart, onDrag: this.handleEdge1Drag, onDragComplete: this.handleDragComplete }),
|
|
112
|
+
React.createElement(ClickableCircle, { ref: this.saveNodeType("edge2"), show: selected || hover, cx: x2Value, cy: y2Value, r: r, fillStyle: edgeFill, strokeStyle: anchor === "edge2" ? strokeStyle : edgeStroke, strokeWidth: edgeStrokeWidth, interactiveCursorClass: edgeInteractiveCursor, onDragStart: this.handleEdge2DragStart, onDrag: this.handleEdge2Drag, onDragComplete: this.handleDragComplete }),
|
|
113
|
+
React.createElement(HoverTextNearMouse, Object.assign({ show: hoverTextEnabled && hover }, restHoverTextProps, { text: selected ? hoverTextSelected : hoverTextUnselected }))));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
EachTrendLine.defaultProps = {
|
|
117
|
+
onDrag: noop,
|
|
118
|
+
onEdge1Drag: noop,
|
|
119
|
+
onEdge2Drag: noop,
|
|
120
|
+
onSelect: noop,
|
|
121
|
+
selected: false,
|
|
122
|
+
edgeStroke: "#000000",
|
|
123
|
+
edgeFill: "#FFFFFF",
|
|
124
|
+
edgeStrokeWidth: 2,
|
|
125
|
+
r: 5,
|
|
126
|
+
strokeWidth: 1,
|
|
127
|
+
strokeDasharray: "Solid",
|
|
128
|
+
hoverText: {
|
|
129
|
+
enable: false,
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
export function getNewXY(moreProps) {
|
|
133
|
+
const { xScale, chartConfig: { yScale }, xAccessor, plotData, mouseXY, } = moreProps;
|
|
134
|
+
const mouseY = mouseXY[1];
|
|
135
|
+
const x = getXValue(xScale, xAccessor, mouseXY, plotData);
|
|
136
|
+
const [small, big] = yScale.domain().slice().sort(d3Ascending);
|
|
137
|
+
const y = yScale.invert(mouseY);
|
|
138
|
+
const newY = Math.min(Math.max(y, small), big);
|
|
139
|
+
return [x, newY];
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=EachTrendLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EachTrendLine.js","sourceRoot":"","sources":["../../src/wrapper/EachTrendLine.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,IAAI,EAAmB,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAgD7F,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAiD;IAuBtF,YAAmB,KAAyB;QACxC,KAAK,CAAC,KAAK,CAAC,CAAC;QAiGA,gBAAW,GAAG,CAAC,CAAmB,EAAE,SAAc,EAAE,EAAE;YACnE,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,QAAQ,EAAE;gBACzC,IAAI,CAAC,QAAQ,CAAC;oBACV,KAAK,EAAE,SAAS,CAAC,QAAQ;iBAC5B,CAAC,CAAC;aACN;QACL,CAAC,CAAC;QAEe,oBAAe,GAAG,CAAC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,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;IAE/C,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { EachEquidistantChannel } from "./EachEquidistantChannel";
|
|
2
|
+
export { EachFibRetracement } from "./EachFibRetracement";
|
|
3
|
+
export { EachGannFan } from "./EachGannFan";
|
|
4
|
+
export { EachInteractiveYCoordinate } from "./EachInteractiveYCoordinate";
|
|
5
|
+
export { EachLinearRegressionChannel } from "./EachLinearRegressionChannel";
|
|
6
|
+
export { EachText } from "./EachText";
|
|
7
|
+
export { EachTrendLine } from "./EachTrendLine";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { EachEquidistantChannel } from "./EachEquidistantChannel";
|
|
2
|
+
export { EachFibRetracement } from "./EachFibRetracement";
|
|
3
|
+
export { EachGannFan } from "./EachGannFan";
|
|
4
|
+
export { EachInteractiveYCoordinate } from "./EachInteractiveYCoordinate";
|
|
5
|
+
export { EachLinearRegressionChannel } from "./EachLinearRegressionChannel";
|
|
6
|
+
export { EachText } from "./EachText";
|
|
7
|
+
export { EachTrendLine } from "./EachTrendLine";
|
|
8
|
+
//# sourceMappingURL=index.js.map
|