From 4b67b7668c10db84287541955b2136c4c0be41ca Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Fri, 7 Sep 2018 18:00:25 -0700 Subject: [PATCH] Use "global" gradients via a clipping mask and a rect w/100% height --- ui/app/components/line-chart.js | 4 +++ ui/app/templates/components/line-chart.hbs | 29 +++++++++++----------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/ui/app/components/line-chart.js b/ui/app/components/line-chart.js index 633c33945..e268c49fa 100644 --- a/ui/app/components/line-chart.js +++ b/ui/app/components/line-chart.js @@ -48,6 +48,10 @@ export default Component.extend(WindowResizable, { return `line-chart-fill-${guidFor(this)}`; }), + maskId: computed(function() { + return `line-chart-mask-${guidFor(this)}`; + }), + activeDatum: null, activeDatumLabel: computed('activeDatum', function() { diff --git a/ui/app/templates/components/line-chart.hbs b/ui/app/templates/components/line-chart.hbs index a5add6a24..33e8dc19f 100644 --- a/ui/app/templates/components/line-chart.hbs +++ b/ui/app/templates/components/line-chart.hbs @@ -1,29 +1,28 @@ - - - - - + + + + + + - +
-
    -

    - - - {{activeDatumLabel}} - - {{activeDatumValue}} -

    -
+

+ + + {{activeDatumLabel}} + + {{activeDatumValue}} +