Skip to content

Commit 787d1cd

Browse files
committed
Remove the additional plotly.js '- increasing' label from trace names if no trace.name was set by user
1 parent c9222c8 commit 787d1cd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib/connectTraceToPlot.js

+5
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ export default function connectTraceToPlot(WrappedComponent) {
5555
};
5656
this.icon = renderTraceIcon(plotlyTraceToCustomTrace(trace));
5757
this.name = fullTrace.name;
58+
59+
const DEFAULT_FIN_CHART_TRACE_NAME = '- increasing';
60+
if (fullTrace.name.indexOf(DEFAULT_FIN_CHART_TRACE_NAME) && !trace.name) {
61+
this.name = fullTrace.name.replace(DEFAULT_FIN_CHART_TRACE_NAME, '');
62+
}
5863
}
5964

6065
getChildContext() {

0 commit comments

Comments
 (0)