77 renderTraceIcon ,
88 traceTypeToAxisType ,
99 getFullTrace ,
10+ getParsedTemplateString ,
1011} from '../lib' ;
1112import { deepCopyPublic , setMultiValuedContainer } from './multiValues' ;
1213import { EDITOR_ACTIONS , SUBPLOT_TO_ATTR } from 'lib/constants' ;
@@ -27,7 +28,7 @@ export default function connectTraceToPlot(WrappedComponent) {
2728
2829 setLocals ( props , context ) {
2930 const { traceIndexes} = props ;
30- const { data, fullData, plotly} = context ;
31+ const { data, fullData, plotly, layout : meta } = context ;
3132
3233 const trace = data [ traceIndexes [ 0 ] ] ;
3334 const fullTrace = getFullTrace ( props , context ) ;
@@ -68,7 +69,7 @@ export default function connectTraceToPlot(WrappedComponent) {
6869
6970 if ( trace && fullTrace ) {
7071 this . icon = renderTraceIcon ( plotlyTraceToCustomTrace ( trace ) ) ;
71- this . name = fullTrace . name ;
72+ this . name = getParsedTemplateString ( fullTrace . name , meta ) ;
7273 }
7374 }
7475
@@ -194,6 +195,7 @@ export default function connectTraceToPlot(WrappedComponent) {
194195 data : PropTypes . array ,
195196 plotly : PropTypes . object ,
196197 onUpdate : PropTypes . func ,
198+ layout : PropTypes . object ,
197199 } ;
198200
199201 TraceConnectedComponent . childContextTypes = {
0 commit comments