From 196a657b56009a5243c9825817c96191ccf0a937 Mon Sep 17 00:00:00 2001 From: mariakax3 Date: Tue, 3 Dec 2024 06:17:56 +0100 Subject: [PATCH] prettier run --- .../charts/src/DonutChart/DonutChart.story.tsx | 8 +++++++- .../@mantine/charts/src/DonutChart/DonutChart.tsx | 12 +++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/@mantine/charts/src/DonutChart/DonutChart.story.tsx b/packages/@mantine/charts/src/DonutChart/DonutChart.story.tsx index c636af207b..5abfb0b909 100644 --- a/packages/@mantine/charts/src/DonutChart/DonutChart.story.tsx +++ b/packages/@mantine/charts/src/DonutChart/DonutChart.story.tsx @@ -12,7 +12,13 @@ const data = [ export function Usage() { return (
- +
); } diff --git a/packages/@mantine/charts/src/DonutChart/DonutChart.tsx b/packages/@mantine/charts/src/DonutChart/DonutChart.tsx index 8de848d613..7cc7e53e14 100644 --- a/packages/@mantine/charts/src/DonutChart/DonutChart.tsx +++ b/packages/@mantine/charts/src/DonutChart/DonutChart.tsx @@ -1,5 +1,7 @@ +import React, { useState } from 'react'; import { Cell, + Legend, Pie, PieLabel, PieProps, @@ -7,7 +9,6 @@ import { ResponsiveContainer, Tooltip, TooltipProps, - Legend, } from 'recharts'; import { Box, @@ -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; @@ -264,8 +264,8 @@ export const DonutChart = factory((_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 }, @@ -325,9 +325,7 @@ export const DonutChart = factory((_props, ref) => { classNames={resolvedClassNames} styles={resolvedStyles} type="radial" - segmentId={ - tooltipDataSource === 'segment' ? payload?.[0]?.name : undefined - } + segmentId={tooltipDataSource === 'segment' ? payload?.[0]?.name : undefined} valueFormatter={valueFormatter} /> )}