Skip to content

Commit 3989c65

Browse files
committed
Upate version and recompile
1 parent cbf5fa6 commit 3989c65

File tree

6 files changed

+39
-17
lines changed

6 files changed

+39
-17
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
### 0.1.7 (Feb 2, 2020)
2+
3+
* Add support for `subLabelValue`
4+
* Update packages
5+
* Fix minor issue
6+
17
### 0.1.6 (Jul 31, 2019)
28

39
* Fix issue where funnel was not generated vertically on load

dist/vue-funnel-graph.esm.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ var script = {
2424
default: function default$1() { return []; }
2525
},
2626
subLabels: Array,
27+
subLabelValue: {
28+
type: String,
29+
default: 'percent'
30+
},
2731
direction: {
2832
type: String,
2933
default: 'horizontal'
@@ -166,9 +170,7 @@ var script = {
166170
.easing(TWEEN.Easing.Cubic.InOut)
167171
.onUpdate(function () {
168172
for (var index = 0; index < this$1.paths.length; index++) {
169-
this$1.paths[index] = interpolators[index](position.value);
170-
// eslint-disable-next-line no-underscore-dangle
171-
this$1.paths.__ob__.dep.notify();
173+
this$1.$set(this$1.paths, index, interpolators[index](position.value));
172174
}
173175
});
174176

@@ -212,6 +214,11 @@ var script = {
212214
.setHeight(this.height);
213215
this.drawPaths();
214216
}
217+
},
218+
filters: {
219+
format: function (value) {
220+
return formatNumber(value)
221+
}
215222
}
216223
};
217224

@@ -354,17 +361,17 @@ var browser = createInjector;
354361
var __vue_script__ = script;
355362

356363
/* template */
357-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"funnel svg-funnel-js",class:{'svg-funnel-js--vertical': _vm.direction === 'vertical'}},[_c('div',{staticClass:"svg-funnel-js__container"},[_c('svg',{attrs:{"width":_vm.width,"height":_vm.height}},[_c('defs',_vm._l((_vm.gradientSet),function(colors,index){return _c('linearGradient',{key:index,attrs:{"id":("funnelGradient-" + ((index+1))),"gradientTransform":_vm.gradientAngle}},_vm._l((colors.values),function(color,index){return _c('stop',{key:index,attrs:{"stop-color":color,"offset":_vm.offsetColor(index, colors.values.length)}})}),1)}),1),_vm._v(" "),_vm._l((_vm.paths),function(path,index){return _c('path',{key:index,attrs:{"fill":_vm.colorSet[index].fill,"stroke":_vm.colorSet[index].fill,"d":path}})})],2)]),_vm._v(" "),_c('transition-group',{staticClass:"svg-funnel-js__labels",attrs:{"name":"appear","tag":"div"},on:{"enter":_vm.enterTransition,"leave":_vm.leaveTransition}},_vm._l((_vm.valuesFormatted),function(value,index){return _c('div',{key:_vm.labels[index].toLowerCase().split(' ').join('-'),staticClass:"svg-funnel-js__label",class:("label-" + ((index+1)))},[_c('div',{staticClass:"label__value"},[_vm._v(_vm._s(value))]),_vm._v(" "),(_vm.labels)?_c('div',{staticClass:"label__title"},[_vm._v(_vm._s(_vm.labels[index]))]):_vm._e(),_vm._v(" "),(_vm.displayPercentage && _vm.percentages()[index] !== 100)?_c('div',{staticClass:"label__percentage"},[_vm._v("\n "+_vm._s(_vm.percentages()[index])+"%\n ")]):_vm._e(),_vm._v(" "),(_vm.is2d())?_c('div',{staticClass:"label__segment-percentages"},[_c('ul',{staticClass:"segment-percentage__list"},_vm._l((_vm.subLabels),function(subLabel,j){return _c('li',{key:j},[_vm._v("\n "+_vm._s(subLabel)+":\n "),_c('span',{staticClass:"percentage__list-label"},[_vm._v(_vm._s(_vm.twoDimPercentages()[index][j])+"%")])])}),0)]):_vm._e()])}),0),_vm._v(" "),_c('transition',{attrs:{"name":"fade"},on:{"enter":_vm.enterTransition,"leave":_vm.leaveTransition}},[(_vm.is2d())?_c('div',{staticClass:"svg-funnel-js__subLabels"},_vm._l((_vm.subLabels),function(subLabel,index){return _c('div',{key:index,class:("svg-funnel-js__subLabel svg-funnel-js__subLabel-" + ((index + 1)))},[_c('div',{staticClass:"svg-funnel-js__subLabel--color",style:(_vm.subLabelBackgrounds(index))}),_vm._v(" "),_c('div',{staticClass:"svg-funnel-js__subLabel--title"},[_vm._v(_vm._s(subLabel))])])}),0):_vm._e()])],1)};
364+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"funnel svg-funnel-js",class:{'svg-funnel-js--vertical': _vm.direction === 'vertical'}},[_c('div',{staticClass:"svg-funnel-js__container"},[_c('svg',{attrs:{"width":_vm.width,"height":_vm.height}},[_c('defs',_vm._l((_vm.gradientSet),function(colors,index){return _c('linearGradient',{key:index,attrs:{"id":("funnelGradient-" + ((index+1))),"gradientTransform":_vm.gradientAngle}},_vm._l((colors.values),function(color,index){return _c('stop',{key:index,attrs:{"stop-color":color,"offset":_vm.offsetColor(index, colors.values.length)}})}),1)}),1),_vm._v(" "),_vm._l((_vm.paths),function(path,index){return _c('path',{key:index,attrs:{"fill":_vm.colorSet[index].fill,"stroke":_vm.colorSet[index].fill,"d":path}})})],2)]),_vm._v(" "),_c('transition-group',{staticClass:"svg-funnel-js__labels",attrs:{"name":"appear","tag":"div"},on:{"enter":_vm.enterTransition,"leave":_vm.leaveTransition}},_vm._l((_vm.valuesFormatted),function(value,index){return _c('div',{key:_vm.labels[index].toLowerCase().split(' ').join('-'),staticClass:"svg-funnel-js__label",class:("label-" + ((index+1)))},[_c('div',{staticClass:"label__value"},[_vm._v(_vm._s(value))]),_vm._v(" "),(_vm.labels)?_c('div',{staticClass:"label__title"},[_vm._v(_vm._s(_vm.labels[index]))]):_vm._e(),_vm._v(" "),(_vm.displayPercentage && _vm.percentages()[index] !== 100)?_c('div',{staticClass:"label__percentage"},[_vm._v("\n "+_vm._s(_vm.percentages()[index])+"%\n ")]):_vm._e(),_vm._v(" "),(_vm.is2d())?_c('div',{staticClass:"label__segment-percentages"},[_c('ul',{staticClass:"segment-percentage__list"},_vm._l((_vm.subLabels),function(subLabel,j){return _c('li',{key:j},[_vm._v("\n "+_vm._s(subLabel)+":\n "),(_vm.subLabelValue === 'percent')?_c('span',{staticClass:"percentage__list-label"},[_vm._v(_vm._s(_vm.twoDimPercentages()[index][j])+"%")]):_c('span',{staticClass:"percentage__list-label"},[_vm._v(_vm._s(_vm._f("format")(_vm.values[index][j])))])])}),0)]):_vm._e()])}),0),_vm._v(" "),_c('transition',{attrs:{"name":"fade"},on:{"enter":_vm.enterTransition,"leave":_vm.leaveTransition}},[(_vm.is2d())?_c('div',{staticClass:"svg-funnel-js__subLabels"},_vm._l((_vm.subLabels),function(subLabel,index){return _c('div',{key:index,class:("svg-funnel-js__subLabel svg-funnel-js__subLabel-" + ((index + 1)))},[_c('div',{staticClass:"svg-funnel-js__subLabel--color",style:(_vm.subLabelBackgrounds(index))}),_vm._v(" "),_c('div',{staticClass:"svg-funnel-js__subLabel--title"},[_vm._v(_vm._s(subLabel))])])}),0):_vm._e()])],1)};
358365
var __vue_staticRenderFns__ = [];
359366

