Skip to content

Commit

Permalink
clean up imports
Browse files Browse the repository at this point in the history
  • Loading branch information
severinlandolt committed Dec 12, 2024
1 parent 745f89a commit a7d8bfa
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 14 deletions.
10 changes: 8 additions & 2 deletions src/components/chart-elements/AreaChart/AreaChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@ import {
hasOnlyOneValueForThisKey,
} from "../common/utils";

import { defaultValueFormatter, themeColorRange, tremorTwMerge } from "lib";
import {
defaultValueFormatter,
fillColors,
strokeColors,
textColors,
themeColorRange,
tremorTwMerge,
} from "lib";
import { Color, CurveType } from "../../../lib/inputTypes";
import { fillColors, strokeColors, textColors } from "../common";

interface AreaChartProps extends BaseChartProps {
stack?: boolean;
Expand Down
10 changes: 8 additions & 2 deletions src/components/chart-elements/BarChart/BarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ import ChartTooltip from "../common/ChartTooltip";
import NoData from "../common/NoData";
import { constructCategoryColors, deepEqual, getYAxisDomain } from "../common/utils";

import { fillColors } from "components/spark-elements/common/style";
import { BaseColors, Color, defaultValueFormatter, themeColorRange, tremorTwMerge } from "lib";
import {
BaseColors,
Color,
defaultValueFormatter,
fillColors,
themeColorRange,
tremorTwMerge,
} from "lib";
import { AxisDomain } from "recharts/types/util/types";

const renderShape = (
Expand Down
2 changes: 1 addition & 1 deletion src/components/chart-elements/DonutChart/DonutChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { DonutChartTooltip } from "./DonutChartTooltip";
import { parseData, parseLabelInput } from "./inputParser";

import { CustomTooltipProps } from "components/chart-elements/common/CustomTooltipProps";
import type { EventProps } from "lib";
import { EventProps } from "../common";
import type BaseAnimationTimingProps from "../common/BaseAnimationTimingProps";

type DonutChartVariant = "donut" | "pie";
Expand Down
3 changes: 1 addition & 2 deletions src/components/chart-elements/DonutChart/inputParser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { fillColors } from "components/spark-elements/common/style";
import { sumNumericArray } from "lib";
import { fillColors, sumNumericArray } from "lib";
import { Color, ValueFormatter } from "../../../lib/inputTypes";

export const parseData = (data: any[], colors: (Color | string)[]) =>
Expand Down
3 changes: 1 addition & 2 deletions src/components/chart-elements/FunnelChart/FunnelChart.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ArrowRightIcon } from "assets";
import { textColors } from "components/spark-elements/common/style";
import { Color, defaultValueFormatter, tremorTwMerge } from "lib";
import { Color, defaultValueFormatter, textColors, tremorTwMerge } from "lib";
import React from "react";
import { CustomTooltipProps, EventProps } from "../common";
import { ChartTooltipFrame, ChartTooltipRow } from "../common/ChartTooltip";
Expand Down
9 changes: 7 additions & 2 deletions src/components/chart-elements/LineChart/LineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@ import {
hasOnlyOneValueForThisKey,
} from "../common/utils";

import { fillColors, strokeColors } from "components/spark-elements/common/style";
import { defaultValueFormatter, themeColorRange, tremorTwMerge } from "lib";
import {
defaultValueFormatter,
fillColors,
strokeColors,
themeColorRange,
tremorTwMerge,
} from "lib";
import { Color, CurveType } from "../../../lib/inputTypes";

interface LineChartProps extends BaseChartProps {
Expand Down
3 changes: 2 additions & 1 deletion src/components/chart-elements/ScatterChart/ScatterChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { AxisDomain } from "recharts/types/util/types";

import ChartLegend from "components/chart-elements/common/ChartLegend";
import ScatterChartTooltip from "components/chart-elements/ScatterChart/ScatterChartTooltip";
import type { EventProps } from "lib";

import BaseAnimationTimingProps from "../common/BaseAnimationTimingProps";
import NoData from "../common/NoData";
import {
Expand All @@ -37,6 +37,7 @@ import {
tremorTwMerge,
} from "lib";
import { Color, IntervalType, ValueFormatter } from "../../../lib/inputTypes";
import { EventProps } from "../common";

export type ScatterChartValueFormatter = {
x?: ValueFormatter;
Expand Down
3 changes: 1 addition & 2 deletions src/components/chart-elements/common/ChartTooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { bgColors } from "components/spark-elements/common/style";
import { Color, ValueFormatter, tremorTwMerge } from "lib";
import { Color, ValueFormatter, bgColors, tremorTwMerge } from "lib";
import React from "react";

export const ChartTooltipFrame = ({ children }: { children: React.ReactNode }) => (
Expand Down

0 comments on commit a7d8bfa

Please sign in to comment.