From c4d5ff886cffbe35b310679ecd42a20389b9e821 Mon Sep 17 00:00:00 2001 From: xidedix Date: Fri, 25 May 2018 17:47:07 +0200 Subject: [PATCH] refactor(charts): add CustomTooltips, add chartId prop --- src/utils/getStyle.js | 10 ++ src/views/Charts.vue | 14 +-- src/views/Dashboard.vue | 26 ++--- src/views/charts/BarExample.vue | 37 ++++-- src/views/charts/DoughnutExample.vue | 2 +- src/views/charts/LineExample.vue | 47 ++++++-- src/views/charts/PieExample.vue | 2 +- src/views/charts/PolarAreaExample.vue | 18 ++- src/views/charts/RadarExample.vue | 22 +++- src/views/dashboard/CalloutChartExample.vue | 24 ++-- src/views/dashboard/CardBarChartExample.vue | 61 +++++----- src/views/dashboard/CardLine1ChartExample.vue | 107 +++++++++-------- src/views/dashboard/CardLine2ChartExample.vue | 108 ++++++++++-------- src/views/dashboard/CardLine3ChartExample.vue | 71 ++++++------ src/views/dashboard/MainChartExample.vue | 46 ++++---- src/views/dashboard/SocialBoxChartExample.vue | 5 + 16 files changed, 371 insertions(+), 229 deletions(-) create mode 100644 src/utils/getStyle.js diff --git a/src/utils/getStyle.js b/src/utils/getStyle.js new file mode 100644 index 00000000..efc89f21 --- /dev/null +++ b/src/utils/getStyle.js @@ -0,0 +1,10 @@ +// todo +// temp getStyle fix for IE +const getStyle = (prop, node) => { + const root = node || document.querySelector(':root') + const value = window.getComputedStyle(root).getPropertyValue(prop).trim() + // console.log('utils/getStyle', value) + return value +} + +export default getStyle diff --git a/src/views/Charts.vue b/src/views/Charts.vue index fbca1689..bcea281d 100644 --- a/src/views/Charts.vue +++ b/src/views/Charts.vue @@ -1,34 +1,34 @@