Skip to content

Commit

Permalink
Yeet red on charts
Browse files Browse the repository at this point in the history
  • Loading branch information
Umbranoxio committed May 11, 2024
1 parent 2cdad4a commit cd68685
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib/components/player/rank-chart.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
labels.push(label);
}
const skipped = (ctx, value) => (ctx.p0.skip || ctx.p1.skip ? value : undefined);
const down = (ctx, value) => (ctx.p0.parsed.y < ctx.p1.parsed.y ? value : undefined);
const data = {
labels: labels,
datasets: [
Expand All @@ -90,7 +89,7 @@
fill: false,
color: '#fff',
segment: {
borderColor: (ctx) => skipped(ctx, 'rgb(186,186,186,0.2)') || down(ctx, 'rgb(192,75,75)'),
borderColor: (ctx) => skipped(ctx, 'rgb(186,186,186,0.2)'),
borderDash: (ctx) => skipped(ctx, [6, 6])
}
}
Expand Down

0 comments on commit cd68685

Please sign in to comment.