Skip to content

Commit 9233254

Browse files
committed
Fix gc
1 parent 5483eb6 commit 9233254

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

pages/tools/gachacalc.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import {
22
BarElement, CategoryScale, Chart as ChartJS, Legend, LinearScale, LineElement, PointElement, Tooltip
33
} from "chart.js"
44
import Head from "next/head"
5-
import { DependencyList, EffectCallback, useEffect, useState } from "react"
6-
import { Chart } from "react-chartjs-2"
5+
import { EffectCallback, useEffect, useState } from "react"
6+
import { Bar, Line } from "react-chartjs-2"
77
import FormattedLink from "../../components/FormattedLink"
88
import Main from "../../components/Main"
99
import styles from "../style.module.css"
@@ -150,11 +150,10 @@ export default function GachaCalc({ location }: { location: string }) {
150150
<h3 className="text-lg font-bold pt-1" id="resistance">Results:</h3>
151151
<div className="columns-1 md:columns-2 mr-2">
152152
<div className="w-full bg-slate-800 rounded-xl p-1 my-2 md:my-0 text-white col-start-1">
153-
<Chart type="bar" data={({
153+
<Bar data={({
154154
labels: calculated.filter(x => x).map(c => getName(c, banner)),
155155
datasets: [
156156
{
157-
type: "bar" as const,
158157
label: "Rate",
159158
backgroundColor: "rgb(75, 192, 192)",
160159
data: calculated.filter(x => x).map((c, i, a) => c.rate * 100),
@@ -183,11 +182,10 @@ export default function GachaCalc({ location }: { location: string }) {
183182
}
184183
})} /></div>
185184
<div className="w-full bg-slate-800 rounded-xl p-1 my-2 md:my-0 text-white col-start-2">
186-
<Chart type="bar" data={({
185+
<Line data={({
187186
labels: calculated.filter(x => x).map(c => getName(c, banner)),
188187
datasets: [
189188
{
190-
type: "line" as const,
191189
label: "Cumulative rate",
192190
borderColor: "rgb(255, 99, 132)",
193191
borderWidth: 2,

0 commit comments

Comments
 (0)