@@ -146,11 +146,18 @@ export class Tip extends Mark {
146
146
this . setAttribute ( "stroke" , "none" ) ;
147
147
// iteratively render each channel value
148
148
const names = new Set ( ) ;
149
- for ( const line of format . call ( mark , i , sources , scales , values ) ) {
150
- const { name = "" } = line ;
151
- if ( name && names . has ( name ) ) continue ;
152
- else names . add ( name ) ;
153
- renderLine ( that , line ) ;
149
+ const lines = format . call ( mark , i , sources , scales , values ) ;
150
+ if ( typeof lines === "string" ) {
151
+ for ( const line of mark . splitLines ( lines ) ) {
152
+ renderLine ( that , { value : mark . clipLine ( line ) } ) ;
153
+ }
154
+ } else {
155
+ for ( const line of lines ) {
156
+ const { name = "" } = line ;
157
+ if ( name && names . has ( name ) ) continue ;
158
+ else names . add ( name ) ;
159
+ renderLine ( that , line ) ;
160
+ }
154
161
}
155
162
} )
156
163
)
@@ -305,11 +312,8 @@ function getSources({channels}) {
305
312
return sources ;
306
313
}
307
314
308
- function * formatTitle ( i , { title} ) {
309
- const text = title . value [ i ] ;
310
- for ( const line of this . splitLines ( formatDefault ( text ) ) ) {
311
- yield { name : "" , value : this . clipLine ( line ) } ;
312
- }
315
+ function formatTitle ( i , { title} ) {
316
+ return formatDefault ( title . value [ i ] ) ;
313
317
}
314
318
315
319
function * formatChannels ( i , channels , scales , values ) {
0 commit comments