File tree Expand file tree Collapse file tree 3 files changed +42
-1
lines changed Expand file tree Collapse file tree 3 files changed +42
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import {interpolatePiecewise} from "../scales/quantitative.js";
33import { applyInlineStyles , maybeClassName } from "../style.js" ;
44
55export function legendRamp ( color , {
6- label,
6+ label = color . label ,
77 tickSize = 6 ,
88 width = 240 ,
99 height = 44 + tickSize ,
Original file line number Diff line number Diff line change @@ -204,6 +204,13 @@ export function colorLegendQuantileImplicit() {
204204 } ) . legend ( "color" ) ;
205205}
206206
207+ export function colorLegendImplicitLabel ( ) {
208+ return Plot . plot ( {
209+ color : { scheme : "viridis" } ,
210+ marks : [ Plot . dot ( d3 . range ( 100 ) . map ( i => ( { thing : i } ) ) , { fill : "thing" } ) ]
211+ } ) . legend ( "color" ) ;
212+ }
213+
207214export function colorLegendDiverging ( ) {
208215 return Plot . legend ( {
209216 color : {
You can’t perform that action at this time.
0 commit comments