From 9ae8389f835a3b07e8d96d087eeebaa24df433a5 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Wed, 16 Dec 2020 09:40:45 +0000 Subject: [PATCH] h_price_line to current_price_line --- websrc/components/RPlot.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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,