nuxt-charts 2.2.1 → 3.0.0-beta.1
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/LICENSE +1 -1
- package/README.md +80 -79
- package/dist/module.d.mts +4 -4
- package/dist/module.json +1 -1
- package/dist/module.mjs +64 -95
- package/dist/runtime/assets/components.css +1 -0
- package/dist/runtime/assets/theme.css +1 -0
- package/dist/runtime/components/AreaChart.d.vue.ts +19 -0
- package/dist/runtime/components/AreaChart.vue +149 -0
- package/dist/runtime/components/AreaChart.vue.d.ts +19 -0
- package/dist/runtime/components/BarChart.d.vue.ts +19 -0
- package/dist/runtime/components/BarChart.vue +175 -0
- package/dist/runtime/components/BarChart.vue.d.ts +19 -0
- package/dist/runtime/components/BubbleChart.d.vue.ts +19 -0
- package/dist/runtime/components/BubbleChart.vue +213 -0
- package/dist/runtime/components/BubbleChart.vue.d.ts +19 -0
- package/dist/runtime/components/CandlestickChart.d.vue.ts +19 -0
- package/dist/runtime/components/CandlestickChart.vue +329 -0
- package/dist/runtime/components/CandlestickChart.vue.d.ts +19 -0
- package/dist/runtime/components/DonutChart.d.vue.ts +21 -0
- package/dist/runtime/components/DonutChart.vue +117 -0
- package/dist/runtime/components/DonutChart.vue.d.ts +21 -0
- package/dist/runtime/components/FunnelChart.d.vue.ts +19 -0
- package/dist/runtime/components/FunnelChart.vue +152 -0
- package/dist/runtime/components/FunnelChart.vue.d.ts +19 -0
- package/dist/runtime/components/LineChart.d.vue.ts +19 -0
- package/dist/runtime/components/LineChart.vue +84 -0
- package/dist/runtime/components/LineChart.vue.d.ts +19 -0
- package/dist/runtime/components/RadarChart.d.vue.ts +19 -0
- package/dist/runtime/components/RadarChart.vue +90 -0
- package/dist/runtime/components/RadarChart.vue.d.ts +19 -0
- package/dist/runtime/components/RadialBarChart.d.vue.ts +19 -0
- package/dist/runtime/components/RadialBarChart.vue +81 -0
- package/dist/runtime/components/RadialBarChart.vue.d.ts +19 -0
- package/dist/runtime/components/StatusTrackerChart.d.vue.ts +19 -0
- package/dist/runtime/components/StatusTrackerChart.vue +147 -0
- package/dist/runtime/components/StatusTrackerChart.vue.d.ts +19 -0
- package/dist/runtime/components/internal/CandlestickTooltip.d.vue.ts +17 -0
- package/dist/runtime/components/internal/CandlestickTooltip.vue +38 -0
- package/dist/runtime/components/internal/CandlestickTooltip.vue.d.ts +17 -0
- package/dist/runtime/components/internal/CartesianFrame.d.vue.ts +40 -0
- package/dist/runtime/components/internal/CartesianFrame.vue +321 -0
- package/dist/runtime/components/internal/CartesianFrame.vue.d.ts +40 -0
- package/dist/runtime/components/internal/ChartContainer.d.ts +91 -0
- package/dist/runtime/components/internal/ChartContainer.js +111 -0
- package/dist/runtime/components/internal/ChartLegend.d.vue.ts +11 -0
- package/dist/runtime/components/internal/ChartLegend.vue +22 -0
- package/dist/runtime/components/internal/ChartLegend.vue.d.ts +11 -0
- package/dist/runtime/components/internal/ChartTooltip.d.vue.ts +3 -0
- package/dist/runtime/components/internal/ChartTooltip.vue +39 -0
- package/dist/runtime/components/internal/ChartTooltip.vue.d.ts +3 -0
- package/dist/runtime/components/internal/CubeBarShape.d.vue.ts +28 -0
- package/dist/runtime/components/internal/CubeBarShape.vue +69 -0
- package/dist/runtime/components/internal/CubeBarShape.vue.d.ts +28 -0
- package/dist/runtime/components/internal/DitherDefs.d.ts +98 -0
- package/dist/runtime/components/internal/DitherDefs.js +158 -0
- package/dist/runtime/components/internal/FunnelLayeredShape.d.vue.ts +42 -0
- package/dist/runtime/components/internal/FunnelLayeredShape.vue +124 -0
- package/dist/runtime/components/internal/FunnelLayeredShape.vue.d.ts +42 -0
- package/dist/runtime/components/internal/GradientDefs.d.ts +46 -0
- package/dist/runtime/components/internal/GradientDefs.js +38 -0
- package/dist/runtime/enums.d.ts +65 -0
- package/dist/runtime/enums.js +40 -0
- package/dist/runtime/types/charts.d.ts +642 -0
- package/dist/runtime/types/charts.js +0 -0
- package/dist/runtime/types/shared.d.ts +202 -0
- package/dist/runtime/types/shared.js +0 -0
- package/dist/runtime/types.d.ts +8 -0
- package/dist/runtime/types.js +0 -0
- package/dist/runtime/utils/axis.d.ts +132 -0
- package/dist/runtime/utils/axis.js +93 -0
- package/dist/runtime/utils/categories.d.ts +36 -0
- package/dist/runtime/utils/categories.js +18 -0
- package/dist/runtime/utils/cubes.d.ts +100 -0
- package/dist/runtime/utils/cubes.js +73 -0
- package/dist/runtime/utils/curve.d.ts +12 -0
- package/dist/runtime/utils/curve.js +26 -0
- package/dist/runtime/utils/dither.d.ts +55 -0
- package/dist/runtime/utils/dither.js +45 -0
- package/dist/runtime/utils/gradient.d.ts +12 -0
- package/dist/runtime/utils/gradient.js +8 -0
- package/dist/runtime/utils/index.d.ts +6 -0
- package/dist/runtime/utils/index.js +6 -0
- package/dist/runtime/utils/legend.d.ts +27 -0
- package/dist/runtime/utils/legend.js +19 -0
- package/dist/runtime/utils/marker.d.ts +20 -0
- package/dist/runtime/utils/marker.js +21 -0
- package/dist/runtime/utils/style.d.ts +14 -0
- package/dist/runtime/utils/style.js +10 -0
- package/dist/runtime/utils/theme.d.ts +36 -0
- package/dist/runtime/utils/theme.js +45 -0
- package/package.json +56 -12
- package/dist/runtime/vue-chrts.d.ts +0 -1
- package/dist/runtime/vue-chrts.js +0 -13
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineComponent, h } from "vue";
|
|
2
|
+
import { gradientId } from "../../utils/gradient.js";
|
|
3
|
+
export default defineComponent({
|
|
4
|
+
name: "GradientDefs",
|
|
5
|
+
props: {
|
|
6
|
+
series: {
|
|
7
|
+
type: Array,
|
|
8
|
+
required: true
|
|
9
|
+
},
|
|
10
|
+
stops: { type: Array, required: true },
|
|
11
|
+
scope: { type: String, required: true }
|
|
12
|
+
},
|
|
13
|
+
setup: (props) => () => h(
|
|
14
|
+
"defs",
|
|
15
|
+
{},
|
|
16
|
+
props.series.map(
|
|
17
|
+
(series) => h(
|
|
18
|
+
"linearGradient",
|
|
19
|
+
{
|
|
20
|
+
id: gradientId(series.dataKey, props.scope),
|
|
21
|
+
key: series.dataKey,
|
|
22
|
+
x1: 0,
|
|
23
|
+
y1: 0,
|
|
24
|
+
x2: 0,
|
|
25
|
+
y2: 1
|
|
26
|
+
},
|
|
27
|
+
props.stops.map(
|
|
28
|
+
(stop, index) => h("stop", {
|
|
29
|
+
key: index,
|
|
30
|
+
offset: stop.offset,
|
|
31
|
+
"stop-color": series.color,
|
|
32
|
+
"stop-opacity": stop.stopOpacity
|
|
33
|
+
})
|
|
34
|
+
)
|
|
35
|
+
)
|
|
36
|
+
)
|
|
37
|
+
)
|
|
38
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public enums, preserved from `nuxt-charts` v2 for API compatibility.
|
|
3
|
+
*
|
|
4
|
+
* These are real TS `enum`s so the IDE surfaces member options on `.` and
|
|
5
|
+
* string-literal completion in templates. Each value maps to a `vccs`
|
|
6
|
+
* primitive via the typed lookup tables in `./utils`.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Position of the chart legend.
|
|
10
|
+
*
|
|
11
|
+
* Translated to `vccs` `<Legend>` `align` / `verticalAlign` / `layout`
|
|
12
|
+
* via {@link import('./utils/legend').legendPositionToLegendProps}.
|
|
13
|
+
*/
|
|
14
|
+
export declare enum LegendPosition {
|
|
15
|
+
TopLeft = "top-left",
|
|
16
|
+
TopCenter = "top-center",
|
|
17
|
+
TopRight = "top-right",
|
|
18
|
+
BottomLeft = "bottom-left",
|
|
19
|
+
BottomCenter = "bottom-center",
|
|
20
|
+
BottomRight = "bottom-right"
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Curve interpolation used to connect data points in line / area charts.
|
|
24
|
+
*
|
|
25
|
+
* Translated to the `vccs` curve `type` string union via
|
|
26
|
+
* {@link import('./utils/curve').curveTypeToVccs}.
|
|
27
|
+
*/
|
|
28
|
+
export declare enum CurveType {
|
|
29
|
+
Basis = "basis",
|
|
30
|
+
BasisClosed = "basisClosed",
|
|
31
|
+
BasisOpen = "basisOpen",
|
|
32
|
+
Bundle = "bundle",
|
|
33
|
+
Cardinal = "cardinal",
|
|
34
|
+
CardinalClosed = "cardinalClosed",
|
|
35
|
+
CardinalOpen = "cardinalOpen",
|
|
36
|
+
CatmullRom = "catmullRom",
|
|
37
|
+
CatmullRomClosed = "catmullRomClosed",
|
|
38
|
+
CatmullRomOpen = "catmullRomOpen",
|
|
39
|
+
Linear = "linear",
|
|
40
|
+
LinearClosed = "linearClosed",
|
|
41
|
+
MonotoneX = "monotoneX",
|
|
42
|
+
MonotoneY = "monotoneY",
|
|
43
|
+
Natural = "natural",
|
|
44
|
+
Step = "step",
|
|
45
|
+
StepAfter = "stepAfter",
|
|
46
|
+
StepBefore = "stepBefore"
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Orientation of a bar chart's bars.
|
|
50
|
+
*
|
|
51
|
+
* Maps to the `vccs` chart container `layout` prop.
|
|
52
|
+
*/
|
|
53
|
+
export declare enum Orientation {
|
|
54
|
+
Horizontal = "horizontal",
|
|
55
|
+
Vertical = "vertical"
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Shape of a donut / pie chart.
|
|
59
|
+
*
|
|
60
|
+
* `Full` renders a complete ring; `Half` renders a semicircle gauge.
|
|
61
|
+
*/
|
|
62
|
+
export declare enum DonutType {
|
|
63
|
+
Half = "half",
|
|
64
|
+
Full = "full"
|
|
65
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export var LegendPosition = /* @__PURE__ */ ((LegendPosition2) => {
|
|
2
|
+
LegendPosition2["TopLeft"] = "top-left";
|
|
3
|
+
LegendPosition2["TopCenter"] = "top-center";
|
|
4
|
+
LegendPosition2["TopRight"] = "top-right";
|
|
5
|
+
LegendPosition2["BottomLeft"] = "bottom-left";
|
|
6
|
+
LegendPosition2["BottomCenter"] = "bottom-center";
|
|
7
|
+
LegendPosition2["BottomRight"] = "bottom-right";
|
|
8
|
+
return LegendPosition2;
|
|
9
|
+
})(LegendPosition || {});
|
|
10
|
+
export var CurveType = /* @__PURE__ */ ((CurveType2) => {
|
|
11
|
+
CurveType2["Basis"] = "basis";
|
|
12
|
+
CurveType2["BasisClosed"] = "basisClosed";
|
|
13
|
+
CurveType2["BasisOpen"] = "basisOpen";
|
|
14
|
+
CurveType2["Bundle"] = "bundle";
|
|
15
|
+
CurveType2["Cardinal"] = "cardinal";
|
|
16
|
+
CurveType2["CardinalClosed"] = "cardinalClosed";
|
|
17
|
+
CurveType2["CardinalOpen"] = "cardinalOpen";
|
|
18
|
+
CurveType2["CatmullRom"] = "catmullRom";
|
|
19
|
+
CurveType2["CatmullRomClosed"] = "catmullRomClosed";
|
|
20
|
+
CurveType2["CatmullRomOpen"] = "catmullRomOpen";
|
|
21
|
+
CurveType2["Linear"] = "linear";
|
|
22
|
+
CurveType2["LinearClosed"] = "linearClosed";
|
|
23
|
+
CurveType2["MonotoneX"] = "monotoneX";
|
|
24
|
+
CurveType2["MonotoneY"] = "monotoneY";
|
|
25
|
+
CurveType2["Natural"] = "natural";
|
|
26
|
+
CurveType2["Step"] = "step";
|
|
27
|
+
CurveType2["StepAfter"] = "stepAfter";
|
|
28
|
+
CurveType2["StepBefore"] = "stepBefore";
|
|
29
|
+
return CurveType2;
|
|
30
|
+
})(CurveType || {});
|
|
31
|
+
export var Orientation = /* @__PURE__ */ ((Orientation2) => {
|
|
32
|
+
Orientation2["Horizontal"] = "horizontal";
|
|
33
|
+
Orientation2["Vertical"] = "vertical";
|
|
34
|
+
return Orientation2;
|
|
35
|
+
})(Orientation || {});
|
|
36
|
+
export var DonutType = /* @__PURE__ */ ((DonutType2) => {
|
|
37
|
+
DonutType2["Half"] = "half";
|
|
38
|
+
DonutType2["Full"] = "full";
|
|
39
|
+
return DonutType2;
|
|
40
|
+
})(DonutType || {});
|