@flux-ui/statistics 3.0.0-next.68 → 3.0.0-next.70
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/dist/component/FluxStatisticsLegendScope.vue.d.ts +13 -0
- package/dist/component/FluxStatisticsPercentageBar.vue.d.ts +8 -0
- package/dist/component/index.d.ts +2 -0
- package/dist/composable/index.d.ts +4 -2
- package/dist/composable/useChartBaseSetup.d.ts +8 -0
- package/dist/composable/{usePieSlicesSetup.d.ts → useChartSlicesSetup.d.ts} +2 -2
- package/dist/index.css +67 -32
- package/dist/index.js +917 -517
- package/dist/index.js.map +1 -1
- package/dist/util/index.d.ts +5 -6
- package/dist/util/options/buildBaseOptions.d.ts +2 -0
- package/dist/util/{baseOptions.d.ts → options/buildCartesianBaseOptions.d.ts} +4 -6
- package/dist/util/options/buildCircularBaseOptions.d.ts +2 -0
- package/dist/util/options/cartesian/buildAreaChartOptions.d.ts +17 -0
- package/dist/util/options/cartesian/buildBarChartOptions.d.ts +17 -0
- package/dist/util/options/cartesian/buildBoxPlotChartOptions.d.ts +16 -0
- package/dist/util/options/cartesian/buildBubbleChartOptions.d.ts +15 -0
- package/dist/util/options/cartesian/buildCandlestickChartOptions.d.ts +17 -0
- package/dist/util/options/cartesian/buildHeatmapChartOptions.d.ts +15 -0
- package/dist/util/options/cartesian/buildLineChartOptions.d.ts +17 -0
- package/dist/util/options/cartesian/buildMixedChartOptions.d.ts +17 -0
- package/dist/util/options/cartesian/buildScatterChartOptions.d.ts +15 -0
- package/dist/util/options/cartesian/index.d.ts +18 -0
- package/dist/util/options/circular/buildDonutChartOptions.d.ts +15 -0
- package/dist/util/options/circular/buildGaugeChartOptions.d.ts +14 -0
- package/dist/util/options/circular/buildPieChartOptions.d.ts +15 -0
- package/dist/util/options/circular/buildPolarAreaChartOptions.d.ts +15 -0
- package/dist/util/options/circular/buildRadarChartOptions.d.ts +13 -0
- package/dist/util/options/circular/buildTreemapChartOptions.d.ts +12 -0
- package/dist/util/options/circular/index.d.ts +12 -0
- package/dist/util/options/index.d.ts +6 -0
- package/dist/util/series/chartColors.d.ts +3 -0
- package/dist/util/{convert.d.ts → series/converters.d.ts} +1 -6
- package/dist/util/series/index.d.ts +4 -0
- package/dist/util/series/labels.d.ts +5 -0
- package/dist/util/tooltips/buildBoxPlotTooltip.d.ts +22 -0
- package/dist/util/tooltips/buildCartesianTooltip.d.ts +10 -0
- package/dist/util/tooltips/buildGaugeTooltip.d.ts +14 -0
- package/dist/util/tooltips/buildHeatmapTooltip.d.ts +17 -0
- package/dist/util/tooltips/buildRadarTooltip.d.ts +11 -0
- package/dist/util/tooltips/buildSharedItemTooltip.d.ts +10 -0
- package/dist/util/tooltips/buildTreemapTooltip.d.ts +12 -0
- package/dist/util/tooltips/index.d.ts +15 -0
- package/dist/util/tooltips/render.d.ts +4 -0
- package/dist/util/tooltips/types.d.ts +24 -0
- package/package.json +13 -13
- package/src/component/FluxStatisticsAreaChart.vue +15 -19
- package/src/component/FluxStatisticsBarChart.vue +15 -19
- package/src/component/FluxStatisticsBoxPlotChart.vue +14 -34
- package/src/component/FluxStatisticsBubbleChart.vue +13 -23
- package/src/component/FluxStatisticsCandlestickChart.vue +14 -45
- package/src/component/FluxStatisticsChart.vue +2 -2
- package/src/component/FluxStatisticsChartPane.vue +12 -13
- package/src/component/FluxStatisticsDonutChart.vue +15 -24
- package/src/component/FluxStatisticsHeatmapChart.vue +15 -48
- package/src/component/FluxStatisticsLegendScope.vue +16 -0
- package/src/component/FluxStatisticsLineChart.vue +15 -19
- package/src/component/FluxStatisticsMixedChart.vue +15 -18
- package/src/component/FluxStatisticsPercentageBar.vue +90 -0
- package/src/component/FluxStatisticsPieChart.vue +15 -24
- package/src/component/FluxStatisticsPolarAreaChart.vue +15 -24
- package/src/component/FluxStatisticsRadarChart.vue +11 -79
- package/src/component/FluxStatisticsRadialBar.vue +11 -20
- package/src/component/FluxStatisticsScatterChart.vue +13 -23
- package/src/component/FluxStatisticsTreemapChart.vue +11 -15
- package/src/component/index.ts +2 -0
- package/src/composable/index.ts +4 -2
- package/src/composable/useChartBaseSetup.ts +16 -0
- package/src/composable/{usePieSlicesSetup.ts → useChartSlicesSetup.ts} +3 -3
- package/src/css/Chart.module.scss +10 -15
- package/src/css/ChartPane.module.scss +3 -10
- package/src/css/Empty.module.scss +2 -2
- package/src/css/Legend.module.scss +16 -8
- package/src/css/Meter.module.scss +1 -0
- package/src/css/PercentageBar.module.scss +36 -0
- package/src/util/index.ts +5 -6
- package/src/util/options/buildBaseOptions.ts +31 -0
- package/src/util/{baseOptions.ts → options/buildCartesianBaseOptions.ts} +15 -22
- package/src/util/options/buildCircularBaseOptions.ts +10 -0
- package/src/util/options/cartesian/buildAreaChartOptions.ts +44 -0
- package/src/util/options/cartesian/buildBarChartOptions.ts +44 -0
- package/src/util/options/cartesian/buildBoxPlotChartOptions.ts +63 -0
- package/src/util/options/cartesian/buildBubbleChartOptions.ts +48 -0
- package/src/util/options/cartesian/buildCandlestickChartOptions.ts +77 -0
- package/src/util/options/cartesian/buildHeatmapChartOptions.ts +72 -0
- package/src/util/options/cartesian/buildLineChartOptions.ts +44 -0
- package/src/util/options/cartesian/buildMixedChartOptions.ts +44 -0
- package/src/util/options/cartesian/buildScatterChartOptions.ts +48 -0
- package/src/util/options/cartesian/index.ts +18 -0
- package/src/util/options/circular/buildDonutChartOptions.ts +31 -0
- package/src/util/options/circular/buildGaugeChartOptions.ts +45 -0
- package/src/util/options/circular/buildPieChartOptions.ts +31 -0
- package/src/util/options/circular/buildPolarAreaChartOptions.ts +31 -0
- package/src/util/options/circular/buildRadarChartOptions.ts +52 -0
- package/src/util/options/circular/buildTreemapChartOptions.ts +28 -0
- package/src/util/options/circular/index.ts +12 -0
- package/src/util/options/index.ts +6 -0
- package/src/util/series/chartColors.ts +20 -0
- package/src/util/{convert.ts → series/converters.ts} +2 -44
- package/src/util/series/index.ts +4 -0
- package/src/util/series/labels.ts +30 -0
- package/src/util/tooltips/buildBoxPlotTooltip.ts +66 -0
- package/src/util/tooltips/buildCartesianTooltip.ts +44 -0
- package/src/util/tooltips/buildGaugeTooltip.ts +49 -0
- package/src/util/tooltips/buildHeatmapTooltip.ts +57 -0
- package/src/util/tooltips/buildRadarTooltip.ts +53 -0
- package/src/util/tooltips/buildSharedItemTooltip.ts +38 -0
- package/src/util/tooltips/buildTreemapTooltip.ts +49 -0
- package/src/util/tooltips/index.ts +15 -0
- package/src/util/tooltips/render.ts +66 -0
- package/src/util/tooltips/types.ts +29 -0
- package/dist/util/defaultOptions.d.ts +0 -76
- package/src/util/defaultOptions.ts +0 -398
- /package/dist/util/{iconSvg.d.ts → icons.d.ts} +0 -0
- /package/dist/util/{seriesDefaults.d.ts → series/defaults.d.ts} +0 -0
- /package/dist/util/{sparklineOptions.d.ts → sparkline.d.ts} +0 -0
- /package/src/util/{iconSvg.ts → icons.ts} +0 -0
- /package/src/util/{seriesDefaults.ts → series/defaults.ts} +0 -0
- /package/src/util/{sparklineOptions.ts → sparkline.ts} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
default(): any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FluxStatisticsPercentageBarItemObject } from '@flux-ui/types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
readonly items: FluxStatisticsPercentageBarItemObject[];
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -18,9 +18,11 @@ export { default as FluxStatisticsLineChart } from './FluxStatisticsLineChart.vu
|
|
|
18
18
|
export { default as FluxStatisticsKpi } from './FluxStatisticsKpi.vue';
|
|
19
19
|
export { default as FluxStatisticsLegend } from './FluxStatisticsLegend.vue';
|
|
20
20
|
export { default as FluxStatisticsLegendItem } from './FluxStatisticsLegendItem.vue';
|
|
21
|
+
export { default as FluxStatisticsLegendScope } from './FluxStatisticsLegendScope.vue';
|
|
21
22
|
export { default as FluxStatisticsMeter } from './FluxStatisticsMeter.vue';
|
|
22
23
|
export { default as FluxStatisticsMetric } from './FluxStatisticsMetric.vue';
|
|
23
24
|
export { default as FluxStatisticsMixedChart } from './FluxStatisticsMixedChart.vue';
|
|
25
|
+
export { default as FluxStatisticsPercentageBar } from './FluxStatisticsPercentageBar.vue';
|
|
24
26
|
export { default as FluxStatisticsPieChart } from './FluxStatisticsPieChart.vue';
|
|
25
27
|
export { default as FluxStatisticsPolarAreaChart } from './FluxStatisticsPolarAreaChart.vue';
|
|
26
28
|
export { default as FluxStatisticsRadarChart } from './FluxStatisticsRadarChart.vue';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
export type { UseChartBaseSetupReturn } from './useChartBaseSetup';
|
|
2
|
+
export { useChartBaseSetup } from './useChartBaseSetup';
|
|
1
3
|
export type { ChartLegendContext, ChartLegendItem } from './useChartLegend';
|
|
2
4
|
export { createChartLegendContext, FluxStatisticsChartLegendInjectionKey } from './useChartLegend';
|
|
3
5
|
export type { ChartHoverSyncMode, UseChartHoverSyncOptions } from './useChartHoverSync';
|
|
4
6
|
export { useChartHoverSync } from './useChartHoverSync';
|
|
5
7
|
export type { ChartLegendItemBuilder, ChartSeriesShape, UseChartSeriesSetupOptions, UseChartSeriesSetupReturn } from './useChartSeriesSetup';
|
|
6
8
|
export { useChartSeriesSetup } from './useChartSeriesSetup';
|
|
7
|
-
export type {
|
|
8
|
-
export {
|
|
9
|
+
export type { UseChartSlicesSetupReturn } from './useChartSlicesSetup';
|
|
10
|
+
export { useChartSlicesSetup } from './useChartSlicesSetup';
|
|
9
11
|
export type { EChartsInstance, EChartsOption, UseEChartsReturn } from './useECharts';
|
|
10
12
|
export { useECharts } from './useECharts';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { useI18n } from 'vue-i18n';
|
|
3
|
+
import { EChartsInstance } from './useECharts';
|
|
4
|
+
export interface UseChartBaseSetupReturn {
|
|
5
|
+
readonly t: ReturnType<typeof useI18n>['t'];
|
|
6
|
+
readonly chartInstance: ComputedRef<EChartsInstance | null>;
|
|
7
|
+
}
|
|
8
|
+
export declare function useChartBaseSetup(): UseChartBaseSetupReturn;
|
|
@@ -4,11 +4,11 @@ import { useI18n } from 'vue-i18n';
|
|
|
4
4
|
import { SharedTooltipItem } from '../util';
|
|
5
5
|
import { ChartLegendContext } from './useChartLegend';
|
|
6
6
|
import { EChartsInstance } from './useECharts';
|
|
7
|
-
export interface
|
|
7
|
+
export interface UseChartSlicesSetupReturn {
|
|
8
8
|
readonly t: ReturnType<typeof useI18n>['t'];
|
|
9
9
|
readonly palette: ComputedRef<readonly string[]>;
|
|
10
10
|
readonly tooltipItems: ComputedRef<readonly SharedTooltipItem[]>;
|
|
11
11
|
readonly legendContext: ChartLegendContext | null;
|
|
12
12
|
readonly chartInstance: ComputedRef<EChartsInstance | null>;
|
|
13
13
|
}
|
|
14
|
-
export declare function
|
|
14
|
+
export declare function useChartSlicesSetup(slicesGetter: () => readonly FluxStatisticsChartPieSlice[]): UseChartSlicesSetupReturn;
|
package/dist/index.css
CHANGED
|
@@ -25,6 +25,16 @@
|
|
|
25
25
|
--stroke: rgb(from var(--surface-stroke) r g b / .5);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
.statistics-chart-tooltip {
|
|
29
|
+
background: rgb(from var(--surface) r g b/0.975);
|
|
30
|
+
background-clip: padding-box;
|
|
31
|
+
backdrop-filter: blur(3px) saturate(180%);
|
|
32
|
+
border: 1px solid var(--surface-stroke-out-hover);
|
|
33
|
+
border-radius: var(--radius-double);
|
|
34
|
+
box-shadow: var(--shadow-lg);
|
|
35
|
+
color: var(--foreground);
|
|
36
|
+
}
|
|
37
|
+
|
|
28
38
|
.statistics-chart-tooltip-title {
|
|
29
39
|
padding: 18px 18px 0;
|
|
30
40
|
color: var(--foreground-prominent);
|
|
@@ -106,20 +116,6 @@
|
|
|
106
116
|
align-items: center;
|
|
107
117
|
gap: 6px 15px;
|
|
108
118
|
grid-template-columns: repeat(3, auto);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.flux-statistics-tooltip {
|
|
112
|
-
background: rgb(from var(--surface) r g b/0.975) !important;
|
|
113
|
-
background-clip: padding-box;
|
|
114
|
-
backdrop-filter: blur(3px) saturate(180%);
|
|
115
|
-
border: 1px solid var(--surface-stroke-out-hover) !important;
|
|
116
|
-
border-radius: var(--radius-double) !important;
|
|
117
|
-
box-shadow: var(--shadow-lg) !important;
|
|
118
|
-
color: var(--foreground);
|
|
119
|
-
contain: paint;
|
|
120
|
-
}
|
|
121
|
-
.flux-statistics-tooltip:empty {
|
|
122
|
-
display: none;
|
|
123
119
|
}.statistics-base {
|
|
124
120
|
display: flex;
|
|
125
121
|
height: 100%;
|
|
@@ -229,6 +225,7 @@
|
|
|
229
225
|
--aspect-ratio: unset;
|
|
230
226
|
container: chart-pane/inline-size;
|
|
231
227
|
max-width: 100%;
|
|
228
|
+
contain: paint;
|
|
232
229
|
}
|
|
233
230
|
|
|
234
231
|
.statistics-chart-pane-body {
|
|
@@ -242,10 +239,12 @@
|
|
|
242
239
|
height: calc(100cqw / var(--aspect-ratio, 1));
|
|
243
240
|
}
|
|
244
241
|
.statistics-chart-pane-body:has(.statistics-legend) {
|
|
242
|
+
align-items: center;
|
|
245
243
|
grid-template-columns: 0.4fr 0.6fr;
|
|
246
244
|
}
|
|
247
245
|
@container chart-pane (max-width: 390px) {
|
|
248
246
|
.statistics-chart-pane-body:has(.statistics-legend) {
|
|
247
|
+
align-items: stretch;
|
|
249
248
|
grid-template-columns: 1fr;
|
|
250
249
|
grid-template-rows: auto auto;
|
|
251
250
|
}
|
|
@@ -253,14 +252,6 @@
|
|
|
253
252
|
.statistics-chart-pane-body:has(.statistics-legend) .statistics-chart-pane-container {
|
|
254
253
|
height: calc(40cqw / var(--aspect-ratio, 1));
|
|
255
254
|
}
|
|
256
|
-
.statistics-chart-pane-body:first-child canvas {
|
|
257
|
-
border-top-left-radius: var(--radius);
|
|
258
|
-
border-top-right-radius: var(--radius);
|
|
259
|
-
}
|
|
260
|
-
.statistics-chart-pane-body:last-child canvas {
|
|
261
|
-
border-bottom-left-radius: var(--radius);
|
|
262
|
-
border-bottom-right-radius: var(--radius);
|
|
263
|
-
}
|
|
264
255
|
|
|
265
256
|
.statistics-chart-pane-container {
|
|
266
257
|
position: relative;
|
|
@@ -363,9 +354,9 @@
|
|
|
363
354
|
font-size: 15px;
|
|
364
355
|
font-weight: 600;
|
|
365
356
|
}.statistics-empty {
|
|
366
|
-
position: absolute;
|
|
367
357
|
display: flex;
|
|
368
|
-
|
|
358
|
+
width: 100%;
|
|
359
|
+
height: 100%;
|
|
369
360
|
padding: 24px 18px;
|
|
370
361
|
flex-flow: column;
|
|
371
362
|
align-items: center;
|
|
@@ -458,20 +449,23 @@
|
|
|
458
449
|
line-height: 36px;
|
|
459
450
|
}.statistics-legend {
|
|
460
451
|
display: flex;
|
|
461
|
-
max-height: 360px;
|
|
462
452
|
min-width: 0;
|
|
463
|
-
padding:
|
|
464
|
-
align-self: center;
|
|
453
|
+
padding: 0 9px;
|
|
465
454
|
flex-flow: column;
|
|
466
455
|
flex-grow: 1;
|
|
467
|
-
|
|
456
|
+
gap: 3px;
|
|
468
457
|
user-select: none;
|
|
469
458
|
}
|
|
470
459
|
|
|
460
|
+
.statistics-chart-pane-body .statistics-legend {
|
|
461
|
+
padding: 9px 36px 9px 18px;
|
|
462
|
+
}
|
|
463
|
+
|
|
471
464
|
.statistics-legend-item {
|
|
472
465
|
--color: var(--primary-600);
|
|
466
|
+
position: relative;
|
|
473
467
|
display: flex;
|
|
474
|
-
padding: 6px
|
|
468
|
+
padding: 6px;
|
|
475
469
|
margin: 0 -9px;
|
|
476
470
|
align-items: flex-start;
|
|
477
471
|
flex-flow: row nowrap;
|
|
@@ -479,8 +473,8 @@
|
|
|
479
473
|
font-size: 14px;
|
|
480
474
|
line-height: 20px;
|
|
481
475
|
white-space: nowrap;
|
|
482
|
-
border-radius: var(--radius-
|
|
483
|
-
transition: background var(--swift-out);
|
|
476
|
+
border-radius: var(--radius-half);
|
|
477
|
+
transition: background 120ms var(--swift-out);
|
|
484
478
|
}
|
|
485
479
|
|
|
486
480
|
.statistics-legend-item.is-hovered {
|
|
@@ -512,7 +506,12 @@
|
|
|
512
506
|
text-align: right;
|
|
513
507
|
}
|
|
514
508
|
|
|
515
|
-
.statistics-legend-item + .statistics-legend-item {
|
|
509
|
+
.statistics-legend-item + .statistics-legend-item::before {
|
|
510
|
+
position: absolute;
|
|
511
|
+
top: -2px;
|
|
512
|
+
left: 0;
|
|
513
|
+
right: 0;
|
|
514
|
+
content: "";
|
|
516
515
|
border-top: 1px dashed var(--surface-stroke);
|
|
517
516
|
}.statistics-meter {
|
|
518
517
|
--color: var(--primary-600);
|
|
@@ -530,6 +529,7 @@
|
|
|
530
529
|
height: 6px;
|
|
531
530
|
background: var(--gray-100);
|
|
532
531
|
border-radius: var(--radius);
|
|
532
|
+
contain: paint;
|
|
533
533
|
}
|
|
534
534
|
|
|
535
535
|
.statistics-meter-bar-value {
|
|
@@ -673,6 +673,41 @@
|
|
|
673
673
|
|
|
674
674
|
.statistics-metric-value + .statistics-metric-content {
|
|
675
675
|
margin-top: 15px;
|
|
676
|
+
}.statistics-percentage-bar {
|
|
677
|
+
display: flex;
|
|
678
|
+
flex-flow: column;
|
|
679
|
+
gap: 12px;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
.statistics-percentage-bar-track {
|
|
683
|
+
display: flex;
|
|
684
|
+
flex-flow: row nowrap;
|
|
685
|
+
gap: 3px;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
.statistics-percentage-bar-segment {
|
|
689
|
+
height: 12px;
|
|
690
|
+
border-radius: calc(var(--radius) / 3);
|
|
691
|
+
transition: var(--transition-default);
|
|
692
|
+
transition-property: height, margin, flex-grow, opacity;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
.statistics-percentage-bar-segment:hover,
|
|
696
|
+
.statistics-percentage-bar-segment.is-hovered {
|
|
697
|
+
height: 16px;
|
|
698
|
+
margin-top: -2px;
|
|
699
|
+
margin-bottom: -2px;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
.statistics-percentage-bar-track.is-hover-active .statistics-percentage-bar-segment:not(.is-hovered):not(:hover) {
|
|
703
|
+
opacity: 0.5;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.statistics-percentage-bar-tooltip {
|
|
707
|
+
display: flex;
|
|
708
|
+
align-items: center;
|
|
709
|
+
flex-flow: row nowrap;
|
|
710
|
+
gap: 9px;
|
|
676
711
|
}.statistics-sparkline {
|
|
677
712
|
position: relative;
|
|
678
713
|
display: block;
|