File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,35 @@ describe('finance charts defaults:', function() {
220220 ] ) ;
221221 } ) ;
222222
223+ it ( 'trace *name* default should make reference to user data trace indices' , function ( ) {
224+ var trace0 = Lib . extendDeep ( { } , mock0 , {
225+ type : 'ohlc'
226+ } ) ;
227+
228+ var trace1 = { type : 'scatter' } ;
229+
230+ var trace2 = Lib . extendDeep ( { } , mock1 , {
231+ type : 'candlestick' ,
232+ } ) ;
233+
234+ var trace3 = { type : 'bar' } ;
235+
236+ var out = _supply ( [ trace0 , trace1 , trace2 , trace3 ] ) ;
237+
238+ var names = out . _fullData . map ( function ( fullTrace ) {
239+ return fullTrace . name ;
240+ } ) ;
241+
242+ expect ( names ) . toEqual ( [
243+ 'trace 0 - increasing' ,
244+ 'trace 0 - decreasing' ,
245+ 'trace 1' ,
246+ 'trace 2 - increasing' ,
247+ 'trace 2 - decreasing' ,
248+ 'trace 3'
249+ ] ) ;
250+ } ) ;
251+
223252 it ( 'trace-wide styling should set default for corresponding per-direction styling' , function ( ) {
224253 function assertLine ( cont , width , dash ) {
225254 expect ( cont . line . width ) . toEqual ( width ) ;
You can’t perform that action at this time.
0 commit comments