@lobehub/charts 1.9.6 → 1.9.8

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.
@@ -1,3 +1,4 @@
1
+ import { ReactNode } from 'react';
1
2
  import { ValueFormatter } from "../../types";
2
3
  export interface ChartTooltipProps {
3
4
  active: boolean | undefined;
@@ -5,9 +6,10 @@ export interface ChartTooltipProps {
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,
@@ -46,6 +47,7 @@ var ChartTooltip = function ChartTooltip(_ref2) {
46
47
  paddingBlock: 8,
47
48
  paddingInline: 16,
48
49
  style: {
50
+ flexDirection: 'column-reverse',
49
51
  marginTop: 4
50
52
  },
51
53
  children: filteredPayload.map(function (_ref3, idx) {
@@ -58,7 +60,7 @@ var ChartTooltip = function ChartTooltip(_ref2) {
58
60
  value: valueFormatter(value)
59
61
  }, "id-".concat(idx));
60
62
  })
61
- })]
63
+ }), footer]
62
64
  });
63
65
  }
64
66
  return null;
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';
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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/charts",
3
- "version": "1.9.6",
3
+ "version": "1.9.8",
4
4
  "description": "React modern charts components built on recharts",
5
5
  "keywords": [
6
6
  "lobehub",