removed limit of 500 elements, fixed margins
This commit is contained in:
parent
76243d8b7f
commit
361bf0fd2a
@ -55,13 +55,6 @@ class RPlot extends Component<{}, PlotState> {
|
||||
})
|
||||
|
||||
socket.on("new_tick", (data: NewTickMessage) => {
|
||||
const new_x = [...this.state.x, data.tick];
|
||||
const new_y = [...this.state.y, data.price];
|
||||
|
||||
// cutting to up to 500 entries (last 500)
|
||||
const x = new_x.slice(Math.max(new_x.length - 500, 0));
|
||||
const y = new_y.slice(Math.max(new_y.length - 500, 0));
|
||||
|
||||
const position_price_lines = data.positions.map((pstat): PriceLine => {
|
||||
return {
|
||||
x0: 0,
|
||||
@ -117,10 +110,10 @@ class RPlot extends Component<{}, PlotState> {
|
||||
]}
|
||||
layout={{
|
||||
margin: {
|
||||
l: 50,
|
||||
r: 50,
|
||||
b: 50,
|
||||
t: 50,
|
||||
l: 110,
|
||||
r: 20,
|
||||
b: 100,
|
||||
t: 20,
|
||||
pad: 4
|
||||
},
|
||||
dragmode: "pan",
|
||||
@ -165,7 +158,7 @@ class RPlot extends Component<{}, PlotState> {
|
||||
displayModeBar: false,
|
||||
responsive: true,
|
||||
}}
|
||||
style={{width: '100%', height: '90%'}}
|
||||
style={{width: '100%', height: '100%'}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user