@@ -24,6 +24,10 @@ var script = {
24
24
default : function default$1 ( ) { return [ ] ; }
25
25
} ,
26
26
subLabels : Array ,
27
+ subLabelValue : {
28
+ type : String ,
29
+ default : 'percent'
30
+ } ,
27
31
direction : {
28
32
type : String ,
29
33
default : 'horizontal'
@@ -166,9 +170,7 @@ var script = {
166
170
. easing ( TWEEN . Easing . Cubic . InOut )
167
171
. onUpdate ( function ( ) {
168
172
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 ) ) ;
172
174
}
173
175
} ) ;
174
176
@@ -212,6 +214,11 @@ var script = {
212
214
. setHeight ( this . height ) ;
213
215
this . drawPaths ( ) ;
214
216
}
217
+ } ,
218
+ filters : {
219
+ format : function ( value ) {
220
+ return formatNumber ( value )
221
+ }
215
222
}
216
223
} ;
217
224
@@ -354,17 +361,17 @@ var browser = createInjector;
354
361
var __vue_script__ = script ;
355
362
356
363
/* 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 ) } ;
358
365
var __vue_staticRenderFns__ = [ ] ;
359
366
360
367
/* style */
361
368
var __vue_inject_styles__ = function ( inject ) {
362
369
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 } ) ;
364
371
365
372
} ;
366
373
/* scoped */
367
- var __vue_scope_id__ = "data-v-de071f9e " ;
374
+ var __vue_scope_id__ = "data-v-3f236e82 " ;
368
375
/* module identifier */
369
376
var __vue_module_identifier__ = undefined ;
370
377
/* functional template */
@@ -387,6 +394,7 @@ var __vue_staticRenderFns__ = [];
387
394
/* eslint-disable import/prefer-default-export */
388
395
389
396
var components = /*#__PURE__*/ Object . freeze ( {
397
+ __proto__ : null ,
390
398
VueFunnelGraph : vueFunnelGraph
391
399
} ) ;
392
400
0 commit comments