360367
/* style */
361368
var __vue_inject_styles__ = function (inject) {
362369
if (!inject) { return }
363-
inject("data-v-de071f9e_0", { source: ".appear-enter-active[data-v-de071f9e],.appear-leave-active[data-v-de071f9e]{transition:all .7s ease-in-out}.appear-enter-to[data-v-de071f9e],.appear-leave[data-v-de071f9e]{max-width:100%;max-height:100%;opacity:1}.appear-enter[data-v-de071f9e],.appear-leave-to[data-v-de071f9e]{max-width:0;max-height:0;opacity:0}.fade-enter-active[data-v-de071f9e],.fade-leave-active[data-v-de071f9e]{transition:all .3s ease}.fade-enter-to[data-v-de071f9e],.fade-leave[data-v-de071f9e]{opacity:1}.fade-enter[data-v-de071f9e],.fade-leave-to[data-v-de071f9e]{opacity:0}", map: undefined, media: undefined });
370+
inject("data-v-3f236e82_0", { source: ".appear-enter-active[data-v-3f236e82],.appear-leave-active[data-v-3f236e82]{transition:all .7s ease-in-out}.appear-enter-to[data-v-3f236e82],.appear-leave[data-v-3f236e82]{max-width:100%;max-height:100%;opacity:1}.appear-enter[data-v-3f236e82],.appear-leave-to[data-v-3f236e82]{max-width:0;max-height:0;opacity:0}.fade-enter-active[data-v-3f236e82],.fade-leave-active[data-v-3f236e82]{transition:all .3s ease}.fade-enter-to[data-v-3f236e82],.fade-leave[data-v-3f236e82]{opacity:1}.fade-enter[data-v-3f236e82],.fade-leave-to[data-v-3f236e82]{opacity:0}", map: undefined, media: undefined });
364371

365372
};
366373
/* scoped */
367-
var __vue_scope_id__ = "data-v-de071f9e";
374+
var __vue_scope_id__ = "data-v-3f236e82";
368375
/* module identifier */
369376
var __vue_module_identifier__ = undefined;
370377
/* functional template */
@@ -387,6 +394,7 @@ var __vue_staticRenderFns__ = [];
387394
/* eslint-disable import/prefer-default-export */
388395

389396
var components = /*#__PURE__*/Object.freeze({
397+
__proto__: null,
390398
VueFunnelGraph: vueFunnelGraph
391399
});
392400

0 commit comments

Comments
 (0)