@lobehub/charts 1.9.7 → 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 +4 -2
- package/es/common/ChartTooltip/index.js +3 -2
- 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 +3 -1
- package/es/index.js +2 -0
- 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,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ValueFormatter } from "../../types/charts";
|
|
2
3
|
export interface ChartTooltipProps {
|
|
3
4
|
active: boolean | undefined;
|
|
4
5
|
categoryColors: Map<string, string>;
|
|
5
6
|
customCategories?: {
|
|
6
7
|
[key: string]: string;
|
|
7
8
|
};
|
|
9
|
+
footer?: ReactNode;
|
|
8
10
|
label: string;
|
|
9
11
|
payload: any;
|
|
10
12
|
valueFormatter: ValueFormatter;
|
|
11
13
|
}
|
|
12
|
-
declare const ChartTooltip: ({ active, payload, label, categoryColors, valueFormatter, customCategories, }: ChartTooltipProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
declare const ChartTooltip: ({ active, payload, label, categoryColors, valueFormatter, customCategories, footer, }: ChartTooltipProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
15
|
export default ChartTooltip;
|
|
@@ -20,7 +20,8 @@ var ChartTooltip = function ChartTooltip(_ref2) {
|
|
|
20
20
|
label = _ref2.label,
|
|
21
21
|
categoryColors = _ref2.categoryColors,
|
|
22
22
|
valueFormatter = _ref2.valueFormatter,
|
|
23
|
-
customCategories = _ref2.customCategories
|
|
23
|
+
customCategories = _ref2.customCategories,
|
|
24
|
+
footer = _ref2.footer;
|
|
24
25
|
var _useStyles = useStyles(),
|
|
25
26
|
cx = _useStyles.cx,
|
|
26
27
|
theme = _useStyles.theme,
|
|
@@ -59,7 +60,7 @@ var ChartTooltip = function ChartTooltip(_ref2) {
|
|
|
59
60
|
value: valueFormatter(value)
|
|
60
61
|
}, "id-".concat(idx));
|
|
61
62
|
})
|
|
62
|
-
})]
|
|
63
|
+
}), footer]
|
|
63
64
|
});
|
|
64
65
|
}
|
|
65
66
|
return null;
|
|
@@ -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
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export { default as AreaChart, type AreaChartProps } from './AreaChart';
|
|
2
2
|
export { default as BarChart, type BarChartProps } from './BarChart';
|
|
3
3
|
export { type Bar, default as BarList, type BarListProps } from './BarList';
|
|
4
|
+
export { default as ChartTooltip, type ChartTooltipProps } from './common/ChartTooltip';
|
|
4
5
|
export { default as ChartTooltipFrame } from './common/ChartTooltip/ChartTooltipFrame';
|
|
6
|
+
export { default as ChartTooltipRow } from './common/ChartTooltip/ChartTooltipRow';
|
|
5
7
|
export * from './DataBars';
|
|
6
8
|
export { default as DonutChart, type DonutChartProps } from './DonutChart';
|
|
7
9
|
export { default as FunnelChart, type FunnelChartProps } from './FunnelChart';
|
|
@@ -11,5 +13,5 @@ export { default as LineChart, type LineChartProps } from './LineChart';
|
|
|
11
13
|
export { default as ScatterChart, type ScatterChartProps } from './ScatterChart';
|
|
12
14
|
export * from './SparkChart';
|
|
13
15
|
export { default as Tracker, type TrackerProps } from './Tracker';
|
|
14
|
-
export type * from './types';
|
|
16
|
+
export type * from './types/charts';
|
|
15
17
|
export { useThemeColorRange } from "./hooks/useThemeColorRange";
|
package/es/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export { default as AreaChart } from "./AreaChart";
|
|
2
2
|
export { default as BarChart } from "./BarChart";
|
|
3
3
|
export { default as BarList } from "./BarList";
|
|
4
|
+
export { default as ChartTooltip } from "./common/ChartTooltip";
|
|
4
5
|
export { default as ChartTooltipFrame } from "./common/ChartTooltip/ChartTooltipFrame";
|
|
6
|
+
export { default as ChartTooltipRow } from "./common/ChartTooltip/ChartTooltipRow";
|
|
5
7
|
export * from "./DataBars";
|
|
6
8
|
export { default as DonutChart } from "./DonutChart";
|
|
7
9
|
export { default as FunnelChart } from "./FunnelChart";
|
|
@@ -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
|