Skip to content

Commit

Permalink
fix hover
Browse files Browse the repository at this point in the history
  • Loading branch information
sgratzl committed Sep 9, 2020
1 parent 2b83790 commit 3034840
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/elements/BoxAndWiskers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ export class BoxAndWiskers extends StatsBase<IBoxAndWhiskerProps, IBoxAndWhisker

// Draw the median line
ctx.save();
if (options.medianColor && options.medianColor !== 'transparent') {
console.log('median', options.medianColor);
if (options.medianColor && options.medianColor !== 'transparent' && options.medianColor !== '#0000') {
ctx.strokeStyle = options.medianColor;
}
ctx.beginPath();
Expand All @@ -81,7 +82,11 @@ export class BoxAndWiskers extends StatsBase<IBoxAndWhiskerProps, IBoxAndWhisker

ctx.save();
// fill the part below the median with lowerColor
if (options.lowerBackgroundColor && options.lowerBackgroundColor !== 'transparent') {
if (
options.lowerBackgroundColor &&
options.lowerBackgroundColor !== 'transparent' &&
options.lowerBackgroundColor !== '#0000'
) {
ctx.fillStyle = options.lowerBackgroundColor;
if (props.q3 > props.q1) {
ctx.fillRect(x0, props.median, width, props.q3 - props.median);
Expand Down

0 comments on commit 3034840

Please sign in to comment.