diff --git a/src/components/charts/CandleChart.vue b/src/components/charts/CandleChart.vue index 9322aa93..05768e5d 100644 --- a/src/components/charts/CandleChart.vue +++ b/src/components/charts/CandleChart.vue @@ -187,16 +187,15 @@ export default class CandleChart extends Vue { { left: MARGINLEFT, right: MARGINRIGHT, - // height: subplotCount === 0 ? '70%' : '60%', - // top: '0px', + // Grid Layout from bottom to top bottom: `${subplotCount * 10 + 10}%`, - // bottom: '150px', }, { // Volume left: MARGINLEFT, right: MARGINRIGHT, - top: subplotCount === 0 ? '80%' : '70%', + // Grid Layout from bottom to top + bottom: `${subplotCount * 10}%`, height: '10%', }, ], @@ -375,8 +374,8 @@ export default class CandleChart extends Vue { options.grid.push({ left: MARGINLEFT, right: MARGINRIGHT, - bottom: `${(plotIndex - 1) * 50}px`, - height: '8%', + bottom: `${plotIndex * 50}px`, + height: '50px', }); } Object.entries(value).forEach(([sk, sv]) => { @@ -418,7 +417,8 @@ export default class CandleChart extends Vue { // options.xAxis[options.xAxis.length - 1].axisTick.show = true; // } if (options.grid && Array.isArray(options.grid)) { - options.grid[options.grid.length - 1].bottom = '75px'; + // Last subplot is bottom + options.grid[options.grid.length - 1].bottom = '50px'; delete options.grid[options.grid.length - 1].top; } diff --git a/src/components/charts/CandleChartContainer.vue b/src/components/charts/CandleChartContainer.vue index e052240a..a2b02f35 100644 --- a/src/components/charts/CandleChartContainer.vue +++ b/src/components/charts/CandleChartContainer.vue @@ -32,7 +32,7 @@
- useUtc + useUTC
@@ -40,12 +40,14 @@
+
@@ -160,4 +162,4 @@ export default class CandleChartContainer extends Vue { } - + diff --git a/src/views/Graphs.vue b/src/views/Graphs.vue index eafeb6f8..18342bfb 100644 --- a/src/views/Graphs.vue +++ b/src/views/Graphs.vue @@ -31,6 +31,7 @@ import CandleChartContainer from '@/components/charts/CandleChartContainer.vue'; import TimeRangeSelect from '@/components/ftbot/TimeRangeSelect.vue'; import StrategyList from '@/components/ftbot/StrategyList.vue'; import { AvailablePairPayload, AvailablePairResult, WhitelistResponse } from '@/types'; +import { BotStoreGetters } from '@/store/modules/ftbot'; const ftbot = namespace('ftbot'); @@ -38,8 +39,6 @@ const ftbot = namespace('ftbot'); components: { CandleChartContainer, StrategyList, TimeRangeSelect }, }) export default class Graphs extends Vue { - timeframe = '5m'; - historicView = false; strategy = ''; @@ -52,6 +51,8 @@ export default class Graphs extends Vue { @ftbot.State trades; + @ftbot.Getter [BotStoreGetters.timeframe]!: string; + @ftbot.Action public getWhitelist!: () => Promise; @ftbot.Action public getAvailablePairs!: (