@lobehub/charts 1.9.8 → 1.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/AreaChart/index.d.ts +1 -1
- package/es/BarList/index.d.ts +1 -1
- package/es/DataBars/CategoryBar.d.ts +1 -1
- package/es/DataBars/DeltaBar.js +1 -1
- package/es/DonutChart/DonutChartTooltip.d.ts +1 -1
- package/es/DonutChart/index.d.ts +2 -2
- package/es/DonutChart/inputParser.d.ts +1 -1
- package/es/Heatmaps/Calendar.d.ts +1 -1
- package/es/Heatmaps/ChartLabels.d.ts +1 -1
- package/es/Heatmaps/index.d.ts +1 -1
- package/es/LineChart/index.d.ts +1 -1
- package/es/ScatterChart/ScatterChartTooltip.d.ts +1 -1
- package/es/ScatterChart/index.d.ts +2 -2
- package/es/SparkChart/SparkAreaChart.d.ts +1 -1
- package/es/SparkChart/SparkLineChart.d.ts +1 -1
- package/es/common/BaseChartProps.d.ts +1 -1
- package/es/common/ChartTooltip/index.d.ts +1 -1
- package/es/common/CustomTooltipProps.d.ts +1 -1
- package/es/common/CustomYAxisTick.d.ts +1 -1
- package/es/hooks/useThemeColorRange.js +4 -1
- package/es/index.d.ts +1 -1
- package/es/types/global.d.ts +9 -0
- package/es/utils/calendar.d.ts +1 -1
- package/es/utils/getMaxLabelLength.d.ts +1 -1
- package/es/utils/index.d.ts +1 -1
- package/es/utils/index.js +1 -1
- package/package.json +1 -1
- /package/es/{types.d.ts → types/charts.d.ts} +0 -0
- /package/es/{types.js → types/charts.js} +0 -0
package/es/AreaChart/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import BaseChartProps from "../common/BaseChartProps";
|
|
3
|
-
import { CurveType } from "../types";
|
|
3
|
+
import { CurveType } from "../types/charts";
|
|
4
4
|
export interface AreaChartProps extends BaseChartProps {
|
|
5
5
|
connectNulls?: boolean;
|
|
6
6
|
curveType?: CurveType;
|
package/es/BarList/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FlexboxProps } from 'react-layout-kit';
|
|
3
|
-
import { ValueFormatter } from "../types";
|
|
3
|
+
import { ValueFormatter } from "../types/charts";
|
|
4
4
|
export interface CategoryBarProps extends FlexboxProps {
|
|
5
5
|
colors?: string[];
|
|
6
6
|
markerValue?: number;
|
package/es/DataBars/DeltaBar.js
CHANGED
|
@@ -7,7 +7,7 @@ var _excluded = ["value", "bgColors", "color", "isIncreasePositive", "showAnimat
|
|
|
7
7
|
import { Tooltip } from '@lobehub/ui';
|
|
8
8
|
import { forwardRef } from 'react';
|
|
9
9
|
import { Flexbox } from 'react-layout-kit';
|
|
10
|
-
import { DeltaTypes } from "../types";
|
|
10
|
+
import { DeltaTypes } from "../types/charts";
|
|
11
11
|
import { mapInputsToDeltaType } from "../utils";
|
|
12
12
|
import { useStyles } from "./styles";
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
package/es/DonutChart/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { CSSProperties, ComponentType } from 'react';
|
|
|
2
2
|
import type BaseAnimationTimingProps from "../common/BaseAnimationTimingProps";
|
|
3
3
|
import { CustomTooltipProps } from "../common/CustomTooltipProps";
|
|
4
4
|
import { type NoDataProps } from "../common/NoData";
|
|
5
|
-
import type { EventProps } from "../types";
|
|
6
|
-
import { ValueFormatter } from "../types";
|
|
5
|
+
import type { EventProps } from "../types/charts";
|
|
6
|
+
import { ValueFormatter } from "../types/charts";
|
|
7
7
|
type DonutChartVariant = 'donut' | 'pie';
|
|
8
8
|
export interface DonutChartProps extends BaseAnimationTimingProps {
|
|
9
9
|
category?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ValueFormatter } from "../types";
|
|
1
|
+
import { ValueFormatter } from "../types/charts";
|
|
2
2
|
export declare const parseLabelInput: (labelInput: string | undefined, valueFormatter: ValueFormatter, data: any[], category: string) => string;
|
package/es/Heatmaps/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Day as WeekDay } from 'date-fns';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { FlexboxProps } from 'react-layout-kit';
|
|
4
4
|
import { NoDataProps } from "../common/NoData";
|
|
5
|
-
import type { Activity, Labels } from "../types";
|
|
5
|
+
import type { Activity, Labels } from "../types/charts";
|
|
6
6
|
export interface HeatmapsProps extends FlexboxProps {
|
|
7
7
|
blockMargin?: number;
|
|
8
8
|
blockRadius?: number;
|
package/es/LineChart/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import BaseChartProps from "../common/BaseChartProps";
|
|
3
|
-
import { CurveType } from "../types";
|
|
3
|
+
import { CurveType } from "../types/charts";
|
|
4
4
|
export interface LineChartProps extends BaseChartProps {
|
|
5
5
|
connectNulls?: boolean;
|
|
6
6
|
curveType?: CurveType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentType, HTMLAttributes } from 'react';
|
|
2
2
|
import { CustomTooltipProps } from "../common/CustomTooltipProps";
|
|
3
|
-
import type { EventProps } from "../types";
|
|
4
|
-
import { IntervalType, ValueFormatter } from "../types";
|
|
3
|
+
import type { EventProps } from "../types/charts";
|
|
4
|
+
import { IntervalType, ValueFormatter } from "../types/charts";
|
|
5
5
|
import BaseAnimationTimingProps from '../common/BaseAnimationTimingProps';
|
|
6
6
|
import { type NoDataProps } from '../common/NoData';
|
|
7
7
|
export type ScatterChartValueFormatter = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import BaseSparkChartProps from "../common/BaseSparkChartProps";
|
|
3
|
-
import { CurveType } from "../types";
|
|
3
|
+
import { CurveType } from "../types/charts";
|
|
4
4
|
export interface SparkAreaChartProps extends BaseSparkChartProps {
|
|
5
5
|
connectNulls?: boolean;
|
|
6
6
|
curveType?: CurveType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import BaseSparkChartProps from "../common/BaseSparkChartProps";
|
|
3
|
-
import { CurveType } from "../types";
|
|
3
|
+
import { CurveType } from "../types/charts";
|
|
4
4
|
export interface SparkLineChartProps extends BaseSparkChartProps {
|
|
5
5
|
connectNulls?: boolean;
|
|
6
6
|
curveType?: CurveType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentType, HTMLAttributes } from 'react';
|
|
2
2
|
import type { NoDataProps } from "./NoData";
|
|
3
|
-
import { IntervalType, LabelFormatter, ValueFormatter } from "../types";
|
|
3
|
+
import { IntervalType, LabelFormatter, ValueFormatter } from "../types/charts";
|
|
4
4
|
import type BaseAnimationTimingProps from './BaseAnimationTimingProps';
|
|
5
5
|
import { CustomTooltipProps } from './CustomTooltipProps';
|
|
6
6
|
type FixedProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NameType, Payload } from 'recharts/types/component/DefaultTooltipContent';
|
|
2
2
|
import { ScatterChartValueFormatter } from "../ScatterChart";
|
|
3
|
-
import { ValueFormatter } from "../types";
|
|
3
|
+
import { ValueFormatter } from "../types/charts";
|
|
4
4
|
export type CustomTooltipProps = {
|
|
5
5
|
active: boolean | undefined;
|
|
6
6
|
customCategories?: {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { useTheme } from 'antd-style';
|
|
2
|
+
import { useMemo } from 'react';
|
|
2
3
|
export var useThemeColorRange = function useThemeColorRange() {
|
|
3
4
|
var theme = useTheme();
|
|
4
|
-
return
|
|
5
|
+
return useMemo(function () {
|
|
6
|
+
return [theme.geekblue, theme.gold, theme.green, theme.cyan, theme.purple, theme.red, theme.volcano, theme.gray, theme.geekblue7, theme.gold7, theme.green7, theme.cyan7, theme.purple7, theme.red7, theme.volcano7, theme.gray7];
|
|
7
|
+
}, [theme]);
|
|
5
8
|
};
|
package/es/index.d.ts
CHANGED
|
@@ -13,5 +13,5 @@ export { default as LineChart, type LineChartProps } from './LineChart';
|
|
|
13
13
|
export { default as ScatterChart, type ScatterChartProps } from './ScatterChart';
|
|
14
14
|
export * from './SparkChart';
|
|
15
15
|
export { default as Tracker, type TrackerProps } from './Tracker';
|
|
16
|
-
export type * from './types';
|
|
16
|
+
export type * from './types/charts';
|
|
17
17
|
export { useThemeColorRange } from "./hooks/useThemeColorRange";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LobeCustomStylish, LobeCustomToken } from '@lobehub/ui';
|
|
2
|
+
import 'antd-style';
|
|
3
|
+
|
|
4
|
+
declare module 'antd-style' {
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
6
|
+
export interface CustomToken extends LobeCustomToken {}
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
8
|
+
export interface CustomStylish extends LobeCustomStylish {}
|
|
9
|
+
}
|
package/es/utils/calendar.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValueFormatter } from "../types";
|
|
1
|
+
import { ValueFormatter } from "../types/charts";
|
|
2
2
|
export declare const getTextWidth: (text: string) => number;
|
|
3
3
|
export declare const getMaxLabelLength: ({ data, valueFormatter, index, layout, margin, isScatterChart, }: {
|
|
4
4
|
data: Array<Record<string, any>>;
|
package/es/utils/index.d.ts
CHANGED
package/es/utils/index.js
CHANGED
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|