Skip to content

Commit b81fce0

Browse files
author
minjk-bl
committed
Change Seaborn code
1 parent 68825f4 commit b81fce0

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

js/m_visualize/Seaborn.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,15 @@ define([
168168
$(that.wrapSelector(com_util.formatString('.vp-tab-page[data-type="{0}"]', type))).show();
169169
});
170170

171+
// change chart type
171172
$(this.wrapSelector('#chartType')).on('change', function() {
172173
// add bins to histplot
173174
let chartType = $(this).val();
174175
$(that.wrapSelector('.sb-option')).hide();
175176
if (chartType == 'histplot') {
176177
$(that.wrapSelector('.sb-option.bins')).show();
177178
}
178-
})
179+
});
179180

180181
// use data or not
181182
$(this.wrapSelector('#setXY')).on('change', function() {
@@ -659,13 +660,6 @@ define([
659660
etcOptionCode.push(userOption);
660661
}
661662

662-
if (etcOptionCode.length > 0) {
663-
etcOptionCode = [
664-
'',
665-
...etcOptionCode
666-
]
667-
}
668-
669663
if (preview && useSampling) {
670664
// data sampling code for preview
671665
// convertedData = data + '.sample(n=' + sampleCount + ', random_state=0)';
@@ -689,7 +683,8 @@ define([
689683
}
690684
}
691685

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(', '): '');
693688

694689
// Axes
695690
if (x_limit_from != '' && x_limit_to != '') {

0 commit comments

Comments
 (0)