Skip to content

Commit

Permalink
fix: donut chart remove margin and add new default height (#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
severinlandolt authored Oct 2, 2023
1 parent 483441b commit c4dd460
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/chart-elements/DonutChart/DonutChart.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";
import React, { useEffect } from "react";
import { tremorTwMerge } from "lib";
import { tremorTwMerge, defaultValueFormatter, themeColorRange } from "lib";
import {
Pie,
PieChart as ReChartsDonutChart,
Expand All @@ -11,7 +11,6 @@ import {

import NoData from "../common/NoData";
import { Color, ValueFormatter } from "../../../lib/inputTypes";
import { defaultValueFormatter, themeColorRange } from "lib";

import { parseData, parseLabelInput } from "./inputParser";
import { DonutChartTooltip } from "./DonutChartTooltip";
Expand Down Expand Up @@ -123,7 +122,7 @@ const DonutChart = React.forwardRef<HTMLDivElement, DonutChartProps>((props, ref
}, [activeIndex]);

return (
<div ref={ref} className={tremorTwMerge("w-full h-44", className)} {...other}>
<div ref={ref} className={tremorTwMerge("w-full h-40", className)} {...other}>
<ResponsiveContainer className="h-full w-full">
{data?.length ? (
<ReChartsDonutChart
Expand All @@ -135,6 +134,7 @@ const DonutChart = React.forwardRef<HTMLDivElement, DonutChartProps>((props, ref
}
: undefined
}
margin={{ top: 0, left: 0, right: 0, bottom: 0 }}
>
{showLabel && isDonut ? (
<text
Expand Down

0 comments on commit c4dd460

Please sign in to comment.