vccs 0.2.0 → 0.4.0
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/README.md +151 -0
- package/dist/animation/Animate.d.ts +1 -1
- package/dist/cartesian/area/type.d.ts +3 -3
- package/dist/cartesian/axis/XAxis.d.ts +3 -3
- package/dist/cartesian/bar/type.d.ts +1 -13
- package/dist/cartesian/brush/components/Slide.d.ts +1 -1
- package/dist/cartesian/brush/components/TravellerLayer.d.ts +1 -1
- package/dist/cartesian/brush/type.d.ts +2 -1
- package/dist/cartesian/cartesian-axis/CartesianAxis.d.ts +7 -6
- package/dist/cartesian/funnel/type.d.ts +4 -5
- package/dist/cartesian/index.d.ts +1 -0
- package/dist/cartesian/line/Line.d.ts +7 -13
- package/dist/cartesian/line/type.d.ts +4 -17
- package/dist/cartesian/reference-area/ReferenceArea.d.ts +16 -16
- package/dist/cartesian/reference-dot/ReferenceDot.d.ts +143 -0
- package/dist/cartesian/reference-dot/index.d.ts +2 -0
- package/dist/cartesian/reference-line/ReferenceLine.d.ts +8 -8
- package/dist/cartesian/scatter/Scatter.d.ts +1 -1
- package/dist/chart/RechartsWrapper.d.ts +7 -3
- package/dist/chart/Surface.d.ts +2 -1
- package/dist/chart/Treemap.d.ts +237 -0
- package/dist/chart/generateCategoricalChart.d.ts +2 -1
- package/dist/chart/index.d.ts +1 -0
- package/dist/chart/treemapUtils.d.ts +22 -0
- package/dist/components/Customized.d.ts +23 -0
- package/dist/components/Text.d.ts +20 -5
- package/dist/components/Tooltip.d.ts +47 -3
- package/dist/components/index.d.ts +2 -0
- package/dist/components/label/Label.d.ts +3 -3
- package/dist/components/label/types.d.ts +1 -1
- package/dist/container/Surface.d.ts +3 -2
- package/dist/es/cartesian/area/type.mjs +2 -4
- package/dist/es/cartesian/axis/XAxis.mjs +2 -2
- package/dist/es/cartesian/axis/YAxis.mjs +1 -1
- package/dist/es/cartesian/bar/Bar.mjs +2 -17
- package/dist/es/cartesian/bar/type.mjs +2 -16
- package/dist/es/cartesian/cartesian-axis/CartesianAxis.mjs +2 -3
- package/dist/es/cartesian/cartesian-grid/const.mjs +7 -1
- package/dist/es/cartesian/funnel/Funnel.mjs +3 -18
- package/dist/es/cartesian/funnel/type.mjs +3 -5
- package/dist/es/cartesian/line/type.mjs +2 -7
- package/dist/es/cartesian/reference-area/ReferenceArea.mjs +6 -22
- package/dist/es/cartesian/reference-dot/ReferenceDot.mjs +134 -0
- package/dist/es/cartesian/reference-line/ReferenceLine.mjs +6 -19
- package/dist/es/chart/RechartsWrapper.mjs +2 -1
- package/dist/es/chart/Treemap.mjs +379 -0
- package/dist/es/chart/generateCategoricalChart.mjs +3 -2
- package/dist/es/chart/treemapUtils.mjs +32 -0
- package/dist/es/components/Customized.mjs +43 -0
- package/dist/es/components/Text.vue_vue_type_script_setup_true_lang.mjs +3 -3
- package/dist/es/components/Tooltip.mjs +14 -7
- package/dist/es/components/label/types.mjs +2 -1
- package/dist/es/components/legend/Legend.mjs +1 -1
- package/dist/es/components/legend/hooks/useLegend.mjs +8 -3
- package/dist/es/container/Surface.mjs +2 -4
- package/dist/es/hooks/publicHooks.mjs +207 -0
- package/dist/es/index.mjs +9 -1
- package/dist/es/polar/pie/Pie.mjs +1 -1
- package/dist/es/polar/pie/type.mjs +2 -4
- package/dist/es/shape/Curve.mjs +2 -1
- package/dist/es/shape/Polygon.mjs +19 -0
- package/dist/es/shape/Rectangle.mjs +0 -4
- package/dist/es/shape/Sector.mjs +4 -6
- package/dist/es/shape/Symbols.mjs +1 -1
- package/dist/es/shape/Trapezoid.mjs +5 -7
- package/dist/es/state/ReportChartProps.mjs +2 -4
- package/dist/es/state/hooks.mjs +21 -1
- package/dist/es/state/referenceElementsSlice.mjs +1 -1
- package/dist/es/state/selectors/axisSelectors.mjs +30 -1
- package/dist/es/state/selectors/tooltipSelectors.mjs +2 -2
- package/dist/es/types/common.mjs +12 -0
- package/dist/es/utils/VueUtils.mjs +1 -1
- package/dist/es/utils/cell.mjs +28 -0
- package/dist/es/utils/createCategoricalInverse.mjs +46 -0
- package/dist/es/utils/scale.mjs +46 -0
- package/dist/hooks/publicHooks.d.ts +143 -0
- package/dist/index.d.ts +1 -0
- package/dist/polar/pie/type.d.ts +2 -2
- package/dist/polar/radar/Radar.d.ts +4 -4
- package/dist/shape/Curve.d.ts +2 -1
- package/dist/shape/Polygon.d.ts +9 -0
- package/dist/shape/Rectangle.d.ts +0 -4
- package/dist/shape/Sector.d.ts +2 -2
- package/dist/shape/Symbols.d.ts +2 -1
- package/dist/shape/Trapezoid.d.ts +9 -10
- package/dist/shape/index.d.ts +1 -0
- package/dist/shape/types.d.ts +4 -5
- package/dist/state/ReportChartProps.d.ts +3 -3
- package/dist/state/rootPropsSlice.d.ts +2 -2
- package/dist/state/selectors/axisSelectors.d.ts +5 -0
- package/dist/types/axis.d.ts +2 -2
- package/dist/types/bar.d.ts +2 -6
- package/dist/types/categorical.d.ts +2 -2
- package/dist/types/common.d.ts +7 -1
- package/dist/types/tooltip.d.ts +2 -2
- package/dist/utils/cell.d.ts +11 -0
- package/dist/utils/createCategoricalInverse.d.ts +16 -0
- package/dist/utils/scale.d.ts +23 -0
- package/package.json +2 -1
package/README.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
<h1 align="center">Vue Charts (vccs)</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<strong>Composable charting components for Vue 3</strong>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
An unofficial Vue.js port of <a href="https://recharts.org">Recharts</a>, bringing React's most popular charting library to the Vue ecosystem.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/vccs"><img src="https://img.shields.io/npm/v/vccs.svg" alt="npm version"></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
> **Work in Progress**: This library is under active development. APIs may change.
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# pnpm
|
|
23
|
+
pnpm add vccs
|
|
24
|
+
|
|
25
|
+
# npm
|
|
26
|
+
npm install vccs
|
|
27
|
+
|
|
28
|
+
# yarn
|
|
29
|
+
yarn add vccs
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Peer dependency**: `vue >= 3.0.0`
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
```vue
|
|
37
|
+
<script setup>
|
|
38
|
+
import { Bar, BarChart, CartesianGrid, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'vccs'
|
|
39
|
+
|
|
40
|
+
const data = [
|
|
41
|
+
{ name: 'Page A', uv: 4000, pv: 2400 },
|
|
42
|
+
{ name: 'Page B', uv: 3000, pv: 1398 },
|
|
43
|
+
{ name: 'Page C', uv: 2000, pv: 9800 },
|
|
44
|
+
{ name: 'Page D', uv: 2780, pv: 3908 },
|
|
45
|
+
{ name: 'Page E', uv: 1890, pv: 4800 },
|
|
46
|
+
{ name: 'Page F', uv: 2390, pv: 3800 },
|
|
47
|
+
]
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<template>
|
|
51
|
+
<ResponsiveContainer
|
|
52
|
+
width="100%"
|
|
53
|
+
:height="300"
|
|
54
|
+
>
|
|
55
|
+
<BarChart :data="data">
|
|
56
|
+
<CartesianGrid stroke-dasharray="3 3" />
|
|
57
|
+
<XAxis data-key="name" />
|
|
58
|
+
<YAxis />
|
|
59
|
+
<Tooltip />
|
|
60
|
+
<Bar
|
|
61
|
+
data-key="pv"
|
|
62
|
+
fill="#8884d8"
|
|
63
|
+
/>
|
|
64
|
+
<Bar
|
|
65
|
+
data-key="uv"
|
|
66
|
+
fill="#82ca9d"
|
|
67
|
+
/>
|
|
68
|
+
</BarChart>
|
|
69
|
+
</ResponsiveContainer>
|
|
70
|
+
</template>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Chart Types
|
|
74
|
+
|
|
75
|
+
| Chart | Component | Description |
|
|
76
|
+
|-------|-----------|-------------|
|
|
77
|
+
| Area | `<AreaChart>` + `<Area>` | Filled area charts with stacking & gradients |
|
|
78
|
+
| Bar | `<BarChart>` + `<Bar>` | Vertical/horizontal bar charts |
|
|
79
|
+
| Line | `<LineChart>` + `<Line>` | Line charts with multiple curve types |
|
|
80
|
+
| Scatter | `<ScatterChart>` + `<Scatter>` | X-Y scatter plots |
|
|
81
|
+
| Composed | `<ComposedChart>` | Mix Area, Bar, Line in one chart |
|
|
82
|
+
| Pie | `<PieChart>` + `<Pie>` | Pie and donut charts |
|
|
83
|
+
| Radar | `<RadarChart>` + `<Radar>` | Radar/spider charts |
|
|
84
|
+
| Radial Bar | `<RadialBarChart>` + `<RadialBar>` | Circular bar charts |
|
|
85
|
+
| Funnel | `<FunnelChart>` + `<Funnel>` | Funnel/pipeline charts |
|
|
86
|
+
| Treemap | `<Treemap>` | Not yet supported |
|
|
87
|
+
| Sankey | `<Sankey>` | Not yet supported |
|
|
88
|
+
| Sunburst | `<SunburstChart>` | Not yet supported |
|
|
89
|
+
|
|
90
|
+
## Components
|
|
91
|
+
|
|
92
|
+
**Cartesian**: `XAxis`, `YAxis`, `ZAxis`, `CartesianGrid`, `ReferenceLine`, `ReferenceArea`, `ErrorBar`, `Brush`
|
|
93
|
+
|
|
94
|
+
**Polar**: `PolarGrid`, `PolarAngleAxis`, `PolarRadiusAxis`
|
|
95
|
+
|
|
96
|
+
**General**: `Tooltip`, `Legend`, `Label`, `LabelList`, `Cell`, `ResponsiveContainer`
|
|
97
|
+
|
|
98
|
+
**Shapes**: `Rectangle`, `Dot`, `Sector`, `Symbols`
|
|
99
|
+
|
|
100
|
+
## Features
|
|
101
|
+
|
|
102
|
+
- **Vue 3 Native** — Composition API + JSX, full TypeScript support
|
|
103
|
+
- **Recharts API** — Same intuitive composable component design
|
|
104
|
+
- **Animated** — Smooth transitions powered by [Motion for Vue](https://motion.dev/docs/vue)
|
|
105
|
+
- **Interactive** — Tooltip, legend, brush, and click/hover events
|
|
106
|
+
- **Responsive** — `<ResponsiveContainer>` adapts to parent width
|
|
107
|
+
- **Customizable** — Named slots for shapes, ticks, tooltip content, legend, and more
|
|
108
|
+
|
|
109
|
+
## Architecture
|
|
110
|
+
|
|
111
|
+
- **State**: Redux Toolkit via [@reduxjs/vue-redux](https://github.com/nicepkg/reduxjs-vue-redux) — one store per chart
|
|
112
|
+
- **Math**: D3 scales and shapes via [victory-vendor](https://github.com/FormidableLabs/victory)
|
|
113
|
+
- **Animation**: [Motion for Vue](https://motion.dev/docs/vue)
|
|
114
|
+
|
|
115
|
+
## Project Structure
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
packages/vue/src/ # Library source (published as vccs)
|
|
119
|
+
playground/nuxt/ # Nuxt 3 playground for manual testing
|
|
120
|
+
docs/ # Documentation site (Nuxt 3 + Docus)
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Development
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
pnpm install # Install dependencies
|
|
127
|
+
pnpm dev # Watch mode (library)
|
|
128
|
+
pnpm test # Run tests
|
|
129
|
+
pnpm test:coverage # Tests with coverage
|
|
130
|
+
pnpm storybook # Storybook
|
|
131
|
+
pnpm play # Nuxt playground
|
|
132
|
+
pnpm docs # Documentation site
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
[MIT](LICENSE)
|
|
138
|
+
|
|
139
|
+
## Credits
|
|
140
|
+
|
|
141
|
+
- **[Recharts](https://recharts.org)** — Original React charting library this project ports from
|
|
142
|
+
- **[Victory Vendor](https://github.com/FormidableLabs/victory)** — D3 math utilities
|
|
143
|
+
- **[Motion for Vue](https://motion.dev/docs/vue)** — Animation engine
|
|
144
|
+
- **[Redux Toolkit](https://redux-toolkit.js.org/)** — State management
|
|
145
|
+
- **[VueUse](https://vueuse.org/)** — Vue composition utilities
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
<p align="center">
|
|
150
|
+
<em>This is an unofficial port and is not affiliated with the original Recharts team.</em>
|
|
151
|
+
</p>
|
|
@@ -62,9 +62,9 @@ declare const Animate: import('vue').DefineComponent<import('vue').ExtractPropTy
|
|
|
62
62
|
};
|
|
63
63
|
}>> & Readonly<{}>, {
|
|
64
64
|
from: number;
|
|
65
|
-
to: number;
|
|
66
65
|
onUpdate: (latest: any) => void;
|
|
67
66
|
transition: AnimationOptions;
|
|
67
|
+
to: number;
|
|
68
68
|
onAnimationStart: () => void;
|
|
69
69
|
onAnimationEnd: () => void;
|
|
70
70
|
isActive: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChartData } from '../../state/chartDataSlice';
|
|
2
|
-
import { DataKey, TooltipType, VuePropsToType, WithSVGProps } from '../../types';
|
|
2
|
+
import { DataKey, TooltipType, VueClassValue, VuePropsToType, WithSVGProps } from '../../types';
|
|
3
3
|
import { AnimationOptions } from 'motion-v';
|
|
4
4
|
import { BaseValue } from '../../types/area';
|
|
5
5
|
import { AxisId } from '../../types/axis';
|
|
@@ -139,7 +139,7 @@ export declare const AreaVueProps: {
|
|
|
139
139
|
type: PropType<string | number>;
|
|
140
140
|
};
|
|
141
141
|
class: {
|
|
142
|
-
type:
|
|
142
|
+
type: PropType<VueClassValue>;
|
|
143
143
|
default: any;
|
|
144
144
|
};
|
|
145
145
|
type: {
|
|
@@ -169,5 +169,5 @@ export interface AreaDotSlotProps {
|
|
|
169
169
|
strokeWidth?: number;
|
|
170
170
|
fillOpacity?: number;
|
|
171
171
|
clipDot?: boolean;
|
|
172
|
-
class?:
|
|
172
|
+
class?: VueClassValue;
|
|
173
173
|
}
|
|
@@ -63,7 +63,7 @@ export declare const XAxis: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
63
63
|
type: PropType<AxisDomain>;
|
|
64
64
|
};
|
|
65
65
|
axisLine: {
|
|
66
|
-
type: BooleanConstructor;
|
|
66
|
+
type: (ObjectConstructor | BooleanConstructor)[];
|
|
67
67
|
default: boolean;
|
|
68
68
|
};
|
|
69
69
|
ticks: {
|
|
@@ -146,7 +146,7 @@ export declare const XAxis: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
146
146
|
type: PropType<AxisDomain>;
|
|
147
147
|
};
|
|
148
148
|
axisLine: {
|
|
149
|
-
type: BooleanConstructor;
|
|
149
|
+
type: (ObjectConstructor | BooleanConstructor)[];
|
|
150
150
|
default: boolean;
|
|
151
151
|
};
|
|
152
152
|
ticks: {
|
|
@@ -184,6 +184,6 @@ export declare const XAxis: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
184
184
|
allowDecimals: boolean;
|
|
185
185
|
mirror: boolean;
|
|
186
186
|
minTickGap: number;
|
|
187
|
-
axisLine: boolean
|
|
187
|
+
axisLine: boolean | Record<string, any>;
|
|
188
188
|
tickLine: boolean | Record<string, any>;
|
|
189
189
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -23,7 +23,7 @@ export type BarRectangleItem = {
|
|
|
23
23
|
};
|
|
24
24
|
export declare const BarVueProps: {
|
|
25
25
|
class: {
|
|
26
|
-
type:
|
|
26
|
+
type: PropType<import('../../types').VueClassValue>;
|
|
27
27
|
default: any;
|
|
28
28
|
};
|
|
29
29
|
barSize: {
|
|
@@ -119,18 +119,6 @@ export declare const BarVueProps: {
|
|
|
119
119
|
type: PropType<AxisId>;
|
|
120
120
|
default: number;
|
|
121
121
|
};
|
|
122
|
-
animationBegin: {
|
|
123
|
-
type: NumberConstructor;
|
|
124
|
-
default: number;
|
|
125
|
-
};
|
|
126
|
-
animationDuration: {
|
|
127
|
-
type: NumberConstructor;
|
|
128
|
-
default: number;
|
|
129
|
-
};
|
|
130
|
-
animationEasing: {
|
|
131
|
-
type: StringConstructor;
|
|
132
|
-
default: string;
|
|
133
|
-
};
|
|
134
122
|
transition: {
|
|
135
123
|
type: PropType<AnimationOptions>;
|
|
136
124
|
default: {
|
|
@@ -5,7 +5,7 @@ export declare const Slide: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
5
5
|
travellerWidth: NumberConstructor;
|
|
6
6
|
startX: NumberConstructor;
|
|
7
7
|
endX: NumberConstructor;
|
|
8
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("
|
|
8
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("mouseenter" | "mouseleave" | "mousedown" | "touchstart")[], "mouseenter" | "mouseleave" | "mousedown" | "touchstart", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
9
9
|
y: NumberConstructor;
|
|
10
10
|
height: NumberConstructor;
|
|
11
11
|
stroke: StringConstructor;
|
|
@@ -5,7 +5,7 @@ export declare const TravellerLayer: import('vue').DefineComponent<import('vue')
|
|
|
5
5
|
otherProps: () => BrushProps & {
|
|
6
6
|
y: number;
|
|
7
7
|
};
|
|
8
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("focus" | "blur" | "
|
|
8
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("focus" | "blur" | "mouseenter" | "mouseleave" | "mousedown" | "touchstart" | "traveller-move-keyboard")[], "focus" | "blur" | "mouseenter" | "mouseleave" | "mousedown" | "touchstart" | "traveller-move-keyboard", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
9
9
|
id: StringConstructor;
|
|
10
10
|
travellerX: NumberConstructor;
|
|
11
11
|
otherProps: () => BrushProps & {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CartesianViewBox } from '../type';
|
|
2
|
+
import { VueClassValue } from '../../types/common';
|
|
2
3
|
import { AxisInterval } from '../../types/axis';
|
|
3
4
|
import { RechartsScale } from '../../types/scale';
|
|
4
5
|
import { CartesianTickItem } from '../../types/tick';
|
|
5
|
-
import { PropType } from 'vue';
|
|
6
|
+
import { PropType, SVGAttributes } from 'vue';
|
|
6
7
|
/** The orientation of the axis in correspondence to the chart */
|
|
7
8
|
export type Orientation = 'top' | 'bottom' | 'left' | 'right';
|
|
8
9
|
/** A unit to be appended to a value */
|
|
@@ -10,7 +11,7 @@ export type Unit = string | number;
|
|
|
10
11
|
/** The formatter function of tick */
|
|
11
12
|
export type TickFormatter = (value: any, index: number) => string;
|
|
12
13
|
export interface CartesianAxisProps {
|
|
13
|
-
class?:
|
|
14
|
+
class?: VueClassValue;
|
|
14
15
|
x?: number;
|
|
15
16
|
y?: number;
|
|
16
17
|
width?: number;
|
|
@@ -29,7 +30,7 @@ export interface CartesianAxisProps {
|
|
|
29
30
|
interval?: AxisInterval;
|
|
30
31
|
angle?: number;
|
|
31
32
|
scale: RechartsScale;
|
|
32
|
-
axisLine?:
|
|
33
|
+
axisLine?: boolean | SVGAttributes;
|
|
33
34
|
}
|
|
34
35
|
export declare const CartesianAxis: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
35
36
|
x: {
|
|
@@ -67,7 +68,7 @@ export declare const CartesianAxis: import('vue').DefineComponent<import('vue').
|
|
|
67
68
|
default: boolean;
|
|
68
69
|
};
|
|
69
70
|
axisLine: {
|
|
70
|
-
type:
|
|
71
|
+
type: PropType<boolean | SVGAttributes>;
|
|
71
72
|
default: () => boolean;
|
|
72
73
|
};
|
|
73
74
|
tickLine: {
|
|
@@ -145,7 +146,7 @@ export declare const CartesianAxis: import('vue').DefineComponent<import('vue').
|
|
|
145
146
|
default: boolean;
|
|
146
147
|
};
|
|
147
148
|
axisLine: {
|
|
148
|
-
type:
|
|
149
|
+
type: PropType<boolean | SVGAttributes>;
|
|
149
150
|
default: () => boolean;
|
|
150
151
|
};
|
|
151
152
|
tickLine: {
|
|
@@ -202,7 +203,7 @@ export declare const CartesianAxis: import('vue').DefineComponent<import('vue').
|
|
|
202
203
|
hide: boolean;
|
|
203
204
|
mirror: boolean;
|
|
204
205
|
minTickGap: number;
|
|
205
|
-
axisLine: boolean
|
|
206
|
+
axisLine: boolean;
|
|
206
207
|
tickLine: boolean | Record<string, any>;
|
|
207
208
|
tickSize: number;
|
|
208
209
|
tickMargin: number;
|
|
@@ -13,7 +13,6 @@ export interface FunnelTrapezoidItem extends TrapezoidProps {
|
|
|
13
13
|
labelViewBox?: ViewBox;
|
|
14
14
|
}
|
|
15
15
|
export interface FunnelProps {
|
|
16
|
-
className?: string;
|
|
17
16
|
data?: any[];
|
|
18
17
|
dataKey: DataKey<any>;
|
|
19
18
|
hide?: boolean;
|
|
@@ -88,14 +87,14 @@ export declare const FunnelVueProps: {
|
|
|
88
87
|
type: PropType<() => void>;
|
|
89
88
|
default: any;
|
|
90
89
|
};
|
|
91
|
-
className: {
|
|
92
|
-
type: StringConstructor;
|
|
93
|
-
default: any;
|
|
94
|
-
};
|
|
95
90
|
width: {
|
|
96
91
|
type: PropType<number | string>;
|
|
97
92
|
default: any;
|
|
98
93
|
};
|
|
94
|
+
class: {
|
|
95
|
+
type: PropType<import('../../types').VueClassValue>;
|
|
96
|
+
default: any;
|
|
97
|
+
};
|
|
99
98
|
};
|
|
100
99
|
export type FunnelPropsWithSVG = WithSVGProps<typeof FunnelVueProps>;
|
|
101
100
|
type RealFunnelData = any;
|
|
@@ -3,11 +3,8 @@ import { ActivePointsSlots } from './ActivePoints';
|
|
|
3
3
|
export declare const Line: import('vue').DefineComponent<{
|
|
4
4
|
activeDot?: any;
|
|
5
5
|
animateNewValues?: boolean;
|
|
6
|
-
animationBegin?: number;
|
|
7
|
-
animationDuration?: import('../../types').AnimationDuration;
|
|
8
|
-
animationEasing?: import('../../types/bar').AnimationEasing;
|
|
9
6
|
animationId?: string;
|
|
10
|
-
|
|
7
|
+
class?: import('../../types').VueClassValue;
|
|
11
8
|
connectNulls?: boolean;
|
|
12
9
|
data?: any[];
|
|
13
10
|
dataKey: import('../../types').DataKey<any>;
|
|
@@ -24,7 +21,7 @@ export declare const Line: import('vue').DefineComponent<{
|
|
|
24
21
|
stroke?: string;
|
|
25
22
|
strokeWidth?: number;
|
|
26
23
|
tooltipType?: import('../../types').TooltipType;
|
|
27
|
-
transition?: import('motion-v
|
|
24
|
+
transition?: import('motion-v').AnimationOptions;
|
|
28
25
|
type?: import('../..').CurveType;
|
|
29
26
|
unit?: string | number;
|
|
30
27
|
xAxisId?: import('../../types/axis').AxisId;
|
|
@@ -33,11 +30,8 @@ export declare const Line: import('vue').DefineComponent<{
|
|
|
33
30
|
}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
34
31
|
activeDot?: any;
|
|
35
32
|
animateNewValues?: boolean;
|
|
36
|
-
animationBegin?: number;
|
|
37
|
-
animationDuration?: import('../../types').AnimationDuration;
|
|
38
|
-
animationEasing?: import('../../types/bar').AnimationEasing;
|
|
39
33
|
animationId?: string;
|
|
40
|
-
|
|
34
|
+
class?: import('../../types').VueClassValue;
|
|
41
35
|
connectNulls?: boolean;
|
|
42
36
|
data?: any[];
|
|
43
37
|
dataKey: import('../../types').DataKey<any>;
|
|
@@ -54,7 +48,7 @@ export declare const Line: import('vue').DefineComponent<{
|
|
|
54
48
|
stroke?: string;
|
|
55
49
|
strokeWidth?: number;
|
|
56
50
|
tooltipType?: import('../../types').TooltipType;
|
|
57
|
-
transition?: import('motion-v
|
|
51
|
+
transition?: import('motion-v').AnimationOptions;
|
|
58
52
|
type?: import('../..').CurveType;
|
|
59
53
|
unit?: string | number;
|
|
60
54
|
xAxisId?: import('../../types/axis').AxisId;
|
|
@@ -67,15 +61,15 @@ export declare const Line: import('vue').DefineComponent<{
|
|
|
67
61
|
height: number;
|
|
68
62
|
yAxisId: import('../../types/axis').AxisId;
|
|
69
63
|
xAxisId: import('../../types/axis').AxisId;
|
|
64
|
+
class: import('../../types').VueClassValue;
|
|
70
65
|
stroke: string;
|
|
66
|
+
strokeWidth: number;
|
|
67
|
+
transition: import('motion-v').AnimationOptions;
|
|
71
68
|
data: unknown[];
|
|
72
69
|
connectNulls: boolean;
|
|
73
|
-
strokeWidth: number;
|
|
74
70
|
hide: boolean;
|
|
75
|
-
transition: import('motion-v/es').AnimationOptions;
|
|
76
71
|
legendType: import('../../types/legend').LegendType;
|
|
77
72
|
isAnimationActive: boolean;
|
|
78
|
-
animationBegin: number;
|
|
79
73
|
needClip: boolean;
|
|
80
74
|
activeDot: boolean | Function | Record<string, any>;
|
|
81
75
|
dot: boolean | Function | Record<string, any>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataKey, LayoutType, TooltipType, VueClassValue, VuePropsToType, WithSVGProps } from '../../types';
|
|
2
2
|
import { AxisId } from '../../types/axis';
|
|
3
|
-
import { AnimationEasing } from '../../types/bar';
|
|
4
3
|
import { AnimationOptions } from 'motion-v';
|
|
5
4
|
import { LegendType } from '../../types/legend';
|
|
6
5
|
import { CurveFactory } from 'victory-vendor/d3-shape';
|
|
@@ -13,11 +12,8 @@ export interface LinePointItem extends Point {
|
|
|
13
12
|
export interface LineProps {
|
|
14
13
|
activeDot?: any;
|
|
15
14
|
animateNewValues?: boolean;
|
|
16
|
-
animationBegin?: number;
|
|
17
|
-
animationDuration?: AnimationDuration;
|
|
18
|
-
animationEasing?: AnimationEasing;
|
|
19
15
|
animationId?: string;
|
|
20
|
-
|
|
16
|
+
class?: VueClassValue;
|
|
21
17
|
connectNulls?: boolean;
|
|
22
18
|
data?: any[];
|
|
23
19
|
dataKey: DataKey<any>;
|
|
@@ -46,16 +42,6 @@ export declare const LineVueProps: {
|
|
|
46
42
|
type: (ObjectConstructor | FunctionConstructor | BooleanConstructor)[];
|
|
47
43
|
default: boolean;
|
|
48
44
|
};
|
|
49
|
-
animationDuration: {
|
|
50
|
-
type: NumberConstructor;
|
|
51
|
-
};
|
|
52
|
-
animationEasing: {
|
|
53
|
-
type: StringConstructor;
|
|
54
|
-
};
|
|
55
|
-
animationBegin: {
|
|
56
|
-
type: NumberConstructor;
|
|
57
|
-
default: number;
|
|
58
|
-
};
|
|
59
45
|
animationId: {
|
|
60
46
|
type: StringConstructor;
|
|
61
47
|
};
|
|
@@ -161,7 +147,8 @@ export declare const LineVueProps: {
|
|
|
161
147
|
type: (NumberConstructor | StringConstructor)[];
|
|
162
148
|
};
|
|
163
149
|
class: {
|
|
164
|
-
type:
|
|
150
|
+
type: PropType<VueClassValue>;
|
|
151
|
+
default: any;
|
|
165
152
|
};
|
|
166
153
|
layout: {
|
|
167
154
|
type: PropType<LayoutType>;
|
|
@@ -50,14 +50,14 @@ export declare const ReferenceAreaVueProps: {
|
|
|
50
50
|
type: PropType<IfOverflow>;
|
|
51
51
|
default: string;
|
|
52
52
|
};
|
|
53
|
-
className: {
|
|
54
|
-
type: StringConstructor;
|
|
55
|
-
default: any;
|
|
56
|
-
};
|
|
57
53
|
radius: {
|
|
58
54
|
type: PropType<number | [number, number, number, number]>;
|
|
59
55
|
default: number;
|
|
60
56
|
};
|
|
57
|
+
class: {
|
|
58
|
+
type: PropType<import('../../types').VueClassValue>;
|
|
59
|
+
default: any;
|
|
60
|
+
};
|
|
61
61
|
};
|
|
62
62
|
export declare const ReferenceArea: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
63
63
|
x1: {
|
|
@@ -108,14 +108,14 @@ export declare const ReferenceArea: import('vue').DefineComponent<import('vue').
|
|
|
108
108
|
type: PropType<IfOverflow>;
|
|
109
109
|
default: string;
|
|
110
110
|
};
|
|
111
|
-
className: {
|
|
112
|
-
type: StringConstructor;
|
|
113
|
-
default: any;
|
|
114
|
-
};
|
|
115
111
|
radius: {
|
|
116
112
|
type: PropType<number | [number, number, number, number]>;
|
|
117
113
|
default: number;
|
|
118
114
|
};
|
|
115
|
+
class: {
|
|
116
|
+
type: PropType<import('../../types').VueClassValue>;
|
|
117
|
+
default: any;
|
|
118
|
+
};
|
|
119
119
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
120
120
|
x1: {
|
|
121
121
|
type: PropType<number | string>;
|
|
@@ -165,14 +165,14 @@ export declare const ReferenceArea: import('vue').DefineComponent<import('vue').
|
|
|
165
165
|
type: PropType<IfOverflow>;
|
|
166
166
|
default: string;
|
|
167
167
|
};
|
|
168
|
-
className: {
|
|
169
|
-
type: StringConstructor;
|
|
170
|
-
default: any;
|
|
171
|
-
};
|
|
172
168
|
radius: {
|
|
173
169
|
type: PropType<number | [number, number, number, number]>;
|
|
174
170
|
default: number;
|
|
175
171
|
};
|
|
172
|
+
class: {
|
|
173
|
+
type: PropType<import('../../types').VueClassValue>;
|
|
174
|
+
default: any;
|
|
175
|
+
};
|
|
176
176
|
}>> & Readonly<{}>, {
|
|
177
177
|
fill: string;
|
|
178
178
|
yAxisId: AxisId;
|
|
@@ -182,10 +182,10 @@ export declare const ReferenceArea: import('vue').DefineComponent<import('vue').
|
|
|
182
182
|
x2: string | number;
|
|
183
183
|
y1: string | number;
|
|
184
184
|
y2: string | number;
|
|
185
|
-
|
|
185
|
+
class: import('../../types').VueClassValue;
|
|
186
|
+
fillOpacity: number;
|
|
186
187
|
stroke: string;
|
|
187
|
-
label: string | number | boolean | Record<string, any>;
|
|
188
|
-
className: string;
|
|
189
188
|
strokeWidth: string | number;
|
|
190
|
-
|
|
189
|
+
radius: number | [number, number, number, number];
|
|
190
|
+
label: string | number | boolean | Record<string, any>;
|
|
191
191
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|