From 0ca4810f7a8d779f321cc6672e66fb69741d75f8 Mon Sep 17 00:00:00 2001 From: Ivan Proskuryakov Date: Wed, 11 Jan 2023 14:59:30 +0300 Subject: [PATCH 1/5] feature: rending of multiple charts with gridview --- .../charts/CandleChartContainerSimple.vue | 137 ++++ src/components/charts/CandleChartSimple.vue | 738 ++++++++++++++++++ src/components/layout/NavBar.vue | 1 + src/router/index.ts | 5 + src/views/GraphsGrid.vue | 62 ++ 5 files changed, 943 insertions(+) create mode 100644 src/components/charts/CandleChartContainerSimple.vue create mode 100644 src/components/charts/CandleChartSimple.vue create mode 100644 src/views/GraphsGrid.vue diff --git a/src/components/charts/CandleChartContainerSimple.vue b/src/components/charts/CandleChartContainerSimple.vue new file mode 100644 index 0000000000..886a36bd1a --- /dev/null +++ b/src/components/charts/CandleChartContainerSimple.vue @@ -0,0 +1,137 @@ + + + + + diff --git a/src/components/charts/CandleChartSimple.vue b/src/components/charts/CandleChartSimple.vue new file mode 100644 index 0000000000..48b236fd93 --- /dev/null +++ b/src/components/charts/CandleChartSimple.vue @@ -0,0 +1,738 @@ + + + + + diff --git a/src/components/layout/NavBar.vue b/src/components/layout/NavBar.vue index c29d4872bd..b96d0f6334 100644 --- a/src/components/layout/NavBar.vue +++ b/src/components/layout/NavBar.vue @@ -19,6 +19,7 @@ >Dashboard Chart + Grid Logs Backtest = [ name: 'Freqtrade Graph', component: () => import('@/views/Graphs.vue'), }, + { + path: '/graph_grid', + name: 'Freqtrade Graph Grid', + component: () => import('@/views/GraphsGrid.vue'), + }, { path: '/logs', name: 'Freqtrade Logs', diff --git a/src/views/GraphsGrid.vue b/src/views/GraphsGrid.vue new file mode 100644 index 0000000000..58b9a9a201 --- /dev/null +++ b/src/views/GraphsGrid.vue @@ -0,0 +1,62 @@ + + + + + From 189f1cc7bdb4c6b9652312be4bcde55f9ccdc13c Mon Sep 17 00:00:00 2001 From: Ivan Proskuryakov Date: Wed, 11 Jan 2023 15:11:35 +0300 Subject: [PATCH 2/5] feature: alternative chart version - v1 --- src/components/charts/CandleChartSimple.vue | 34 +-------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/src/components/charts/CandleChartSimple.vue b/src/components/charts/CandleChartSimple.vue index 48b236fd93..9000e3fa85 100644 --- a/src/components/charts/CandleChartSimple.vue +++ b/src/components/charts/CandleChartSimple.vue @@ -27,7 +27,6 @@ import { TimelineComponent, TitleComponent, ToolboxComponent, - TooltipComponent, VisualMapComponent, VisualMapPiecewiseComponent, } from 'echarts/components'; @@ -42,7 +41,6 @@ use([ TimelineComponent, TitleComponent, ToolboxComponent, - TooltipComponent, VisualMapComponent, VisualMapPiecewiseComponent, @@ -283,10 +281,6 @@ export default defineComponent({ itemStyle: { color: shortEntrySignalColor, }, - tooltip: { - // Hide tooltip - it's already there for longs. - // show: false, - }, encode: { x: colDate, y: colShortEntryData, @@ -515,33 +509,7 @@ export default defineComponent({ data: ['Candles', 'Volume', 'Entry', 'Exit'], right: '1%', }, - tooltip: { - show: true, - trigger: 'axis', - renderMode: 'richText', - backgroundColor: 'rgba(80,80,80,0.7)', - borderWidth: 0, - textStyle: { - color: '#fff', - }, - axisPointer: { - type: 'cross', - lineStyle: { - color: '#cccccc', - width: 1, - opacity: 1, - }, - }, - // positioning copied from https://echarts.apache.org/en/option.html#tooltip.position - position(pos, params, dom, rect, size) { - // tooltip will be fixed on the right if mouse hovering on the left, - // and on the left if hovering on the right. - const obj = { top: 60 }; - const mouseIsLeft = pos[0] < size.viewSize[0] / 2; - obj[['left', 'right'][+mouseIsLeft]] = mouseIsLeft ? 5 : 60; - return obj; - }, - }, + axisPointer: { link: [{ xAxisIndex: 'all' }], label: { From e91319c8fa6f9d87aff148c1509df57596f3d3eb Mon Sep 17 00:00:00 2001 From: Ivan Proskuryakov Date: Wed, 11 Jan 2023 15:53:21 +0300 Subject: [PATCH 3/5] feature: alternative chart version - legends removed --- .../charts/CandleChartContainerSimple.vue | 9 ++- src/components/charts/CandleChartSimple.vue | 76 ++++++------------- src/views/GraphsGrid.vue | 29 ++++--- 3 files changed, 44 insertions(+), 70 deletions(-) diff --git a/src/components/charts/CandleChartContainerSimple.vue b/src/components/charts/CandleChartContainerSimple.vue index 886a36bd1a..a082f1e7f8 100644 --- a/src/components/charts/CandleChartContainerSimple.vue +++ b/src/components/charts/CandleChartContainerSimple.vue @@ -1,7 +1,9 @@