Skip to content

Commit d461d6f

Browse files
committed
fix icon for scattergl
1 parent 5ce3d47 commit d461d6f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ function renderTraceIcon(trace, prefix = 'Plot') {
5858
if (!trace) {
5959
return null;
6060
}
61-
const componentName = `${prefix}${pascalCase(trace)}Icon`;
61+
const gl = 'gl';
62+
const componentName = `${prefix}${pascalCase(
63+
trace.endsWith(gl) ? trace.slice(0, -gl.length) : trace
64+
)}Icon`;
6265
return PlotlyIcons[componentName]
6366
? PlotlyIcons[componentName]
6467
: PlotlyIcons.PlotLineIcon;

0 commit comments

Comments
 (0)