@@ -78,7 +78,7 @@ dc.scatterPlot = function (parent, chartGroup) {
78
78
. attr ( 'fill' , _chart . getColor )
79
79
. attr ( 'transform' , _locator ) ;
80
80
81
- symbols . call ( renderTitle , _chart . data ( ) ) ;
81
+ symbols . call ( renderTitles , _chart . data ( ) ) ;
82
82
83
83
symbols . each ( function ( d , i ) {
84
84
_filtered [ i ] = ! _chart . filter ( ) || _chart . filter ( ) . isFiltered ( [ d . key [ 0 ] , d . key [ 1 ] ] ) ;
@@ -110,6 +110,15 @@ dc.scatterPlot = function (parent, chartGroup) {
110
110
. attr ( 'opacity' , 0 ) . remove ( ) ;
111
111
} ;
112
112
113
+ function renderTitles ( symbol , d ) {
114
+ if ( _chart . renderTitle ( ) ) {
115
+ symbol . selectAll ( 'title' ) . remove ( ) ;
116
+ symbol . append ( 'title' ) . text ( function ( d ) {
117
+ return _chart . title ( ) ( d ) ;
118
+ } ) ;
119
+ }
120
+ }
121
+
113
122
/**
114
123
* Get or set the existence accessor. If a point exists, it is drawn with
115
124
* {@link dc.scatterPlot#symbolSize symbolSize} radius and
@@ -260,15 +269,6 @@ dc.scatterPlot = function (parent, chartGroup) {
260
269
return _chart ;
261
270
} ;
262
271
263
- function renderTitle ( symbol , d ) {
264
- if ( _chart . renderTitle ( ) ) {
265
- symbol . selectAll ( 'title' ) . remove ( ) ;
266
- symbol . append ( 'title' ) . text ( function ( d ) {
267
- return _chart . title ( ) ( d ) ;
268
- } ) ;
269
- }
270
- }
271
-
272
272
/**
273
273
* Set or get color for symbols when the group is empty. If null, just use the
274
274
* {@link dc.colorMixin#colors colorMixin.colors} color scale zero value.
0 commit comments