Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions src/components/charts/ConvictionGrowth.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import Image from 'next/image';
import { Line } from 'react-chartjs-2';
import ChartAxisLabel from './ChartAxisLabel';
import ChartGrid from '../ChartGrid';

interface ConvictionGrowthProps {
convictionPercentage: number[];
Expand Down Expand Up @@ -85,17 +85,23 @@ function ConvictionGrowthChart({
<div className="w-20 h-0 text-right relative -top-12 -left-2">
<ChartAxisLabel label="% of maximum conviction" />
</div>
<div className="flex justify-center py-2">
<ChartGrid
id="q"
chart={<Line data={data} options={options} />}
xAxisLabel={<ChartAxisLabel label="days" />}
yAxisLabel={<></>}
/>
{/* <div className="flex justify-center py-2">
<div className="w-full">
<Line data={data} options={options} />
<div className="relative h-3/5 abc-chart">
<Image layout="fill" src="/chart_bg.png" />
</div>
<Line data={data} options={options} />
</div>
</div>
<div className="w-24 h-0 ml-auto text-right relative bottom-2">
</div> */}
{/* <div className="w-24 h-0 ml-auto text-right relative bottom-2">
<ChartAxisLabel label="days" />
</div>
</div> */}
</>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/modals/ConvictionVoting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function ConvictionGrowthDialog({
}: ConvictionGrowthDialogProps) {
return (
<Modal handleClose={handleClose} isOpen={isOpen} title="Conviction Growth">
<div className="py-8 m-auto w-11/12">
<div className="pt-8 pb-2 m-auto w-11/12">
<ConvictionGrowthChart
convictionPercentage={convictionPercentage}
timeDays={timeDays}
Expand Down
18 changes: 9 additions & 9 deletions src/pages/config/4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ function ConvictionVoting() {
link: 'https://forum.tecommons.org/t/conviction-voting-conviction-growth-aka-half-life/490',
placeholder: 'days',
tooltipText: 'The amount of time it takes to increase Conviction by 50%.',
// children: (
// <span
// className="font-bj font-bold text-xs text-neon uppercase cursor-pointer"
// onClick={() => setDialogOpen(true)}
// >
// view graph
// </span>
// ),
children: (
<span
className="font-bj font-bold text-xs text-neon uppercase cursor-pointer"
onClick={() => setDialogOpen(true)}
>
view graph
</span>
),
},
];

Expand Down Expand Up @@ -121,7 +121,7 @@ function ConvictionVoting() {
tooltipText={input.tooltipText}
link={input.link}
>
{/* {input.children} */}
{input.children}
</Input>
))}
<div className="font-inter text-xs text-gray-200 pt-4 pb-2">
Expand Down