mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-27 05:25:17 +00:00
Dynamic plotsizing depending on subplot size
This commit is contained in:
parent
bc2d91a08a
commit
b6ffbc512f
|
@ -92,6 +92,11 @@ export default class CandleChart extends Vue {
|
||||||
const colBuyData = this.dataset.columns.findIndex((el) => el === '_buy_signal_open');
|
const colBuyData = this.dataset.columns.findIndex((el) => el === '_buy_signal_open');
|
||||||
const colSellData = this.dataset.columns.findIndex((el) => el === '_sell_signal_open');
|
const colSellData = this.dataset.columns.findIndex((el) => el === '_sell_signal_open');
|
||||||
|
|
||||||
|
const subplotCount =
|
||||||
|
'subplots' in this.plotConfig ? Object.keys(this.plotConfig.subplots).length : 0;
|
||||||
|
|
||||||
|
console.log(`subplotcount: ${subplotCount}`);
|
||||||
|
|
||||||
// Always show ~250 candles max as starting point
|
// Always show ~250 candles max as starting point
|
||||||
const startingZoom = (1 - 250 / this.dataset.length) * 100;
|
const startingZoom = (1 - 250 / this.dataset.length) * 100;
|
||||||
|
|
||||||
|
@ -169,7 +174,7 @@ export default class CandleChart extends Vue {
|
||||||
{
|
{
|
||||||
left: MARGINLEFT,
|
left: MARGINLEFT,
|
||||||
right: MARGINRIGHT,
|
right: MARGINRIGHT,
|
||||||
height: '60%',
|
height: subplotCount === 0 ? '70%' : '60%',
|
||||||
// top: '0px',
|
// top: '0px',
|
||||||
// bottom: '150px',
|
// bottom: '150px',
|
||||||
},
|
},
|
||||||
|
@ -177,7 +182,7 @@ export default class CandleChart extends Vue {
|
||||||
// Volume
|
// Volume
|
||||||
left: MARGINLEFT,
|
left: MARGINLEFT,
|
||||||
right: MARGINRIGHT,
|
right: MARGINRIGHT,
|
||||||
top: '70%',
|
top: subplotCount === 0 ? '80%' : '70%',
|
||||||
height: '10%',
|
height: '10%',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user