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.
Files changed (94) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +80 -79
  3. package/dist/module.d.mts +4 -4
  4. package/dist/module.json +1 -1
  5. package/dist/module.mjs +64 -95
  6. package/dist/runtime/assets/components.css +1 -0
  7. package/dist/runtime/assets/theme.css +1 -0
  8. package/dist/runtime/components/AreaChart.d.vue.ts +19 -0
  9. package/dist/runtime/components/AreaChart.vue +149 -0
  10. package/dist/runtime/components/AreaChart.vue.d.ts +19 -0
  11. package/dist/runtime/components/BarChart.d.vue.ts +19 -0
  12. package/dist/runtime/components/BarChart.vue +175 -0
  13. package/dist/runtime/components/BarChart.vue.d.ts +19 -0
  14. package/dist/runtime/components/BubbleChart.d.vue.ts +19 -0
  15. package/dist/runtime/components/BubbleChart.vue +213 -0
  16. package/dist/runtime/components/BubbleChart.vue.d.ts +19 -0
  17. package/dist/runtime/components/CandlestickChart.d.vue.ts +19 -0
  18. package/dist/runtime/components/CandlestickChart.vue +329 -0
  19. package/dist/runtime/components/CandlestickChart.vue.d.ts +19 -0
  20. package/dist/runtime/components/DonutChart.d.vue.ts +21 -0
  21. package/dist/runtime/components/DonutChart.vue +117 -0
  22. package/dist/runtime/components/DonutChart.vue.d.ts +21 -0
  23. package/dist/runtime/components/FunnelChart.d.vue.ts +19 -0
  24. package/dist/runtime/components/FunnelChart.vue +152 -0
  25. package/dist/runtime/components/FunnelChart.vue.d.ts +19 -0
  26. package/dist/runtime/components/LineChart.d.vue.ts +19 -0
  27. package/dist/runtime/components/LineChart.vue +84 -0
  28. package/dist/runtime/components/LineChart.vue.d.ts +19 -0
  29. package/dist/runtime/components/RadarChart.d.vue.ts +19 -0
  30. package/dist/runtime/components/RadarChart.vue +90 -0
  31. package/dist/runtime/components/RadarChart.vue.d.ts +19 -0
  32. package/dist/runtime/components/RadialBarChart.d.vue.ts +19 -0
  33. package/dist/runtime/components/RadialBarChart.vue +81 -0
  34. package/dist/runtime/components/RadialBarChart.vue.d.ts +19 -0
  35. package/dist/runtime/components/StatusTrackerChart.d.vue.ts +19 -0
  36. package/dist/runtime/components/StatusTrackerChart.vue +147 -0
  37. package/dist/runtime/components/StatusTrackerChart.vue.d.ts +19 -0
  38. package/dist/runtime/components/internal/CandlestickTooltip.d.vue.ts +17 -0
  39. package/dist/runtime/components/internal/CandlestickTooltip.vue +38 -0
  40. package/dist/runtime/components/internal/CandlestickTooltip.vue.d.ts +17 -0
  41. package/dist/runtime/components/internal/CartesianFrame.d.vue.ts +40 -0
  42. package/dist/runtime/components/internal/CartesianFrame.vue +321 -0
  43. package/dist/runtime/components/internal/CartesianFrame.vue.d.ts +40 -0
  44. package/dist/runtime/components/internal/ChartContainer.d.ts +91 -0
  45. package/dist/runtime/components/internal/ChartContainer.js +111 -0
  46. package/dist/runtime/components/internal/ChartLegend.d.vue.ts +11 -0
  47. package/dist/runtime/components/internal/ChartLegend.vue +22 -0
  48. package/dist/runtime/components/internal/ChartLegend.vue.d.ts +11 -0
  49. package/dist/runtime/components/internal/ChartTooltip.d.vue.ts +3 -0
  50. package/dist/runtime/components/internal/ChartTooltip.vue +39 -0
  51. package/dist/runtime/components/internal/ChartTooltip.vue.d.ts +3 -0
  52. package/dist/runtime/components/internal/CubeBarShape.d.vue.ts +28 -0
  53. package/dist/runtime/components/internal/CubeBarShape.vue +69 -0
  54. package/dist/runtime/components/internal/CubeBarShape.vue.d.ts +28 -0
  55. package/dist/runtime/components/internal/DitherDefs.d.ts +98 -0
  56. package/dist/runtime/components/internal/DitherDefs.js +158 -0
  57. package/dist/runtime/components/internal/FunnelLayeredShape.d.vue.ts +42 -0
  58. package/dist/runtime/components/internal/FunnelLayeredShape.vue +124 -0
  59. package/dist/runtime/components/internal/FunnelLayeredShape.vue.d.ts +42 -0
  60. package/dist/runtime/components/internal/GradientDefs.d.ts +46 -0
  61. package/dist/runtime/components/internal/GradientDefs.js +38 -0
  62. package/dist/runtime/enums.d.ts +65 -0
  63. package/dist/runtime/enums.js +40 -0
  64. package/dist/runtime/types/charts.d.ts +642 -0
  65. package/dist/runtime/types/charts.js +0 -0
  66. package/dist/runtime/types/shared.d.ts +202 -0
  67. package/dist/runtime/types/shared.js +0 -0
  68. package/dist/runtime/types.d.ts +8 -0
  69. package/dist/runtime/types.js +0 -0
  70. package/dist/runtime/utils/axis.d.ts +132 -0
  71. package/dist/runtime/utils/axis.js +93 -0
  72. package/dist/runtime/utils/categories.d.ts +36 -0
  73. package/dist/runtime/utils/categories.js +18 -0
  74. package/dist/runtime/utils/cubes.d.ts +100 -0
  75. package/dist/runtime/utils/cubes.js +73 -0
  76. package/dist/runtime/utils/curve.d.ts +12 -0
  77. package/dist/runtime/utils/curve.js +26 -0
  78. package/dist/runtime/utils/dither.d.ts +55 -0
  79. package/dist/runtime/utils/dither.js +45 -0
  80. package/dist/runtime/utils/gradient.d.ts +12 -0
  81. package/dist/runtime/utils/gradient.js +8 -0
  82. package/dist/runtime/utils/index.d.ts +6 -0
  83. package/dist/runtime/utils/index.js +6 -0
  84. package/dist/runtime/utils/legend.d.ts +27 -0
  85. package/dist/runtime/utils/legend.js +19 -0
  86. package/dist/runtime/utils/marker.d.ts +20 -0
  87. package/dist/runtime/utils/marker.js +21 -0
  88. package/dist/runtime/utils/style.d.ts +14 -0
  89. package/dist/runtime/utils/style.js +10 -0
  90. package/dist/runtime/utils/theme.d.ts +36 -0
  91. package/dist/runtime/utils/theme.js +45 -0
  92. package/package.json +56 -12
  93. package/dist/runtime/vue-chrts.d.ts +0 -1
  94. 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 || {});