Skip to content

Commit

Permalink
Oops
Browse files Browse the repository at this point in the history
Update puzzle radar chart.js like it is in lichess, test later
  • Loading branch information
WandererXII committed Jan 13, 2024
1 parent 3dd8ae9 commit 70ca75b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 19 deletions.
2 changes: 1 addition & 1 deletion modules/fishnet/src/test/VariationValidationTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class VariationValidationTest extends Specification {

private def evenIncomplete(result: Reader.Result): Replay =
result match {
case Reader.Result.Complete(_, replay) => replay
case Reader.Result.Complete(replay) => replay
case Reader.Result.Incomplete(replay, _) => replay
}

Expand Down
2 changes: 1 addition & 1 deletion ui/puzzle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"license": "AGPL-3.0-or-later",
"devDependencies": {
"@build/rollupProject": "2.0.0",
"@types/chart.js": "^2.9.29",
"@types/chart.js": "^4.4",
"@types/lishogi": "2.0.0",
"rollup": "^2",
"typescript": "^5"
Expand Down
39 changes: 22 additions & 17 deletions ui/puzzle/src/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,30 @@ export function renderRadar(data: any) {
type: 'radar',
data: d,
options: {
legend: {
display: false,
},
scale: {
ticks: {
aspectRatio: 2,
scales: {
r: {
beginAtZero: false,
suggestedMin: Math.min(...d.datasets[0].data) - 100,
fontColor,
showLabelBackdrop: false, // hide square behind text
},
pointLabels: {
fontSize: 16,
fontColor,
},
gridLines: {
color: lineColor,
},
angleLines: {
color: lineColor,
ticks: {
color: fontColor,
showLabelBackdrop: false, // hide square behind text
format: {
useGrouping: false,
},
},
pointLabels: {
color: fontColor,
font: {
size: window.innerWidth < 500 ? 11 : 16,
},
},
grid: {
color: lineColor,
},
angleLines: {
color: lineColor,
},
},
},
},
Expand Down

0 comments on commit 70ca75b

Please sign in to comment.