File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -290,10 +290,10 @@ export class PlotlyGraph extends HTMLElement {
290290 }
291291 }
292292
293- const schemeName = this . config . color_scheme ?? "category10"
294- let colorScheme =
293+ const schemeName = this . config . color_scheme ?? "category10" ;
294+ let colorScheme =
295295 colorSchemes [ schemeName ] ||
296- colorSchemes [ Object . keys ( colorSchemes ) [ schemeName ] ] ||
296+ colorSchemes [ Object . keys ( colorSchemes ) [ schemeName ] ] ||
297297 colorSchemes . category10 ;
298298 const mergedTrace = merge (
299299 {
@@ -306,7 +306,6 @@ export class PlotlyGraph extends HTMLElement {
306306 shape : "hv" ,
307307 color : colorScheme [ traceIdx % colorScheme . length ] ,
308308 } ,
309- legendgroup : "group" + traceIdx ,
310309 x : xs ,
311310 y : ys ,
312311 yaxis : "y" + ( yaxis_idx == 0 ? "" : yaxis_idx + 1 ) ,
@@ -316,6 +315,9 @@ export class PlotlyGraph extends HTMLElement {
316315 ) ;
317316 const traces : Plotly . Data [ ] = [ mergedTrace ] ;
318317 if ( mergedTrace . show_value ) {
318+ merge ( mergedTrace , {
319+ legendgroup : "group" + traceIdx ,
320+ } ) ;
319321 traces . push ( {
320322 ...mergedTrace ,
321323 mode : "text+markers" ,
You can’t perform that action at this time.
0 commit comments