diff --git a/websrc/components/RPlot.tsx b/websrc/components/RPlot.tsx index a7798b4..bb4ef7e 100644 --- a/websrc/components/RPlot.tsx +++ b/websrc/components/RPlot.tsx @@ -20,14 +20,14 @@ type PriceLine = { type PlotState = { x: Array, y: Array, - h_price_line: PriceLine, + current_price_line: PriceLine, } class RPlot extends Component<{}, PlotState> { state = { x: [], y: [], - h_price_line: {x0: 0, x1: 0, y0: 0, y1: 0}, + current_price_line: {x0: 0, x1: 0, y0: 0, y1: 0}, } constructor(props) { @@ -42,7 +42,7 @@ class RPlot extends Component<{}, PlotState> { this.setState({ x: data.ticks, y: data.prices, - h_price_line: { + current_price_line: { x0: 0, y0: last_price, x1: last_tick, @@ -62,7 +62,7 @@ class RPlot extends Component<{}, PlotState> { this.setState({ x: x, y: y, - h_price_line: { + current_price_line: { x0: 0, y0: data.price, x1: data.tick, @@ -95,10 +95,10 @@ class RPlot extends Component<{}, PlotState> { shapes: [ { type: 'line', - x0: this.state.h_price_line.x0, - y0: this.state.h_price_line.y0, - x1: this.state.h_price_line.x1, - y1: this.state.h_price_line.y1, + x0: this.state.current_price_line.x0, + y0: this.state.current_price_line.y0, + x1: this.state.current_price_line.x1, + y1: this.state.current_price_line.y1, line: { color: 'rgb(50, 171, 96)', width: 2,