@@ -168,14 +168,15 @@ define([
168
168
$ ( that . wrapSelector ( com_util . formatString ( '.vp-tab-page[data-type="{0}"]' , type ) ) ) . show ( ) ;
169
169
} ) ;
170
170
171
+ // change chart type
171
172
$ ( this . wrapSelector ( '#chartType' ) ) . on ( 'change' , function ( ) {
172
173
// add bins to histplot
173
174
let chartType = $ ( this ) . val ( ) ;
174
175
$ ( that . wrapSelector ( '.sb-option' ) ) . hide ( ) ;
175
176
if ( chartType == 'histplot' ) {
176
177
$ ( that . wrapSelector ( '.sb-option.bins' ) ) . show ( ) ;
177
178
}
178
- } )
179
+ } ) ;
179
180
180
181
// use data or not
181
182
$ ( this . wrapSelector ( '#setXY' ) ) . on ( 'change' , function ( ) {
@@ -659,13 +660,6 @@ define([
659
660
etcOptionCode . push ( userOption ) ;
660
661
}
661
662
662
- if ( etcOptionCode . length > 0 ) {
663
- etcOptionCode = [
664
- '' ,
665
- ...etcOptionCode
666
- ]
667
- }
668
-
669
663
if ( preview && useSampling ) {
670
664
// data sampling code for preview
671
665
// convertedData = data + '.sample(n=' + sampleCount + ', random_state=0)';
@@ -689,7 +683,8 @@ define([
689
683
}
690
684
}
691
685
692
- let generatedCode = com_generator . vp_codeGenerator ( this , config , state , etcOptionCode . join ( ', ' ) ) ;
686
+ let generatedCode = com_generator . vp_codeGenerator ( this , config , state
687
+ , etcOptionCode . length > 0 ? ', ' + etcOptionCode . join ( ', ' ) : '' ) ;
693
688
694
689
// Axes
695
690
if ( x_limit_from != '' && x_limit_to != '' ) {
0 commit comments