Skip to content

Commit

Permalink
prettier run
Browse files Browse the repository at this point in the history
  • Loading branch information
mariakax3 committed Dec 3, 2024
1 parent dd207a5 commit 196a657
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
8 changes: 7 additions & 1 deletion packages/@mantine/charts/src/DonutChart/DonutChart.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ const data = [
export function Usage() {
return (
<div style={{ padding: 40 }}>
<DonutChart data={data} strokeWidth={1} strokeColor="red" legendMode="side" legendOrientation="bottom-right" />
<DonutChart
data={data}
strokeWidth={1}
strokeColor="red"
legendMode="side"
legendOrientation="bottom-right"
/>
</div>
);
}
Expand Down
12 changes: 5 additions & 7 deletions packages/@mantine/charts/src/DonutChart/DonutChart.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React, { useState } from 'react';
import {
Cell,
Legend,
Pie,
PieLabel,
PieProps,
PieChart as ReChartsPieChart,
ResponsiveContainer,
Tooltip,
TooltipProps,
Legend,
} from 'recharts';
import {
Box,
Expand All @@ -27,7 +28,6 @@ import {
} from '@mantine/core';
import { ChartTooltip } from '../ChartTooltip/ChartTooltip';
import classes from './DonutChart.module.css';
import React, { useState } from 'react';

export interface DonutChartCell {
name: string;
Expand Down Expand Up @@ -264,8 +264,8 @@ export const DonutChart = factory<DonutChartFactory>((_props, ref) => {
));

const legendPosition = {
'top': { x: 0, y: -180 },
'bottom': { x: 0, y: 180 },
top: { x: 0, y: -180 },
bottom: { x: 0, y: 180 },
'top-left': { x: -180, y: -180 },
'top-right': { x: 180, y: -180 },
'bottom-left': { x: -180, y: 180 },
Expand Down Expand Up @@ -325,9 +325,7 @@ export const DonutChart = factory<DonutChartFactory>((_props, ref) => {
classNames={resolvedClassNames}
styles={resolvedStyles}
type="radial"
segmentId={
tooltipDataSource === 'segment' ? payload?.[0]?.name : undefined
}
segmentId={tooltipDataSource === 'segment' ? payload?.[0]?.name : undefined}
valueFormatter={valueFormatter}
/>
)}
Expand Down

0 comments on commit 196a657

Please sign in to comment.