nuxt-charts 3.0.0-beta.4 → 3.1.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 +77 -6
- package/dist/module.json +1 -1
- package/dist/module.mjs +56 -3
- package/dist/runtime/assets/components.css +1 -1
- package/dist/runtime/assets/theme.css +1 -1
- package/dist/runtime/components/AreaChart.vue +1 -0
- package/dist/runtime/components/BarChart.vue +1 -0
- package/dist/runtime/components/DataChart.vue +91 -0
- package/dist/runtime/components/DataChart.vue.d.ts +27 -0
- package/dist/runtime/components/DonutChart.vue +1 -1
- package/dist/runtime/components/DottedMap.vue +261 -0
- package/dist/runtime/components/DottedMap.vue.d.ts +45 -0
- package/dist/runtime/components/FunnelChart.vue +2 -2
- package/dist/runtime/components/LineChart.vue +1 -0
- package/dist/runtime/components/MetricChart.vue +322 -0
- package/dist/runtime/components/MetricChart.vue.d.ts +54 -0
- package/dist/runtime/components/RadialBarChart.vue +25 -3
- package/dist/runtime/components/SankeyChart.vue +3 -3
- package/dist/runtime/components/TopoJSONMap.vue +273 -0
- package/dist/runtime/components/TopoJSONMap.vue.d.ts +45 -0
- package/dist/runtime/components/internal/CartesianFrame.vue +74 -4
- package/dist/runtime/components/internal/CartesianFrame.vue.d.ts +5 -0
- package/dist/runtime/components/internal/ChartAccessibility.vue.d.ts +1 -1
- package/dist/runtime/components/internal/ChartLegend.vue.d.ts +1 -1
- package/dist/runtime/components/internal/CubeBarShape.vue.d.ts +1 -1
- package/dist/runtime/components/internal/MapCanvas.vue +297 -0
- package/dist/runtime/components/internal/MapCanvas.vue.d.ts +79 -0
- package/dist/runtime/components/internal/VariantBarShape.vue.d.ts +2 -2
- package/dist/runtime/data/world.json +182 -0
- package/dist/runtime/maps.d.ts +2 -0
- package/dist/runtime/maps.js +1 -0
- package/dist/runtime/spec/csv.d.ts +14 -0
- package/dist/runtime/spec/csv.js +13 -0
- package/dist/runtime/spec/index.d.ts +11 -0
- package/dist/runtime/spec/index.js +5 -0
- package/dist/runtime/spec/metric.d.ts +130 -0
- package/dist/runtime/spec/metric.js +63 -0
- package/dist/runtime/spec/resolve.d.ts +44 -0
- package/dist/runtime/spec/resolve.js +41 -0
- package/dist/runtime/spec/transform.d.ts +58 -0
- package/dist/runtime/spec/transform.js +199 -0
- package/dist/runtime/spec/types.d.ts +132 -0
- package/dist/runtime/spec/types.js +2 -0
- package/dist/runtime/types/charts.d.ts +131 -0
- package/dist/runtime/types/maps.d.ts +237 -0
- package/dist/runtime/types/maps.js +0 -0
- package/dist/runtime/types/shared.d.ts +5 -0
- package/dist/runtime/types.d.ts +3 -0
- package/dist/runtime/utils/axis.d.ts +18 -0
- package/dist/runtime/utils/axis.js +44 -1
- package/dist/runtime/utils/categories.d.ts +1 -1
- package/dist/runtime/utils/categories.js +2 -2
- package/dist/runtime/utils/dottedMap.d.ts +14 -0
- package/dist/runtime/utils/dottedMap.js +69 -0
- package/dist/runtime/utils/maps.d.ts +33 -0
- package/dist/runtime/utils/maps.js +77 -0
- package/dist/runtime/utils/theme.js +3 -0
- package/package.json +23 -3
package/README.md
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
# nuxt-charts
|
|
2
2
|
|
|
3
|
-
Beautiful chart components for Nuxt — Area, Bar, Line, Donut, Bubble, Radar, Radial Bar, Funnel, Sankey, Candlestick and
|
|
3
|
+
Beautiful chart and map components for Nuxt — Area, Bar, Line, Donut, Bubble, Radar, Radial Bar, Funnel, Sankey, Candlestick, Status Tracker, Dotted Map, and TopoJSON Map.
|
|
4
4
|
|
|
5
5
|
Powered by [vccs](https://vue-charts.com) (Vue port of Recharts). Drop-in config-prop API from nuxt-charts v2.
|
|
6
6
|
|
|
7
|
+
Nuxt UI v4 is a first-class, zero-config integration: chart series, surfaces,
|
|
8
|
+
text, borders, radius, typography, and dark mode inherit its semantic design
|
|
9
|
+
tokens. Nuxt UI is not a dependency; every token has a standalone fallback, so
|
|
10
|
+
the same components work in any Nuxt project.
|
|
11
|
+
|
|
7
12
|
## Install
|
|
8
13
|
|
|
9
14
|
```bash
|
|
10
|
-
#
|
|
11
|
-
pnpm add nuxt-charts@
|
|
15
|
+
# v3
|
|
16
|
+
pnpm add nuxt-charts@next
|
|
12
17
|
```
|
|
13
18
|
|
|
14
19
|
```ts
|
|
@@ -32,6 +37,51 @@ export default defineNuxtConfig({
|
|
|
32
37
|
| `SankeyChart` | New in v3 |
|
|
33
38
|
| `CandlestickChart` | New in v3 |
|
|
34
39
|
| `StatusTrackerChart` | New in v3 |
|
|
40
|
+
| `DottedMap` | D3 dotted geography, pins, regional filters, and country colors |
|
|
41
|
+
| `TopoJSONMap` | D3 choropleths, points, routes, projections, and heatmaps |
|
|
42
|
+
|
|
43
|
+
### Maps
|
|
44
|
+
|
|
45
|
+
Maps include world geometry and need no external data fetch or Unovis dependency:
|
|
46
|
+
|
|
47
|
+
```vue
|
|
48
|
+
<script setup lang="ts">
|
|
49
|
+
const pins = [{ lat: 52.3676, lng: 4.9041, label: "Amsterdam" }];
|
|
50
|
+
const data = {
|
|
51
|
+
areas: [{ id: "NLD", value: 94 }, { id: "USA", value: 91 }],
|
|
52
|
+
points: [
|
|
53
|
+
{ id: "ams", latitude: 52.3676, longitude: 4.9041, label: "Amsterdam" },
|
|
54
|
+
{ id: "nyc", latitude: 40.7128, longitude: -74.006, label: "New York" },
|
|
55
|
+
],
|
|
56
|
+
links: [{ source: "ams", target: "nyc" }],
|
|
57
|
+
};
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
<DottedMap :pins="pins" :height="360" :map-height="75" />
|
|
62
|
+
<TopoJSONMap :data="data" value="value" projection="equalEarth" show-point-labels />
|
|
63
|
+
</template>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Use `topoJson`/`geoJson` for custom geography, `mapFeatureKey` to select a
|
|
67
|
+
TopoJSON object, and `featureId` to match area IDs to a property. The bundled
|
|
68
|
+
map accepts ISO alpha-2, alpha-3, and numeric country IDs. `areaColor`, point
|
|
69
|
+
styles, and link styles accept values or typed accessor functions. Named
|
|
70
|
+
projections, configured D3 projections, and projection factories are supported.
|
|
71
|
+
|
|
72
|
+
Both components render SVG during SSR, resize to their containers, and share
|
|
73
|
+
chart themes, tooltip/legend variants, loading/error states, and accessibility.
|
|
74
|
+
Drag, pinch, double-click, and keyboard zoom work by default; `zoomOnScroll`
|
|
75
|
+
enables wheel zoom and `showControls` adds zoom/reset buttons. Exposed methods:
|
|
76
|
+
`zoomIn`, `zoomOut`, `zoomTo`, `resetView`; TopoJSONMap also exposes
|
|
77
|
+
`fitToPoints` and `zoomToFeature`. `zoomOnClick` is opt-in.
|
|
78
|
+
|
|
79
|
+
Slots provide typed tooltips, legends, SVG overlays, and custom marks
|
|
80
|
+
(`pin`/`dot` or `feature`/`point`/`link`). `getMap` and `getPin` are
|
|
81
|
+
auto-imported for precomputation and exported from `nuxt-charts/maps`.
|
|
82
|
+
|
|
83
|
+
See [Dotted Map](https://nuxtcharts.com/docs/maps/dotted-map) and
|
|
84
|
+
[TopoJSON Map](https://nuxtcharts.com/docs/maps/topojson-map) for the full API.
|
|
35
85
|
|
|
36
86
|
### New cross-cutting props (cartesian charts)
|
|
37
87
|
|
|
@@ -141,8 +191,7 @@ several charts on one page never collide.
|
|
|
141
191
|
### Deferred / removed
|
|
142
192
|
|
|
143
193
|
- **`DualChart`** — planned for v3.1 (maps onto the `vccs` `ComposedChart`).
|
|
144
|
-
- **`GanttChart`, `DagreGraph
|
|
145
|
-
d3-geo specific and have no `vccs` equivalent.
|
|
194
|
+
- **`GanttChart`, `DagreGraph`** — removed in v3. They were Unovis-specific.
|
|
146
195
|
|
|
147
196
|
## Module options
|
|
148
197
|
|
|
@@ -179,6 +228,25 @@ evenly (preserving both endpoints) and emit one development warning. Override
|
|
|
179
228
|
this with `maxDataPoints`, but use pre-aggregation for genuinely dense data:
|
|
180
229
|
SVG creates DOM work per mark, so raising the limit can block the UI.
|
|
181
230
|
|
|
231
|
+
## Theming
|
|
232
|
+
|
|
233
|
+
With Nuxt UI, no chart-specific setup is required. Categories without an
|
|
234
|
+
explicit `color` use `--ui-primary`, `--ui-secondary`, `--ui-success`,
|
|
235
|
+
`--ui-info`, `--ui-warning`, and `--ui-error`; chart chrome follows Nuxt UI's
|
|
236
|
+
background, text, border, radius, and font tokens.
|
|
237
|
+
|
|
238
|
+
Without Nuxt UI, built-in light and dark defaults are used. Customize globally
|
|
239
|
+
with `--vc-*` variables (or the backwards-compatible `--chart-color-0` through
|
|
240
|
+
`--chart-color-7`), and customize one chart with the `theme` prop:
|
|
241
|
+
|
|
242
|
+
```vue
|
|
243
|
+
<LineChart
|
|
244
|
+
:data="data"
|
|
245
|
+
:categories="categories"
|
|
246
|
+
:theme="{ colors: ['var(--brand)', 'var(--accent)'] }"
|
|
247
|
+
/>
|
|
248
|
+
```
|
|
249
|
+
|
|
182
250
|
## Auto-imported enums & types
|
|
183
251
|
|
|
184
252
|
- Enums: `CurveType`, `LegendPosition`, `Orientation`, `DonutType`
|
|
@@ -188,13 +256,16 @@ SVG creates DOM work per mark, so raising the limit can block the UI.
|
|
|
188
256
|
`SankeyChartProps`, `SankeyInputNode`, `SankeyInputLink`,
|
|
189
257
|
`StatusTrackerChartProps`, `StatusTrackerDatum`, `BulletLegendItemInterface`,
|
|
190
258
|
`AxisConfig`, `ValueLabel`, `ReferenceLineConfig`, `NumericKeys`
|
|
259
|
+
- Map types: `DottedMapProps`, `TopoJSONMapProps`, `MapData`, `MapArea`,
|
|
260
|
+
`MapFeature`, `MapPoint`, `MapLink`, `MapPin`, `MapDot`, `MapGeometry`,
|
|
261
|
+
`MapProjection`, `MapRegion`, `MapZoom`, `PrecomputedMap`
|
|
191
262
|
- Style variant unions: `BarVariant`, `AreaFillVariant`, `StrokeVariant`,
|
|
192
263
|
`DotVariant`, `DitherVariant`, `BackgroundVariant`, `LegendIndicatorVariant`,
|
|
193
264
|
`TooltipVariant`, `TooltipRoundness`, `RadarVariant`, `RadialVariant`
|
|
194
265
|
|
|
195
266
|
## Migrating from v2
|
|
196
267
|
|
|
197
|
-
See the [Upgrade to v3](https://nuxtcharts.com/docs/getting-started/upgrade-to-v3) guide.
|
|
268
|
+
See the [Upgrade to v3](https://nuxtcharts.com/docs/getting-started/upgrade-to-v3) guide. Maps now use D3 and include world geometry. Gantt, dual, and dagre charts remain deferred or removed.
|
|
198
269
|
|
|
199
270
|
## License
|
|
200
271
|
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -11,7 +11,12 @@ const COMPONENTS = {
|
|
|
11
11
|
FunnelChart: "FunnelChart",
|
|
12
12
|
SankeyChart: "SankeyChart",
|
|
13
13
|
CandlestickChart: "CandlestickChart",
|
|
14
|
-
StatusTrackerChart: "StatusTrackerChart"
|
|
14
|
+
StatusTrackerChart: "StatusTrackerChart",
|
|
15
|
+
DottedMap: "DottedMap",
|
|
16
|
+
TopoJSONMap: "TopoJSONMap",
|
|
17
|
+
// Data-aware primitive: renders a serializable `ChartSpec` over raw rows by
|
|
18
|
+
// delegating to the adapters above.
|
|
19
|
+
DataChart: "DataChart"
|
|
15
20
|
};
|
|
16
21
|
const resolveComponents = (config, resolverUrl) => {
|
|
17
22
|
const { prefix, include, global } = config;
|
|
@@ -23,7 +28,7 @@ const resolveComponents = (config, resolverUrl) => {
|
|
|
23
28
|
addComponent({
|
|
24
29
|
name: `${prefix}${name}`,
|
|
25
30
|
filePath: resolve(`./runtime/components/${COMPONENTS[name]}.vue`),
|
|
26
|
-
mode: "client",
|
|
31
|
+
mode: name === "DottedMap" || name === "TopoJSONMap" ? "all" : "client",
|
|
27
32
|
global
|
|
28
33
|
});
|
|
29
34
|
}
|
|
@@ -77,7 +82,55 @@ const resolveImports = (config, resolverUrl) => {
|
|
|
77
82
|
"TooltipVariant",
|
|
78
83
|
"TooltipRoundness",
|
|
79
84
|
"RadarVariant",
|
|
80
|
-
"RadialVariant"
|
|
85
|
+
"RadialVariant",
|
|
86
|
+
"DottedMapProps",
|
|
87
|
+
"TopoJSONMapProps",
|
|
88
|
+
"MapsData",
|
|
89
|
+
"MapData",
|
|
90
|
+
"MapArea",
|
|
91
|
+
"MapFeature",
|
|
92
|
+
"MapPoint",
|
|
93
|
+
"MapLink",
|
|
94
|
+
"MapPin",
|
|
95
|
+
"MapDot",
|
|
96
|
+
"MapRegion",
|
|
97
|
+
"MapRegionName",
|
|
98
|
+
"MapGeometry",
|
|
99
|
+
"MapProjection",
|
|
100
|
+
"MapProjectionName",
|
|
101
|
+
"MapLegendItem",
|
|
102
|
+
"MapZoom",
|
|
103
|
+
"MapAccessor",
|
|
104
|
+
"MapInteractionKind",
|
|
105
|
+
"MapBaseProps",
|
|
106
|
+
"MapMarkSlot",
|
|
107
|
+
"MapOverlaySlot",
|
|
108
|
+
"MapTooltipSlot",
|
|
109
|
+
"DottedMapTooltipSlot",
|
|
110
|
+
"PrecomputedMap"
|
|
111
|
+
]
|
|
112
|
+
});
|
|
113
|
+
addImportsSources({
|
|
114
|
+
from: resolve("./runtime/utils/dottedMap"),
|
|
115
|
+
imports: ["getMap", "getPin"]
|
|
116
|
+
});
|
|
117
|
+
addImportsSources({
|
|
118
|
+
from: resolve("./runtime/spec"),
|
|
119
|
+
imports: ["transform", "toCsv", "validateSpec", "seriesLabel", "formatBucket"]
|
|
120
|
+
});
|
|
121
|
+
addImportsSources({
|
|
122
|
+
from: resolve("./runtime/spec"),
|
|
123
|
+
type: true,
|
|
124
|
+
imports: [
|
|
125
|
+
"ChartSpec",
|
|
126
|
+
"SpecChartType",
|
|
127
|
+
"SpecAggregate",
|
|
128
|
+
"SpecInterval",
|
|
129
|
+
"SpecCompare",
|
|
130
|
+
"SpecDimensions",
|
|
131
|
+
"SpecTransform",
|
|
132
|
+
"SpecDatum",
|
|
133
|
+
"TransformResult"
|
|
81
134
|
]
|
|
82
135
|
});
|
|
83
136
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer vue-chrts{.vc-tooltip{background:var(--vc-tooltip-bg,oklch(1 0 0));border:1px solid var(--vc-tooltip-border,oklch(.922 0 0));border-radius:var(--vc-tooltip-radius,.5rem);box-shadow:var(--vc-tooltip-shadow,0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1));color:var(--vc-tooltip-fg,oklch(.205 0 0));font-size:var(--vc-legend-size,.75rem);line-height:1.5;min-width:8rem;padding:var(--vc-tooltip-padding,.375rem .625rem);pointer-events:none}.vc-tooltip--frosted-glass{backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);background:color-mix(in oklab,var(--vc-tooltip-bg,oklch(1 0 0)) 70%,transparent)}.vc-tooltip--sm{border-radius:.125rem}.vc-tooltip--md{border-radius:.375rem}.vc-tooltip--lg{border-radius:.5rem}.vc-tooltip--xl{border-radius:.75rem}.vc-tooltip__label{color:var(--vc-tooltip-fg,oklch(.205 0 0));font-weight:500;margin:0 0 .25rem}.vc-tooltip__list{display:flex;flex-direction:column;gap:.125rem;list-style:none;margin:0;padding:0}.vc-tooltip__item{align-items:center;display:flex;gap:.375rem}.vc-tooltip__dot{border-radius:9999px;display:inline-block;flex-shrink:0;height:.5rem;width:.5rem}.vc-tooltip__name{color:var(--vc-tooltip-muted,oklch(.556 0 0))}.vc-tooltip__value{color:var(--vc-tooltip-fg,oklch(.205 0 0));font-variant-numeric:tabular-nums;font-weight:500;margin-left:auto}.vc-legend{flex-wrap:wrap;font-size:var(--vc-legend-size,.75rem);font-weight:var(--vc-legend-weight,400);gap:var(--vc-legend-gap,.75rem);justify-content:center;line-height:1.5;list-style:none;margin:0;padding:0}.vc-legend,.vc-legend__item{align-items:center;display:flex}.vc-legend__item{gap:.375rem}.vc-legend__item--inactive{opacity:.4}.vc-legend__dot{border-radius:9999px;display:inline-block;flex-shrink:0;height:var(--vc-legend-dot-size,.5rem);width:var(--vc-legend-dot-size,.5rem)}.vc-legend__dot--square{border-radius:0}.vc-legend__dot--rounded-square{border-radius:2px}.vc-legend__dot--circle{border-radius:9999px}.vc-legend__dot--vertical-bar{border-radius:2px;height:calc(var(--vc-legend-dot-size, .5rem)*1.5);width:calc(var(--vc-legend-dot-size, .5rem)*.5)}.vc-legend__dot--horizontal-bar{border-radius:2px;height:calc(var(--vc-legend-dot-size, .5rem)*.5);width:calc(var(--vc-legend-dot-size, .5rem)*1.5)}.vc-legend__dot--circle-outline,.vc-legend__dot--rounded-square-outline{box-sizing:border-box;height:calc(var(--vc-legend-dot-size, .5rem)*1.25);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;padding:1.5px;width:calc(var(--vc-legend-dot-size, .5rem)*1.25)}.vc-legend__dot--circle-outline{border-radius:9999px}.vc-legend__dot--rounded-square-outline{border-radius:3px}.vc-legend__label{color:var(--vc-legend-color,oklch(.556 0 0))}.vc-skeleton{align-items:stretch;box-sizing:border-box;color:var(--vc-tick-color,oklch(.556 0 0));display:flex;overflow:hidden;padding:8% 4%;position:relative;width:100%}.vc-skeleton__bars{align-items:flex-end;display:flex;gap:2%;height:100%;width:100%}.vc-skeleton__bar{background:currentColor;border-radius:2px 2px 0 0;flex:1;opacity:.14}.vc-skeleton__wave{height:100%;opacity:.14;width:100%}.vc-skeleton__ring{aspect-ratio:1;border:1.75rem solid;border-radius:9999px;height:100%;margin:auto;opacity:.14}.vc-skeleton__shimmer{animation:vc-skeleton-sweep 1.8s linear infinite;background:linear-gradient(105deg,transparent 35%,currentColor 50%,transparent 65%);inset:0;opacity:.1;position:absolute}@keyframes vc-skeleton-sweep{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}.vc-skeleton__pill{align-items:center;background:var(--vc-surface-bg,oklch(1 0 0));border:1px solid var(--vc-tooltip-border,oklch(.922 0 0));border-radius:.375rem;color:var(--vc-tick-color,oklch(.556 0 0));display:flex;font-size:var(--vc-legend-size,.75rem);gap:.375rem;height:-moz-fit-content;height:fit-content;inset:0;line-height:1.5;margin:auto;padding:.125rem .5rem;position:absolute;width:-moz-fit-content;width:fit-content}.vc-skeleton__spinner{animation:vc-skeleton-spin .7s linear infinite;border:1px solid var(--vc-tooltip-border,oklch(.922 0 0));border-radius:9999px;border-top:1px solid;height:.75rem;width:.75rem}@keyframes vc-skeleton-spin{to{transform:rotate(1turn)}}@media (prefers-reduced-motion:reduce){.vc-skeleton__shimmer,.vc-skeleton__spinner{animation:none}}.vc-candlestick-chart{cursor:crosshair;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.vc-candlestick-chart__svg{display:block;overflow:visible;width:100%}.vc-funnel-layered{position:relative;width:100%}.vc-funnel{position:relative}.vc-funnel-layered__tooltip{align-items:center;background:var(--vc-tooltip-bg,oklch(1 0 0));border:1px solid var(--vc-tooltip-border,oklch(.922 0 0));border-radius:var(--vc-tooltip-radius,.5rem);box-shadow:var(--vc-tooltip-shadow,0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1));color:var(--vc-tooltip-fg,oklch(.205 0 0));display:flex;font-size:var(--vc-legend-size,.75rem);gap:.375rem;padding:var(--vc-tooltip-padding,.375rem .625rem);pointer-events:none;position:absolute;transform:translate(-50%,calc(-100% - 10px));white-space:nowrap}.vc-funnel-layered__name{color:var(--vc-tooltip-muted,oklch(.556 0 0))}.vc-funnel-layered__value{font-variant-numeric:tabular-nums;font-weight:600}.vc-funnel-layered__dot{border-radius:9999px;display:inline-block;flex-shrink:0;height:var(--vc-legend-dot-size,.5rem);width:var(--vc-legend-dot-size,.5rem)}.vc-funnel-layered-shape{opacity:.96;transition:opacity .15s}.vc-funnel-layered-shape:hover{opacity:1}.vc-funnel .v-charts-label-list .v-charts-label{fill:var(--vc-funnel-value-color,oklch(.205 0 0));font-size:var(--vc-funnel-value-size,.75rem);font-variant-numeric:tabular-nums;font-weight:var(--vc-funnel-value-weight,600)}.vc-funnel-classic-shape{cursor:default}.vc-funnel-classic-shape__shadow{opacity:var(--vc-funnel-shadow-opacity,.16)}.vc-funnel-classic-shape__body{opacity:var(--vc-funnel-shape-opacity,.92);transition:opacity .15s ease}.vc-funnel-classic-shape__highlight{fill:none;stroke:hsla(0,0%,100%,.24);stroke-width:1;vector-effect:non-scaling-stroke}.vc-funnel-classic-shape:hover .vc-funnel-classic-shape__body{opacity:var(--vc-funnel-shape-hover-opacity,1)}.vc-funnel-classic-shape__name,.vc-funnel-classic-shape__value{font-family:inherit;paint-order:stroke;pointer-events:none;stroke:rgba(0,0,0,.12);stroke-linejoin:round;stroke-width:2px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vc-funnel-classic-shape__value{fill:var(--vc-funnel-inside-value-color,#fff);font-variant-numeric:tabular-nums}.vc-funnel-classic-shape__name{fill:var(--vc-funnel-inside-label-color,#fff);opacity:.78}.vc-funnel-layered-shape__divider{stroke:var(--vc-surface-bg,oklch(1 0 0))}.vc-funnel-layered-shape__badge-text,.vc-funnel-layered-shape__name,.vc-funnel-layered-shape__value{font-family:inherit;pointer-events:none;stroke:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vc-funnel-layered-shape__value{fill:var(--vc-funnel-value-color,var(--vc-axis-label-color,oklch(.205 0 0)));font-variant-numeric:tabular-nums;font-weight:var(--vc-funnel-value-weight,600)}.vc-funnel-layered-shape__badge{fill:var(--vc-funnel-badge-bg,var(--vc-surface-bg,oklch(1 0 0)));fill-opacity:var(--vc-funnel-badge-opacity,.82);stroke:var(--vc-funnel-badge-border,var(--vc-axis-line-color,oklch(.922 0 0)));stroke-opacity:.7}.vc-funnel-layered-shape__badge-text{fill:var(--vc-funnel-badge-color,var(--vc-tick-color,oklch(.556 0 0)));font-variant-numeric:tabular-nums;font-weight:var(--vc-funnel-badge-weight,600)}.vc-funnel-layered-shape__name{fill:var(--vc-funnel-label-color,var(--vc-tick-color,oklch(.556 0 0)));font-weight:var(--vc-funnel-label-weight,500)}.vc-status-tracker{color:var(--vc-axis-label-color,var(--ui-text-highlighted,var(--foreground,oklch(.205 0 0))));font-family:inherit;width:100%}.vc-status-tracker__header{align-items:baseline;display:flex;gap:1rem;justify-content:space-between;margin-bottom:.75rem}.vc-status-tracker__summary,.vc-status-tracker__title{font-size:.875rem;line-height:1.25rem;margin:0}.vc-status-tracker__title{font-weight:600}.vc-status-tracker__summary{color:var(--vc-tick-color,var(--ui-text-muted,var(--muted-foreground,oklch(.556 0 0))));font-variant-numeric:tabular-nums}.vc-status-tracker__track{display:flex;overflow:hidden;width:100%}.vc-status-tracker__bar{display:block;flex:0 0 auto;height:100%;min-width:1px;transition:opacity .16s ease}.vc-status-tracker__bar:hover{opacity:.78}.vc-status-tracker__bar--rounded-start{border-bottom-left-radius:.25rem;border-top-left-radius:.25rem}.vc-status-tracker__bar--rounded-end{border-bottom-right-radius:.25rem;border-top-right-radius:.25rem}.vc-status-tracker__bar--empty:hover{opacity:1}.vc-status-tracker__labels{gap:1rem;justify-content:space-between;margin-top:.5rem}.vc-status-tracker__labels,.vc-status-tracker__legend{color:var(--vc-legend-color,oklch(.556 0 0));display:flex;font-size:var(--vc-legend-size,.75rem);line-height:1rem}.vc-status-tracker__legend{flex-wrap:wrap;gap:.5rem 1rem;list-style:none;margin:var(--vc-legend-inset,.75rem) 0 0;padding:0}.vc-status-tracker__legend-item{align-items:center;display:inline-flex;gap:.375rem}.vc-status-tracker__legend-dot{border-radius:9999px;flex:0 0 auto;height:var(--vc-legend-dot-size,.5rem);width:var(--vc-legend-dot-size,.5rem)}}.vc-sr-only{height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;clip:rect(0,0,0,0)!important;border:0!important;white-space:nowrap!important}.vc-empty-state{color:var(--vc-tick-color);display:grid;font-size:var(--vc-legend-size);place-items:center}
|
|
1
|
+
@layer vue-chrts{.vc-tooltip{background:var(--vc-tooltip-bg,oklch(1 0 0));border:1px solid var(--vc-tooltip-border,oklch(.922 0 0));border-radius:var(--vc-tooltip-radius,.5rem);box-shadow:var(--vc-tooltip-shadow,0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1));color:var(--vc-tooltip-fg,oklch(.205 0 0));font-size:var(--vc-legend-size,.75rem);line-height:1.5;min-width:8rem;padding:var(--vc-tooltip-padding,.375rem .625rem);pointer-events:none}.vc-tooltip--frosted-glass{backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);background:color-mix(in oklab,var(--vc-tooltip-bg,oklch(1 0 0)) 70%,transparent)}.vc-tooltip--sm{border-radius:.125rem}.vc-tooltip--md{border-radius:.375rem}.vc-tooltip--lg{border-radius:.5rem}.vc-tooltip--xl{border-radius:.75rem}.vc-tooltip__label{color:var(--vc-tooltip-fg,oklch(.205 0 0));font-weight:500;margin:0 0 .25rem}.vc-tooltip__list{display:flex;flex-direction:column;gap:.125rem;list-style:none;margin:0;padding:0}.vc-tooltip__item{align-items:center;display:flex;gap:.375rem}.vc-tooltip__dot{border-radius:9999px;display:inline-block;flex-shrink:0;height:.5rem;width:.5rem}.vc-tooltip__name{color:var(--vc-tooltip-muted,oklch(.556 0 0))}.vc-tooltip__value{color:var(--vc-tooltip-fg,oklch(.205 0 0));font-variant-numeric:tabular-nums;font-weight:500;margin-left:auto}.vc-legend{flex-wrap:wrap;font-size:var(--vc-legend-size,.75rem);font-weight:var(--vc-legend-weight,400);gap:var(--vc-legend-gap,.75rem);justify-content:center;line-height:1.5;list-style:none;margin:0;padding:0}.vc-legend,.vc-legend__item{align-items:center;display:flex}.vc-legend__item{gap:.375rem}.vc-legend__item--inactive{opacity:.4}.vc-legend__dot{border-radius:9999px;display:inline-block;flex-shrink:0;height:var(--vc-legend-dot-size,.5rem);width:var(--vc-legend-dot-size,.5rem)}.vc-legend__dot--square{border-radius:0}.vc-legend__dot--rounded-square{border-radius:2px}.vc-legend__dot--circle{border-radius:9999px}.vc-legend__dot--vertical-bar{border-radius:2px;height:calc(var(--vc-legend-dot-size, .5rem)*1.5);width:calc(var(--vc-legend-dot-size, .5rem)*.5)}.vc-legend__dot--horizontal-bar{border-radius:2px;height:calc(var(--vc-legend-dot-size, .5rem)*.5);width:calc(var(--vc-legend-dot-size, .5rem)*1.5)}.vc-legend__dot--circle-outline,.vc-legend__dot--rounded-square-outline{box-sizing:border-box;height:calc(var(--vc-legend-dot-size, .5rem)*1.25);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;padding:1.5px;width:calc(var(--vc-legend-dot-size, .5rem)*1.25)}.vc-legend__dot--circle-outline{border-radius:9999px}.vc-legend__dot--rounded-square-outline{border-radius:3px}.vc-legend__label{color:var(--vc-legend-color,oklch(.556 0 0))}.vc-skeleton{align-items:stretch;box-sizing:border-box;color:var(--vc-tick-color,oklch(.556 0 0));display:flex;overflow:hidden;padding:8% 4%;position:relative;width:100%}.vc-skeleton__bars{align-items:flex-end;display:flex;gap:2%;height:100%;width:100%}.vc-skeleton__bar{background:currentColor;border-radius:2px 2px 0 0;flex:1;opacity:.14}.vc-skeleton__wave{height:100%;opacity:.14;width:100%}.vc-skeleton__ring{aspect-ratio:1;border:1.75rem solid;border-radius:9999px;height:100%;margin:auto;opacity:.14}.vc-skeleton__shimmer{animation:vc-skeleton-sweep 1.8s linear infinite;background:linear-gradient(105deg,transparent 35%,currentColor 50%,transparent 65%);inset:0;opacity:.1;position:absolute}@keyframes vc-skeleton-sweep{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}.vc-skeleton__pill{align-items:center;background:var(--vc-surface-bg,oklch(1 0 0));border:1px solid var(--vc-tooltip-border,oklch(.922 0 0));border-radius:.375rem;color:var(--vc-tick-color,oklch(.556 0 0));display:flex;font-size:var(--vc-legend-size,.75rem);gap:.375rem;height:-moz-fit-content;height:fit-content;inset:0;line-height:1.5;margin:auto;padding:.125rem .5rem;position:absolute;width:-moz-fit-content;width:fit-content}.vc-skeleton__spinner{animation:vc-skeleton-spin .7s linear infinite;border:1px solid var(--vc-tooltip-border,oklch(.922 0 0));border-radius:9999px;border-top:1px solid;height:.75rem;width:.75rem}@keyframes vc-skeleton-spin{to{transform:rotate(1turn)}}@media (prefers-reduced-motion:reduce){.vc-skeleton__shimmer,.vc-skeleton__spinner{animation:none}}.vc-candlestick-chart{cursor:crosshair;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.vc-candlestick-chart__svg{display:block;overflow:visible;width:100%}.vc-funnel-layered{position:relative;width:100%}.vc-funnel{position:relative}.vc-funnel-layered__tooltip{align-items:center;background:var(--vc-tooltip-bg,oklch(1 0 0));border:1px solid var(--vc-tooltip-border,oklch(.922 0 0));border-radius:var(--vc-tooltip-radius,.5rem);box-shadow:var(--vc-tooltip-shadow,0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1));color:var(--vc-tooltip-fg,oklch(.205 0 0));display:flex;font-size:var(--vc-legend-size,.75rem);gap:.375rem;padding:var(--vc-tooltip-padding,.375rem .625rem);pointer-events:none;position:absolute;transform:translate(-50%,calc(-100% - 10px));white-space:nowrap}.vc-funnel-layered__name{color:var(--vc-tooltip-muted,oklch(.556 0 0))}.vc-funnel-layered__value{font-variant-numeric:tabular-nums;font-weight:600}.vc-funnel-layered__dot{border-radius:9999px;display:inline-block;flex-shrink:0;height:var(--vc-legend-dot-size,.5rem);width:var(--vc-legend-dot-size,.5rem)}.vc-funnel-layered-shape{opacity:.96;transition:opacity .15s}.vc-funnel-layered-shape:hover{opacity:1}.vc-funnel .v-charts-label-list .v-charts-label{fill:var(--vc-funnel-value-color,oklch(.205 0 0));font-size:var(--vc-funnel-value-size,.75rem);font-variant-numeric:tabular-nums;font-weight:var(--vc-funnel-value-weight,600)}.vc-funnel-classic-shape{cursor:default}.vc-funnel-classic-shape__shadow{opacity:var(--vc-funnel-shadow-opacity,.16)}.vc-funnel-classic-shape__body{opacity:var(--vc-funnel-shape-opacity,.92);transition:opacity .15s ease}.vc-funnel-classic-shape__highlight{fill:none;stroke:hsla(0,0%,100%,.24);stroke-width:1;vector-effect:non-scaling-stroke}.vc-funnel-classic-shape:hover .vc-funnel-classic-shape__body{opacity:var(--vc-funnel-shape-hover-opacity,1)}.vc-funnel-classic-shape__name,.vc-funnel-classic-shape__value{font-family:inherit;paint-order:stroke;pointer-events:none;stroke:rgba(0,0,0,.12);stroke-linejoin:round;stroke-width:2px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vc-funnel-classic-shape__value{fill:var(--vc-funnel-inside-value-color,#fff);font-variant-numeric:tabular-nums}.vc-funnel-classic-shape__name{fill:var(--vc-funnel-inside-label-color,#fff);opacity:.78}.vc-funnel-layered-shape__divider{stroke:var(--vc-surface-bg,oklch(1 0 0))}.vc-funnel-layered-shape__badge-text,.vc-funnel-layered-shape__name,.vc-funnel-layered-shape__value{font-family:inherit;pointer-events:none;stroke:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vc-funnel-layered-shape__value{fill:var(--vc-funnel-value-color,var(--vc-axis-label-color,oklch(.205 0 0)));font-variant-numeric:tabular-nums;font-weight:var(--vc-funnel-value-weight,600)}.vc-funnel-layered-shape__badge{fill:var(--vc-funnel-badge-bg,var(--vc-surface-bg,oklch(1 0 0)));fill-opacity:var(--vc-funnel-badge-opacity,.82);stroke:var(--vc-funnel-badge-border,var(--vc-axis-line-color,oklch(.922 0 0)));stroke-opacity:.7}.vc-funnel-layered-shape__badge-text{fill:var(--vc-funnel-badge-color,var(--vc-tick-color,oklch(.556 0 0)));font-variant-numeric:tabular-nums;font-weight:var(--vc-funnel-badge-weight,600)}.vc-funnel-layered-shape__name{fill:var(--vc-funnel-label-color,var(--vc-tick-color,oklch(.556 0 0)));font-weight:var(--vc-funnel-label-weight,500)}.vc-status-tracker{color:var(--vc-axis-label-color,var(--ui-text-highlighted,var(--foreground,oklch(.205 0 0))));font-family:inherit;width:100%}.vc-status-tracker__header{align-items:baseline;display:flex;gap:1rem;justify-content:space-between;margin-bottom:.75rem}.vc-status-tracker__summary,.vc-status-tracker__title{font-size:.875rem;line-height:1.25rem;margin:0}.vc-status-tracker__title{font-weight:600}.vc-status-tracker__summary{color:var(--vc-tick-color,var(--ui-text-muted,var(--muted-foreground,oklch(.556 0 0))));font-variant-numeric:tabular-nums}.vc-status-tracker__track{display:flex;overflow:hidden;width:100%}.vc-status-tracker__bar{display:block;flex:0 0 auto;height:100%;min-width:1px;transition:opacity .16s ease}.vc-status-tracker__bar:hover{opacity:.78}.vc-status-tracker__bar--rounded-start{border-bottom-left-radius:.25rem;border-top-left-radius:.25rem}.vc-status-tracker__bar--rounded-end{border-bottom-right-radius:.25rem;border-top-right-radius:.25rem}.vc-status-tracker__bar--empty:hover{opacity:1}.vc-status-tracker__labels{gap:1rem;justify-content:space-between;margin-top:.5rem}.vc-status-tracker__labels,.vc-status-tracker__legend{color:var(--vc-legend-color,oklch(.556 0 0));display:flex;font-size:var(--vc-legend-size,.75rem);line-height:1rem}.vc-status-tracker__legend{flex-wrap:wrap;gap:.5rem 1rem;list-style:none;margin:var(--vc-legend-inset,.75rem) 0 0;padding:0}.vc-status-tracker__legend-item{align-items:center;display:inline-flex;gap:.375rem}.vc-status-tracker__legend-dot{border-radius:9999px;flex:0 0 auto;height:var(--vc-legend-dot-size,.5rem);width:var(--vc-legend-dot-size,.5rem)}}.vc-sr-only{height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;clip:rect(0,0,0,0)!important;border:0!important;white-space:nowrap!important}.vc-empty-state{color:var(--vc-tick-color);display:grid;font-size:var(--vc-legend-size);place-items:center}@layer vue-chrts{.vc-map{display:flex;gap:var(--vc-legend-inset)}.vc-map__viewport{overflow:hidden;position:relative;width:100%}.vc-map__svg{display:block;height:100%;width:100%}.vc-map__svg--zoomable{cursor:grab;touch-action:none}.vc-map__svg--zoomable:active{cursor:grabbing}.vc-map__svg:focus-visible{outline:2px solid var(--vc-series-0);outline-offset:-2px}.vc-map__mark:focus-visible{filter:brightness(1.25);outline:none}.vc-map__mark:focus-visible>circle,.vc-map__mark:focus-visible>path{stroke:var(--vc-axis-label-color);stroke-width:2}.vc-map__label{fill:var(--vc-axis-label-color);font:var(--vc-tick-weight) var(--vc-tick-size) var(--vc-font-family);paint-order:stroke;pointer-events:none;stroke:var(--vc-surface-bg);stroke-width:3px}.vc-map__tooltip{max-width:min(280px,90%);pointer-events:none;position:absolute;z-index:2}.vc-map__legend{display:flex}.vc-map__controls{background:var(--vc-surface-bg);border:1px solid var(--vc-tooltip-border);border-radius:var(--vc-tooltip-radius);bottom:12px;display:flex;position:absolute;right:12px}.vc-map__controls button{background:transparent;border:0;color:var(--vc-axis-label-color);cursor:pointer;font:inherit;height:32px;width:32px}.vc-map__controls button:hover{background:var(--vc-hover-fill)}.vc-map__controls button:focus-visible{outline:2px solid var(--vc-series-0);outline-offset:-2px}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer vue-chrts{.vue-chrts :focus,.vue-chrts :focus-visible,.vue-chrts:focus,.vue-chrts:focus-visible{outline:none}.vue-chrts{--vc-grid-color:var(--ui-border,var(--border,oklch(0.922 0 0)));--vc-grid-dash:3 3;--vc-grid-width:1px;--vc-axis-line-color:var(--ui-border,var(--border,oklch(0.922 0 0)));--vc-axis-line-width:1px;--vc-surface-bg:var(--ui-bg,var(--background,oklch(1 0 0)));--vc-reference-line-color:var(--ui-text-muted,var(--muted-foreground,oklch(0.556 0 0)));--vc-candle-up:var(--ui-success,oklch(0.696 0.17 162.48));--vc-candle-down:var(--ui-error,oklch(0.637 0.237 25.331));--vc-bg-pattern-color:var(--vc-grid-color);--vc-legend-size:0.75rem;--vc-legend-weight:400;--vc-tick-color:var(--ui-text-muted,var(--muted-foreground,oklch(0.556 0 0)));--vc-tick-size:var(--vc-legend-size);--vc-tick-weight:var(--vc-legend-weight);--vc-axis-label-color:var(--ui-text-highlighted,var(--foreground,oklch(0.205 0 0)));--vc-axis-label-size:var(--vc-legend-size);--vc-axis-label-weight:500}.vue-chrts .v-charts-cartesian-axis .v-charts-label{fill:var(--vc-axis-label-color);font-size:var(--vc-axis-label-size);font-weight:var(--vc-axis-label-weight)}.vue-chrts{--vc-legend-gap:0.75rem;--vc-legend-inset:0.75rem;--vc-legend-color:var(--ui-text-muted,var(--muted-foreground,oklch(0.556 0 0)));--vc-legend-dot-size:0.5rem;--vc-funnel-value-size:var(--vc-legend-size);--vc-funnel-value-color:var(--vc-axis-label-color);--vc-funnel-value-weight:600;--vc-funnel-label-color:var(--vc-tick-color);--vc-funnel-label-weight:500;--vc-funnel-badge-bg:var(--vc-surface-bg);--vc-funnel-badge-color:var(--vc-tick-color);--vc-funnel-badge-border:var(--vc-axis-line-color);--vc-funnel-badge-weight:600;--vc-funnel-badge-opacity:0.82;--vc-hover-fill:color-mix(in oklab,var(--ui-text-highlighted,var(--foreground,oklch(0.205 0 0))) 6%,transparent);--vc-hover-stroke:transparent;--vc-hover-radius:6px;--vc-tooltip-bg:var(--ui-bg,var(--popover,oklch(1 0 0)));--vc-tooltip-fg:var(--ui-text-highlighted,var(--popover-foreground,oklch(0.205 0 0)));--vc-tooltip-muted:var(--ui-text-muted,var(--muted-foreground,oklch(0.556 0 0)));--vc-tooltip-border:var(--ui-border,var(--border,oklch(0.922 0 0)));--vc-tooltip-radius:0.5rem;--vc-tooltip-padding:0.375rem 0.625rem;--vc-tooltip-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1)}.vue-chrts .v-charts-xAxis .v-charts-cartesian-axis-tick-value{fill:var(--vc-x-tick-color,var(--vc-tick-color));font-size:var(--vc-x-tick-size,var(--vc-tick-size));font-weight:var(--vc-x-tick-weight,var(--vc-tick-weight))}.vue-chrts .v-charts-yAxis .v-charts-cartesian-axis-tick-value{fill:var(--vc-y-tick-color,var(--vc-tick-color));font-size:var(--vc-y-tick-size,var(--vc-tick-size));font-weight:var(--vc-y-tick-weight,var(--vc-tick-weight))}.vue-chrts .v-charts-polar-angle-axis-tick-value,.vue-chrts .v-charts-polar-radius-axis-tick-value{fill:var(--vc-tick-color);font-size:var(--vc-tick-size);font-weight:var(--vc-tick-weight)}.vue-chrts.vc-dash-animated .v-charts-area-curve,.vue-chrts.vc-dash-animated .v-charts-line-curve{animation:vc-dash-march 1s linear infinite}@keyframes vc-dash-march{to{stroke-dashoffset:-6}}@media (prefers-reduced-motion:reduce){.vue-chrts.vc-dash-animated .v-charts-area-curve,.vue-chrts.vc-dash-animated .v-charts-line-curve{animation:none}}.vue-chrts:is(.dark,[data-theme=dark],.dark *,[data-theme=dark] *),:is(.dark,[data-theme=dark]) .vue-chrts{--vc-grid-color:var(--ui-border,var(--border,oklch(0.269 0 0)));--vc-axis-line-color:var(--ui-border,var(--border,oklch(0.269 0 0)));--vc-surface-bg:var(--ui-bg,var(--background,oklch(0.145 0 0)));--vc-tick-color:var(--ui-text-muted,var(--muted-foreground,oklch(0.708 0 0)));--vc-axis-label-color:var(--ui-text-highlighted,var(--foreground,oklch(0.985 0 0)));--vc-legend-color:var(--ui-text-muted,var(--muted-foreground,oklch(0.708 0 0)));--vc-hover-fill:color-mix(in oklab,var(--ui-text-highlighted,oklch(0.985 0 0)) 8%,transparent);--vc-tooltip-bg:var(--ui-bg,var(--popover,oklch(0.205 0 0)));--vc-tooltip-fg:var(--ui-text-highlighted,var(--popover-foreground,oklch(0.985 0 0)));--vc-tooltip-muted:var(--ui-text-muted,var(--muted-foreground,oklch(0.708 0 0)));--vc-tooltip-border:var(--ui-border,var(--border,oklch(0.269 0 0)))}}
|
|
1
|
+
@layer vue-chrts{.vue-chrts :focus,.vue-chrts :focus-visible,.vue-chrts:focus,.vue-chrts:focus-visible{outline:none}.vue-chrts{--vc-map-feature-color:var(--ui-bg-accented,var(--vc-grid-color));--vc-map-boundary-color:var(--ui-border-accented,var(--vc-surface-bg));--vc-map-dot-color:var(--ui-text-dimmed,var(--vc-tick-color));--vc-font-family:var(--font-sans,ui-sans-serif,system-ui,sans-serif);--vc-series-0:var(--chart-color-0,var(--ui-primary,oklch(0.63 0.18 155)));--vc-series-1:var(--chart-color-1,var(--ui-secondary,oklch(0.62 0.19 255)));--vc-series-2:var(--chart-color-2,var(--ui-success,oklch(0.64 0.17 145)));--vc-series-3:var(--chart-color-3,var(--ui-info,oklch(0.68 0.15 235)));--vc-series-4:var(--chart-color-4,var(--ui-warning,oklch(0.75 0.16 75)));--vc-series-5:var(--chart-color-5,var(--ui-error,oklch(0.63 0.22 25)));--vc-series-6:var(--chart-color-6,oklch(0.66 0.18 305));--vc-series-7:var(--chart-color-7,oklch(0.7 0.15 195));font-family:var(--vc-font-family);--vc-grid-color:var(--ui-border,var(--border,oklch(0.922 0 0)));--vc-grid-dash:3 3;--vc-grid-width:1px;--vc-axis-line-color:var(--ui-border,var(--border,oklch(0.922 0 0)));--vc-axis-line-width:1px;--vc-surface-bg:var(--ui-bg,var(--background,oklch(1 0 0)));--vc-reference-line-color:var(--ui-text-muted,var(--muted-foreground,oklch(0.556 0 0)));--vc-candle-up:var(--ui-success,oklch(0.696 0.17 162.48));--vc-candle-down:var(--ui-error,oklch(0.637 0.237 25.331));--vc-bg-pattern-color:var(--vc-grid-color);--vc-legend-size:0.75rem;--vc-legend-weight:400;--vc-tick-color:var(--ui-text-muted,var(--muted-foreground,oklch(0.556 0 0)));--vc-tick-size:var(--vc-legend-size);--vc-tick-weight:var(--vc-legend-weight);--vc-axis-label-color:var(--ui-text-highlighted,var(--foreground,oklch(0.205 0 0)));--vc-axis-label-size:var(--vc-legend-size);--vc-axis-label-weight:500}.vue-chrts .v-charts-cartesian-axis .v-charts-label{fill:var(--vc-axis-label-color);font-size:var(--vc-axis-label-size);font-weight:var(--vc-axis-label-weight)}.vue-chrts{--vc-legend-gap:0.75rem;--vc-legend-inset:0.75rem;--vc-legend-color:var(--ui-text-muted,var(--muted-foreground,oklch(0.556 0 0)));--vc-legend-dot-size:0.5rem;--vc-funnel-value-size:var(--vc-legend-size);--vc-funnel-value-color:var(--vc-axis-label-color);--vc-funnel-value-weight:600;--vc-funnel-label-color:var(--vc-tick-color);--vc-funnel-label-weight:500;--vc-funnel-badge-bg:var(--vc-surface-bg);--vc-funnel-badge-color:var(--vc-tick-color);--vc-funnel-badge-border:var(--vc-axis-line-color);--vc-funnel-badge-weight:600;--vc-funnel-badge-opacity:0.82;--vc-hover-fill:color-mix(in oklab,var(--ui-text-highlighted,var(--foreground,oklch(0.205 0 0))) 6%,transparent);--vc-hover-stroke:transparent;--vc-hover-radius:6px;--vc-tooltip-bg:var(--ui-bg-elevated,var(--popover,oklch(1 0 0)));--vc-tooltip-fg:var(--ui-text-highlighted,var(--popover-foreground,oklch(0.205 0 0)));--vc-tooltip-muted:var(--ui-text-muted,var(--muted-foreground,oklch(0.556 0 0)));--vc-tooltip-border:var(--ui-border,var(--border,oklch(0.922 0 0)));--vc-tooltip-radius:var(--ui-radius,0.5rem);--vc-tooltip-padding:0.375rem 0.625rem;--vc-tooltip-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1)}.vue-chrts .v-charts-xAxis .v-charts-cartesian-axis-tick-value{fill:var(--vc-x-tick-color,var(--vc-tick-color));font-size:var(--vc-x-tick-size,var(--vc-tick-size));font-weight:var(--vc-x-tick-weight,var(--vc-tick-weight))}.vue-chrts .v-charts-yAxis .v-charts-cartesian-axis-tick-value{fill:var(--vc-y-tick-color,var(--vc-tick-color));font-size:var(--vc-y-tick-size,var(--vc-tick-size));font-weight:var(--vc-y-tick-weight,var(--vc-tick-weight))}.vue-chrts .v-charts-polar-angle-axis-tick-value,.vue-chrts .v-charts-polar-radius-axis-tick-value{fill:var(--vc-tick-color);font-size:var(--vc-tick-size);font-weight:var(--vc-tick-weight)}.vue-chrts.vc-dash-animated .v-charts-area-curve,.vue-chrts.vc-dash-animated .v-charts-line-curve{animation:vc-dash-march 1s linear infinite}@keyframes vc-dash-march{to{stroke-dashoffset:-6}}@media (prefers-reduced-motion:reduce){.vue-chrts.vc-dash-animated .v-charts-area-curve,.vue-chrts.vc-dash-animated .v-charts-line-curve{animation:none}}.vue-chrts:is(.dark,[data-theme=dark],.dark *,[data-theme=dark] *),:is(.dark,[data-theme=dark]) .vue-chrts{--vc-grid-color:var(--ui-border,var(--border,oklch(0.269 0 0)));--vc-axis-line-color:var(--ui-border,var(--border,oklch(0.269 0 0)));--vc-surface-bg:var(--ui-bg,var(--background,oklch(0.145 0 0)));--vc-tick-color:var(--ui-text-muted,var(--muted-foreground,oklch(0.708 0 0)));--vc-axis-label-color:var(--ui-text-highlighted,var(--foreground,oklch(0.985 0 0)));--vc-legend-color:var(--ui-text-muted,var(--muted-foreground,oklch(0.708 0 0)));--vc-hover-fill:color-mix(in oklab,var(--ui-text-highlighted,oklch(0.985 0 0)) 8%,transparent);--vc-tooltip-bg:var(--ui-bg-elevated,var(--popover,oklch(0.205 0 0)));--vc-tooltip-fg:var(--ui-text-highlighted,var(--popover-foreground,oklch(0.985 0 0)));--vc-tooltip-muted:var(--ui-text-muted,var(--muted-foreground,oklch(0.708 0 0)));--vc-tooltip-border:var(--ui-border,var(--border,oklch(0.269 0 0)))}}
|
|
@@ -155,6 +155,7 @@ defineSlots();
|
|
|
155
155
|
:x-axis-key="xAxisKey"
|
|
156
156
|
:container-props="chartContainerProps"
|
|
157
157
|
:percent-axis="stacked === true && percent === true"
|
|
158
|
+
:value-stacked="stacked === true"
|
|
158
159
|
:frame-class="frameClass"
|
|
159
160
|
skeleton-shape="wave"
|
|
160
161
|
v-bind="props"
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import AreaChart from "./AreaChart.vue";
|
|
4
|
+
import BarChart from "./BarChart.vue";
|
|
5
|
+
import LineChart from "./LineChart.vue";
|
|
6
|
+
import { transform } from "../spec/transform";
|
|
7
|
+
import { formatBucket, specCategories, seriesLabel, validateSpec } from "../spec/resolve";
|
|
8
|
+
import { VALUE_KEY } from "../spec/types";
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
data: { type: Array, required: true },
|
|
11
|
+
spec: { type: Object, required: true },
|
|
12
|
+
height: { type: Number, required: false, default: 260 },
|
|
13
|
+
locale: { type: String, required: false },
|
|
14
|
+
hideLegend: { type: Boolean, required: false },
|
|
15
|
+
stacked: { type: Boolean, required: false },
|
|
16
|
+
theme: { type: Object, required: false },
|
|
17
|
+
valueFormatter: { type: Function, required: false },
|
|
18
|
+
ariaLabel: { type: String, required: false },
|
|
19
|
+
ariaDescription: { type: String, required: false },
|
|
20
|
+
accessibleDataTable: { type: Boolean, required: false },
|
|
21
|
+
maxDataPoints: { type: Number, required: false },
|
|
22
|
+
emptyLabel: { type: String, required: false },
|
|
23
|
+
error: { type: String, required: false },
|
|
24
|
+
legendVariant: { type: String, required: false },
|
|
25
|
+
tooltipVariant: { type: String, required: false },
|
|
26
|
+
tooltipRoundness: { type: String, required: false },
|
|
27
|
+
loading: { type: Boolean, required: false },
|
|
28
|
+
loadingLabel: { type: String, required: false }
|
|
29
|
+
});
|
|
30
|
+
const specError = computed(() => validateSpec(props.spec));
|
|
31
|
+
const result = computed(() => {
|
|
32
|
+
if (specError.value) return { data: [], series: [], total: 0 };
|
|
33
|
+
return transform(props.data ?? [], props.spec);
|
|
34
|
+
});
|
|
35
|
+
const chartData = computed(
|
|
36
|
+
() => result.value.data.map((datum) => ({
|
|
37
|
+
...datum,
|
|
38
|
+
x: formatBucket(datum.x, props.spec.transform?.interval, props.locale)
|
|
39
|
+
}))
|
|
40
|
+
);
|
|
41
|
+
const categories = computed(() => specCategories(result.value.series, props.spec));
|
|
42
|
+
const yFormatter = computed(
|
|
43
|
+
() => props.valueFormatter ? (tick) => props.valueFormatter(tick) : void 0
|
|
44
|
+
);
|
|
45
|
+
const common = computed(() => ({
|
|
46
|
+
data: chartData.value,
|
|
47
|
+
height: props.height,
|
|
48
|
+
categories: categories.value,
|
|
49
|
+
xAxis: "x",
|
|
50
|
+
stacked: props.stacked,
|
|
51
|
+
hideLegend: props.hideLegend,
|
|
52
|
+
yFormatter: yFormatter.value,
|
|
53
|
+
theme: props.theme,
|
|
54
|
+
error: specError.value ?? props.error,
|
|
55
|
+
loading: props.loading,
|
|
56
|
+
loadingLabel: props.loadingLabel,
|
|
57
|
+
emptyLabel: props.emptyLabel,
|
|
58
|
+
ariaLabel: props.ariaLabel ?? props.spec.label ?? seriesLabel(VALUE_KEY, props.spec),
|
|
59
|
+
ariaDescription: props.ariaDescription,
|
|
60
|
+
legendVariant: props.legendVariant,
|
|
61
|
+
tooltipVariant: props.tooltipVariant,
|
|
62
|
+
tooltipRoundness: props.tooltipRoundness
|
|
63
|
+
}));
|
|
64
|
+
const barSeriesKeys = computed(() => result.value.series);
|
|
65
|
+
defineExpose({ result });
|
|
66
|
+
defineSlots();
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<template>
|
|
70
|
+
<BarChart
|
|
71
|
+
v-if="spec.type === 'bar'"
|
|
72
|
+
v-bind="common"
|
|
73
|
+
:y-axis="barSeriesKeys"
|
|
74
|
+
>
|
|
75
|
+
<template v-if="$slots.tooltip" #tooltip="scope">
|
|
76
|
+
<slot name="tooltip" v-bind="scope" />
|
|
77
|
+
</template>
|
|
78
|
+
</BarChart>
|
|
79
|
+
|
|
80
|
+
<AreaChart v-else-if="spec.type === 'area'" v-bind="common">
|
|
81
|
+
<template v-if="$slots.tooltip" #tooltip="scope">
|
|
82
|
+
<slot name="tooltip" v-bind="scope" />
|
|
83
|
+
</template>
|
|
84
|
+
</AreaChart>
|
|
85
|
+
|
|
86
|
+
<LineChart v-else v-bind="common">
|
|
87
|
+
<template v-if="$slots.tooltip" #tooltip="scope">
|
|
88
|
+
<slot name="tooltip" v-bind="scope" />
|
|
89
|
+
</template>
|
|
90
|
+
</LineChart>
|
|
91
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type SpecDatum } from "../spec/types.js";
|
|
2
|
+
import type { DataChartProps } from "../types/charts.js";
|
|
3
|
+
import type { TransformResult } from "../spec/transform.js";
|
|
4
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<DataChartProps<T>> & (typeof globalThis extends {
|
|
6
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
7
|
+
} ? P : {});
|
|
8
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
9
|
+
result: import("vue").ComputedRef<TransformResult>;
|
|
10
|
+
}>) => void;
|
|
11
|
+
attrs: any;
|
|
12
|
+
slots: {
|
|
13
|
+
tooltip?: (props: {
|
|
14
|
+
values: SpecDatum | undefined;
|
|
15
|
+
}) => unknown;
|
|
16
|
+
};
|
|
17
|
+
emit: {};
|
|
18
|
+
}>) => import("vue").VNode & {
|
|
19
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
20
|
+
};
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
24
|
+
[K in keyof T]: T[K];
|
|
25
|
+
} : {
|
|
26
|
+
[K in keyof T as K]: T[K];
|
|
27
|
+
}) & {};
|
|
@@ -60,7 +60,7 @@ const segments = computed(() => {
|
|
|
60
60
|
warnDataLimit("DonutChart", normalized.length, limit);
|
|
61
61
|
const values = sampleData(normalized, limit);
|
|
62
62
|
return values.map(({ row, value, sourceIndex, name }) => {
|
|
63
|
-
const color = cats[sourceIndex]?.color ?? `var(--
|
|
63
|
+
const color = cats[sourceIndex]?.color ?? `var(--vc-series-${sourceIndex % 8})`;
|
|
64
64
|
return {
|
|
65
65
|
...row && typeof row === "object" ? row : {},
|
|
66
66
|
name,
|