Skip to content

Commit

Permalink
Merge pull request #193 from eejaad/waiting-time-statistics
Browse files Browse the repository at this point in the history
Waiting time statistics
  • Loading branch information
AmirhBeigi authored Jan 30, 2024
2 parents bc4748e + f0900d6 commit d18fa56
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ interface WaitingTimeChartProps {
data: WaitingTimeData[]
}

const RADIAN = Math.PI / 170;
const RADIAN = Math.PI / 180;
const COLORS = ['#39923D', '#3AB440', '#FFAD0D', '#F07300'];

const CustomizedLabel = (props: LabelProps) => {
const { cx, cy, midAngle, innerRadius, outerRadius, percent } = props;
const radius = innerRadius + (outerRadius - innerRadius) * 0.8;
const radius = innerRadius + (outerRadius - innerRadius) * 0.7;
const x = cx + radius * Math.cos(-midAngle * RADIAN);
const y = cy + radius * Math.sin(-midAngle * RADIAN);

Expand All @@ -37,7 +37,7 @@ const CustomizedLabel = (props: LabelProps) => {
x={x}
y={y}
fill="white"
textAnchor={x > cx ? 'start' : 'end'}
textAnchor="middle"
dominantBaseline="central"
className="text-sm font-semibold outline-none"
>
Expand Down

0 comments on commit d18fa56

Please sign in to comment.