@@ -146,11 +146,18 @@ export class Tip extends Mark {
146146 this . setAttribute ( "stroke" , "none" ) ;
147147 // iteratively render each channel value
148148 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+ }
154161 }
155162 } )
156163 )
@@ -305,11 +312,8 @@ function getSources({channels}) {
305312 return sources ;
306313}
307314
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 ] ) ;
313317}
314318
315319function * formatChannels ( i , channels , scales , values ) {
0 commit comments