File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,18 @@ module.exports = function style(gd) {
2626 . each ( function ( d ) {
2727 var el = d3 . select ( this ) ;
2828 var pt = el . selectAll ( 'path.point' ) ;
29+ var trace = d . trace || d [ 0 ] . trace ;
2930
30- pt . call ( Drawing . pointStyle , d . trace || d [ 0 ] . trace ) ;
31+ pt . call ( Drawing . pointStyle , trace ) ;
3132
32- pt . each ( function ( cd ) {
33- d3 . select ( this ) . classed ( 'plotly-customdata' , cd . data !== null && cd . data !== undefined ) ;
34- } ) ;
33+ if ( trace . customdata ) {
34+ pt . each ( function ( cd ) {
35+ d3 . select ( this ) . classed ( 'plotly-customdata' , cd . data !== null && cd . data !== undefined ) ;
36+ } ) ;
37+ }
3538
3639 el . selectAll ( 'text' )
37- . call ( Drawing . textPointStyle , d . trace || d [ 0 ] . trace ) ;
40+ . call ( Drawing . textPointStyle , trace ) ;
3841 } ) ;
3942
4043 s . selectAll ( 'g.trace path.js-line' )
You can’t perform that action at this time.
0 commit comments