@kong-ui-public/analytics-chart 10.13.8-pr.2800.38353414e.0 → 10.13.8-pr.2805.206b4254b.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/dist/style.css +1 -0
- package/dist/types/components/AnalyticsChart.vue.d.ts +38 -0
- package/dist/types/components/AnalyticsChart.vue.d.ts.map +1 -0
- package/dist/types/components/CsvExportModal.vue.d.ts +16 -0
- package/dist/types/components/CsvExportModal.vue.d.ts.map +1 -0
- package/dist/types/components/DownloadCsv.vue.d.ts +20 -0
- package/dist/types/components/DownloadCsv.vue.d.ts.map +1 -0
- package/dist/types/components/SimpleChart.vue.d.ts +74 -0
- package/dist/types/components/SimpleChart.vue.d.ts.map +1 -0
- package/dist/types/components/SparklineChart.vue.d.ts +95 -0
- package/dist/types/components/SparklineChart.vue.d.ts.map +1 -0
- package/dist/types/components/TopNTable.vue.d.ts +37 -0
- package/dist/types/components/TopNTable.vue.d.ts.map +1 -0
- package/dist/types/components/ZoomActions.vue.d.ts +15 -0
- package/dist/types/components/ZoomActions.vue.d.ts.map +1 -0
- package/dist/types/components/ZoomTimerange.vue.d.ts +10 -0
- package/dist/types/components/ZoomTimerange.vue.d.ts.map +1 -0
- package/dist/types/components/chart-plugins/ChartLegend.vue.d.ts +36 -0
- package/dist/types/components/chart-plugins/ChartLegend.vue.d.ts.map +1 -0
- package/dist/types/components/chart-plugins/ChartTooltip.vue.d.ts +34 -0
- package/dist/types/components/chart-plugins/ChartTooltip.vue.d.ts.map +1 -0
- package/dist/types/components/chart-plugins/DragSelectPlugin.d.ts +22 -0
- package/dist/types/components/chart-plugins/DragSelectPlugin.d.ts.map +1 -0
- package/dist/types/components/chart-plugins/HighlightPlugin.d.ts +18 -0
- package/dist/types/components/chart-plugins/HighlightPlugin.d.ts.map +1 -0
- package/dist/types/components/chart-plugins/ThresholdPlugin.d.ts +33 -0
- package/dist/types/components/chart-plugins/ThresholdPlugin.d.ts.map +1 -0
- package/dist/types/components/chart-plugins/VerticalLinePlugin.d.ts +29 -0
- package/dist/types/components/chart-plugins/VerticalLinePlugin.d.ts.map +1 -0
- package/dist/types/components/chart-types/DonutChart.vue.d.ts +28 -0
- package/dist/types/components/chart-types/DonutChart.vue.d.ts.map +1 -0
- package/dist/types/components/chart-types/GaugeChart.vue.d.ts +92 -0
- package/dist/types/components/chart-types/GaugeChart.vue.d.ts.map +1 -0
- package/dist/types/components/chart-types/SingleValue.vue.d.ts +68 -0
- package/dist/types/components/chart-types/SingleValue.vue.d.ts.map +1 -0
- package/dist/types/components/chart-types/StackedBarChart.vue.d.ts +33 -0
- package/dist/types/components/chart-types/StackedBarChart.vue.d.ts.map +1 -0
- package/dist/types/components/chart-types/TimeSeriesChart.vue.d.ts +52 -0
- package/dist/types/components/chart-types/TimeSeriesChart.vue.d.ts.map +1 -0
- package/dist/types/components/vue-json-csv/VueJsonCsv.vue.d.ts +166 -0
- package/dist/types/components/vue-json-csv/VueJsonCsv.vue.d.ts.map +1 -0
- package/dist/types/composables/index.d.ts +31 -0
- package/dist/types/composables/index.d.ts.map +1 -0
- package/dist/types/composables/useBarChartOptions.d.ts +118 -0
- package/dist/types/composables/useBarChartOptions.d.ts.map +1 -0
- package/dist/types/composables/useChartJSCommon.d.ts +5 -0
- package/dist/types/composables/useChartJSCommon.d.ts.map +1 -0
- package/dist/types/composables/useChartLegendValues.d.ts +6 -0
- package/dist/types/composables/useChartLegendValues.d.ts.map +1 -0
- package/dist/types/composables/useChartSelectedRange.d.ts +4 -0
- package/dist/types/composables/useChartSelectedRange.d.ts.map +1 -0
- package/dist/types/composables/useDonutChartOptions.d.ts +41 -0
- package/dist/types/composables/useDonutChartOptions.d.ts.map +1 -0
- package/dist/types/composables/useEvauluateFeatureFlag.d.ts +4 -0
- package/dist/types/composables/useEvauluateFeatureFlag.d.ts.map +1 -0
- package/dist/types/composables/useExploreResultToDatasets.d.ts +5 -0
- package/dist/types/composables/useExploreResultToDatasets.d.ts.map +1 -0
- package/dist/types/composables/useExploreResultToTimeDatasets.d.ts +6 -0
- package/dist/types/composables/useExploreResultToTimeDatasets.d.ts.map +1 -0
- package/dist/types/composables/useI18n.d.ts +9 -0
- package/dist/types/composables/useI18n.d.ts.map +1 -0
- package/dist/types/composables/useLineChartOptions.d.ts +115 -0
- package/dist/types/composables/useLineChartOptions.d.ts.map +1 -0
- package/dist/types/composables/useReportChartDataForSynthetics.d.ts +9 -0
- package/dist/types/composables/useReportChartDataForSynthetics.d.ts.map +1 -0
- package/dist/types/composables/useSparklineSync.d.ts +30 -0
- package/dist/types/composables/useSparklineSync.d.ts.map +1 -0
- package/dist/types/composables/useTooltipAbsolutePosition.d.ts +9 -0
- package/dist/types/composables/useTooltipAbsolutePosition.d.ts.map +1 -0
- package/dist/types/composables/useTranslatedUnits.d.ts +4 -0
- package/dist/types/composables/useTranslatedUnits.d.ts.map +1 -0
- package/dist/types/constants/index.d.ts +3 -0
- package/dist/types/constants/index.d.ts.map +1 -0
- package/dist/types/enums/chart-legend-position.enum.d.ts +5 -0
- package/dist/types/enums/chart-legend-position.enum.d.ts.map +1 -0
- package/dist/types/enums/index.d.ts +2 -0
- package/dist/types/enums/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types/chart-data.d.ts +178 -0
- package/dist/types/types/chart-data.d.ts.map +1 -0
- package/dist/types/types/chart-export.d.ts +20 -0
- package/dist/types/types/chart-export.d.ts.map +1 -0
- package/dist/types/types/chart-types.d.ts +6 -0
- package/dist/types/types/chart-types.d.ts.map +1 -0
- package/dist/types/types/chartjs-options.d.ts +68 -0
- package/dist/types/types/chartjs-options.d.ts.map +1 -0
- package/dist/types/types/dataset-generation-types.d.ts +14 -0
- package/dist/types/types/dataset-generation-types.d.ts.map +1 -0
- package/dist/types/types/explore-to-dataset-deps.d.ts +18 -0
- package/dist/types/types/explore-to-dataset-deps.d.ts.map +1 -0
- package/dist/types/types/external-link.d.ts +4 -0
- package/dist/types/types/external-link.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +10 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/query-error.d.ts +7 -0
- package/dist/types/types/query-error.d.ts.map +1 -0
- package/dist/types/types/zoom-action-item.d.ts +9 -0
- package/dist/types/types/zoom-action-item.d.ts.map +1 -0
- package/dist/types/utils/bucketTimestamps.d.ts +8 -0
- package/dist/types/utils/bucketTimestamps.d.ts.map +1 -0
- package/dist/types/utils/colors.d.ts +30 -0
- package/dist/types/utils/colors.d.ts.map +1 -0
- package/dist/types/utils/commonOptions.d.ts +22 -0
- package/dist/types/utils/commonOptions.d.ts.map +1 -0
- package/dist/types/utils/constants.d.ts +5 -0
- package/dist/types/utils/constants.d.ts.map +1 -0
- package/dist/types/utils/customColors.d.ts +10 -0
- package/dist/types/utils/customColors.d.ts.map +1 -0
- package/dist/types/utils/defaultLineOptions.d.ts +9 -0
- package/dist/types/utils/defaultLineOptions.d.ts.map +1 -0
- package/dist/types/utils/format-timestamps.d.ts +13 -0
- package/dist/types/utils/format-timestamps.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +9 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/queryError.d.ts +3 -0
- package/dist/types/utils/queryError.d.ts.map +1 -0
- package/dist/types/utils/stackedBarUtil.d.ts +9 -0
- package/dist/types/utils/stackedBarUtil.d.ts.map +1 -0
- package/dist/vitals-chart.es.js +22781 -0
- package/dist/vitals-chart.umd.js +43 -0
- package/package.json +4 -4
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { DonutChartOptions, ExternalTooltipContext } from '../types';
|
|
2
|
+
import type { TooltipItem, TooltipPositionerFunction, ChartType } from 'chart.js';
|
|
3
|
+
export default function useDonutChartOptions(chartOptions: DonutChartOptions): {
|
|
4
|
+
options: import("vue").ComputedRef<{
|
|
5
|
+
responsive: boolean;
|
|
6
|
+
maintainAspectRatio: boolean;
|
|
7
|
+
plugins: {
|
|
8
|
+
htmlLegend: {
|
|
9
|
+
containerID: string;
|
|
10
|
+
};
|
|
11
|
+
legend: {
|
|
12
|
+
display: boolean;
|
|
13
|
+
};
|
|
14
|
+
tooltip: {
|
|
15
|
+
external: (context: ExternalTooltipContext) => void;
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
position: string;
|
|
18
|
+
callbacks: {
|
|
19
|
+
label: (context: TooltipItem<"doughnut">) => {
|
|
20
|
+
label: string | undefined;
|
|
21
|
+
value: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
layout: {
|
|
27
|
+
padding: {
|
|
28
|
+
left: number;
|
|
29
|
+
right: number;
|
|
30
|
+
top: number;
|
|
31
|
+
bottom: number;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
};
|
|
36
|
+
declare module 'chart.js' {
|
|
37
|
+
interface TooltipPositionerMap {
|
|
38
|
+
[key: string]: TooltipPositionerFunction<ChartType>;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=useDonutChartOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDonutChartOptions.d.ts","sourceRoot":"","sources":["../../../src/composables/useDonutChartOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AACzE,OAAO,KAAK,EACV,WAAW,EAEX,yBAAyB,EACzB,SAAS,EACV,MAAM,UAAU,CAAA;AAMjB,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,YAAY,EAAE,iBAAiB;;;;;;;;;;;;oCAuD9C,sBAAsB;;;;qCA9C7B,WAAW,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;EAuE7C;AAED,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAU,oBAAoB;QAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,yBAAyB,CAAC,SAAS,CAAC,CAAA;KACpD;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEvauluateFeatureFlag.d.ts","sourceRoot":"","sources":["../../../src/composables/useEvauluateFeatureFlag.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,sBAAsB;+BAIV,MAAM,gBAAgB,OAAO;EAUhE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ExploreResultV4 } from '@kong-ui-public/analytics-utilities';
|
|
2
|
+
import type { Ref } from 'vue';
|
|
3
|
+
import type { ExploreToDatasetDeps, KChartData } from '../types';
|
|
4
|
+
export default function useExploreResultToDatasets(deps: ExploreToDatasetDeps, exploreResult: Ref<ExploreResultV4>): Ref<KChartData>;
|
|
5
|
+
//# sourceMappingURL=useExploreResultToDatasets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExploreResultToDatasets.d.ts","sourceRoot":"","sources":["../../../src/composables/useExploreResultToDatasets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAwC,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAChH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC9B,OAAO,KAAK,EAAW,oBAAoB,EAAE,UAAU,EAAiD,MAAM,UAAU,CAAA;AAuDxH,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAChD,IAAI,EAAE,oBAAoB,EAC1B,aAAa,EAAE,GAAG,CAAC,eAAe,CAAC,GAClC,GAAG,CAAC,UAAU,CAAC,CAyHjB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AnalyticsExploreRecord, ExploreResultV4 } from '@kong-ui-public/analytics-utilities';
|
|
2
|
+
import type { Ref } from 'vue';
|
|
3
|
+
import type { KChartData, ExploreToDatasetDeps } from '../types';
|
|
4
|
+
export declare const createZeroFilledTimeSeries: (startMs: number, endMs: number, stepMs: number, offsetMs: number, records: AnalyticsExploreRecord[]) => number[];
|
|
5
|
+
export default function useExploreResultToTimeDataset(deps: ExploreToDatasetDeps, exploreResult: Ref<ExploreResultV4>): Ref<KChartData>;
|
|
6
|
+
//# sourceMappingURL=useExploreResultToTimeDatasets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExploreResultToTimeDatasets.d.ts","sourceRoot":"","sources":["../../../src/composables/useExploreResultToTimeDatasets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAgB,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAChH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC9B,OAAO,KAAK,EAAW,UAAU,EAAE,oBAAoB,EAAgB,MAAM,UAAU,CAAA;AA4CvF,eAAO,MAAM,0BAA0B,GAAI,SAAS,MAAM,EAAE,OAAO,MAAM,EAAE,QAAQ,MAAM,EAAE,UAAU,MAAM,EAAE,SAAS,sBAAsB,EAAE,aAe7I,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,6BAA6B,CACnD,IAAI,EAAE,oBAAoB,EAC1B,aAAa,EAAE,GAAG,CAAC,eAAe,CAAC,GAClC,GAAG,CAAC,UAAU,CAAC,CAqJjB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createI18n, i18nTComponent } from '@kong-ui-public/i18n';
|
|
2
|
+
import english from '../locales/en.json';
|
|
3
|
+
interface UseI18nReturn {
|
|
4
|
+
i18n: ReturnType<typeof createI18n<typeof english>>;
|
|
5
|
+
i18nT: ReturnType<typeof i18nTComponent<typeof english>>;
|
|
6
|
+
}
|
|
7
|
+
export default function useI18n(): UseI18nReturn;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=useI18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../../src/composables/useI18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,OAAO,MAAM,oBAAoB,CAAA;AAExC,UAAU,aAAa;IACrB,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAA;IACnD,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,CAAA;CACzD;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,IAAI,aAAa,CAO/C"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type { TooltipPositionerFunction, ChartType } from 'chart.js';
|
|
2
|
+
import type { ExternalTooltipContext, LineChartOptions } from '../types';
|
|
3
|
+
export default function useLineChartOptions(chartOptions: LineChartOptions): {
|
|
4
|
+
options: import("vue").ComputedRef<{
|
|
5
|
+
hover: {
|
|
6
|
+
mode: string;
|
|
7
|
+
intersect: boolean;
|
|
8
|
+
};
|
|
9
|
+
elements: {
|
|
10
|
+
point: {
|
|
11
|
+
radius: number;
|
|
12
|
+
hitRadius: number;
|
|
13
|
+
hoverRadius: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
animation: {
|
|
17
|
+
duration: number;
|
|
18
|
+
easing: string;
|
|
19
|
+
};
|
|
20
|
+
scales: {
|
|
21
|
+
x: {
|
|
22
|
+
type: string;
|
|
23
|
+
display: boolean;
|
|
24
|
+
grid: {
|
|
25
|
+
display: boolean;
|
|
26
|
+
drawOnChartArea: boolean;
|
|
27
|
+
drawTicks: boolean;
|
|
28
|
+
drawBorder: boolean;
|
|
29
|
+
};
|
|
30
|
+
ticks: {
|
|
31
|
+
padding: number;
|
|
32
|
+
autoSkipPadding: number;
|
|
33
|
+
source: string;
|
|
34
|
+
maxRotation: number;
|
|
35
|
+
callback: (value: number) => string;
|
|
36
|
+
};
|
|
37
|
+
title: {
|
|
38
|
+
display: boolean;
|
|
39
|
+
text: string | undefined;
|
|
40
|
+
padding: {
|
|
41
|
+
top: number;
|
|
42
|
+
};
|
|
43
|
+
font: {
|
|
44
|
+
weight: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
border: {
|
|
48
|
+
display: boolean;
|
|
49
|
+
};
|
|
50
|
+
stacked: boolean;
|
|
51
|
+
};
|
|
52
|
+
y: {
|
|
53
|
+
title: {
|
|
54
|
+
display: boolean;
|
|
55
|
+
text: string | undefined;
|
|
56
|
+
padding: {
|
|
57
|
+
bottom: number;
|
|
58
|
+
};
|
|
59
|
+
font: {
|
|
60
|
+
weight: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
ticks: {
|
|
64
|
+
maxTicksLimit: number;
|
|
65
|
+
};
|
|
66
|
+
grid: {
|
|
67
|
+
drawBorder: boolean;
|
|
68
|
+
};
|
|
69
|
+
id: string;
|
|
70
|
+
beginAtZero: boolean;
|
|
71
|
+
border: {
|
|
72
|
+
display: boolean;
|
|
73
|
+
};
|
|
74
|
+
stacked: boolean;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
responsive: boolean;
|
|
78
|
+
maintainAspectRatio: boolean;
|
|
79
|
+
plugins: {
|
|
80
|
+
htmlLegend: {
|
|
81
|
+
containerID: string;
|
|
82
|
+
};
|
|
83
|
+
legend: {
|
|
84
|
+
display: boolean;
|
|
85
|
+
};
|
|
86
|
+
streaming: boolean;
|
|
87
|
+
tooltip: {
|
|
88
|
+
external: (context: ExternalTooltipContext) => void;
|
|
89
|
+
enabled: boolean;
|
|
90
|
+
position: string;
|
|
91
|
+
};
|
|
92
|
+
thresholdPlugin: {
|
|
93
|
+
threshold: Record<"active_services" | "request_count" | "request_per_minute" | "response_latency_average" | "response_latency_p99" | "response_latency_p95" | "response_latency_p50" | "upstream_latency_p99" | "upstream_latency_p95" | "upstream_latency_p50" | "upstream_latency_average" | "kong_latency_p99" | "kong_latency_p95" | "kong_latency_p50" | "kong_latency_average" | "response_size_p99" | "response_size_p95" | "response_size_p50" | "response_size_average" | "response_size_sum" | "request_size_p99" | "request_size_p95" | "request_size_p50" | "request_size_average" | "request_size_sum", import("..").Threshold[]> | undefined;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
interaction: {
|
|
97
|
+
mode: string;
|
|
98
|
+
intersect: boolean;
|
|
99
|
+
};
|
|
100
|
+
layout: {
|
|
101
|
+
padding: {
|
|
102
|
+
left: number;
|
|
103
|
+
right: number;
|
|
104
|
+
top: number;
|
|
105
|
+
bottom: number;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
}>;
|
|
109
|
+
};
|
|
110
|
+
declare module 'chart.js' {
|
|
111
|
+
interface TooltipPositionerMap {
|
|
112
|
+
[key: string]: TooltipPositionerFunction<ChartType>;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=useLineChartOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLineChartOptions.d.ts","sourceRoot":"","sources":["../../../src/composables/useLineChartOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,yBAAyB,EACzB,SAAS,EAGV,MAAM,UAAU,CAAA;AAMjB,OAAO,KAAK,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAGxE,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,YAAY,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAgBlD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA8HA,sBAAsB;;;;;;;;;;;;;;;;;;;;;EAgCnD;AAED,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAU,oBAAoB;QAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,yBAAyB,CAAC,SAAS,CAAC,CAAA;KACpD;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
declare global {
|
|
3
|
+
interface Window {
|
|
4
|
+
_AnalyticsChartDataInternal?: Map<string, any>;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
declare const useReportChartDataForSynthetics: (chartData: Readonly<Ref<any>>, syntheticsDataKey: Readonly<Ref<string>>) => void;
|
|
8
|
+
export default useReportChartDataForSynthetics;
|
|
9
|
+
//# sourceMappingURL=useReportChartDataForSynthetics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useReportChartDataForSynthetics.d.ts","sourceRoot":"","sources":["../../../src/composables/useReportChartDataForSynthetics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAG9B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,2BAA2B,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAC/C;CACF;AAED,QAAA,MAAM,+BAA+B,GACnC,WAAW,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAC7B,mBAAmB,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,SA8BzC,CAAA;AAED,eAAe,+BAA+B,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import type { SparklineDataset, SparklineType } from '../types';
|
|
3
|
+
export default function useSparklineSync({ chartKey, datasets, groupKey, minStamp, maxStamp, minCount, maxCount, renderPoints, type, }: {
|
|
4
|
+
chartKey?: string;
|
|
5
|
+
datasets: SparklineDataset[];
|
|
6
|
+
groupKey?: string;
|
|
7
|
+
minStamp?: number;
|
|
8
|
+
maxStamp?: number;
|
|
9
|
+
minCount?: number;
|
|
10
|
+
maxCount?: number;
|
|
11
|
+
renderPoints?: number;
|
|
12
|
+
type: SparklineType;
|
|
13
|
+
}): {
|
|
14
|
+
syncedGroupSizeMs: Ref<number>;
|
|
15
|
+
syncedMinStamp: Ref<number>;
|
|
16
|
+
syncedMaxStamp: Ref<number>;
|
|
17
|
+
syncedMinCount: Ref<number>;
|
|
18
|
+
syncedMaxCount: Ref<number>;
|
|
19
|
+
syncedRenderPoints: Ref<number>;
|
|
20
|
+
syncedChartDatasets: Ref<Array<{
|
|
21
|
+
label: string;
|
|
22
|
+
data: Array<{
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
}>;
|
|
26
|
+
backgroundColor?: string;
|
|
27
|
+
fill?: boolean;
|
|
28
|
+
}>>;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=useSparklineSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSparklineSync.d.ts","sourceRoot":"","sources":["../../../src/composables/useSparklineSync.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,GAAG,EAAe,MAAM,KAAK,CAAA;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AA6D/D,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAoB,EACpB,QAAoB,EACpB,QAAoB,EACpB,QAAoB,EACpB,YAAwB,EACxB,IAAI,GACL,EAAE;IACD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,gBAAgB,EAAE,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,aAAa,CAAA;CACpB,GAAG;IACF,iBAAiB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC9B,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC/B,mBAAmB,EAAE,GAAG,CAAC,KAAK,CAAC;QAC7B,KAAK,EAAE,MAAM,CAAA;QACb,IAAI,EAAE,KAAK,CAAC;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;QACrC,eAAe,CAAC,EAAE,MAAM,CAAA;QACxB,IAAI,CAAC,EAAE,OAAO,CAAA;KACf,CAAC,CAAC,CAAA;CACJ,CA2KA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Ref, Reactive } from 'vue';
|
|
2
|
+
export default function useTooltipAbsolutePosition(chartParentRef: Ref<HTMLElement | null>, tooltipData: Reactive<{
|
|
3
|
+
left: string;
|
|
4
|
+
top: string;
|
|
5
|
+
}>): {
|
|
6
|
+
tooltipAbsoluteLeft: import("vue").ComputedRef<string>;
|
|
7
|
+
tooltipAbsoluteTop: import("vue").ComputedRef<string>;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useTooltipAbsolutePosition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTooltipAbsolutePosition.d.ts","sourceRoot":"","sources":["../../../src/composables/useTooltipAbsolutePosition.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAGxC,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,cAAc,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,WAAW,EAAE,QAAQ,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;;;EAkB/I"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTranslatedUnits.d.ts","sourceRoot":"","sources":["../../../src/composables/useTranslatedUnits.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,kBAAkB;0BAGX,MAAM,YAAY,MAAM;EAkBtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,6BAA6B,CAAA;AAC/D,eAAO,MAAM,mCAAmC,IAAI,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-legend-position.enum.d.ts","sourceRoot":"","sources":["../../../src/enums/chart-legend-position.enum.ts"],"names":[],"mappings":"AACA,oBAAY,mBAAmB;IAC7B,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import AnalyticsChart from './components/AnalyticsChart.vue';
|
|
2
|
+
import SimpleChart from './components/SimpleChart.vue';
|
|
3
|
+
import TopNTable from './components/TopNTable.vue';
|
|
4
|
+
import CsvExportModal from './components/CsvExportModal.vue';
|
|
5
|
+
import SparklineChart from './components/SparklineChart.vue';
|
|
6
|
+
export { AnalyticsChart, SimpleChart, TopNTable, CsvExportModal, SparklineChart };
|
|
7
|
+
export * from './types';
|
|
8
|
+
export * from './enums';
|
|
9
|
+
export * from './utils/colors';
|
|
10
|
+
export * from './utils/customColors';
|
|
11
|
+
export * from './utils/constants';
|
|
12
|
+
export * from './utils/queryError';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAA;AAC5D,OAAO,WAAW,MAAM,8BAA8B,CAAA;AACtD,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,cAAc,MAAM,iCAAiC,CAAA;AAC5D,OAAO,cAAc,MAAM,iCAAiC,CAAA;AAE5D,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA;AAEjF,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import type { ChartData, ChartDataset, LegendItem } from 'chart.js';
|
|
2
|
+
import type { ChartTooltipSortFn } from './chartjs-options';
|
|
3
|
+
import type { ChartType, SimpleChartType } from './chart-types';
|
|
4
|
+
import type { ExploreAggregations } from '@kong-ui-public/analytics-utilities';
|
|
5
|
+
export type Dataset = ChartDataset & {
|
|
6
|
+
rawDimension: string;
|
|
7
|
+
rawMetric?: string;
|
|
8
|
+
total?: number;
|
|
9
|
+
lineTension?: number;
|
|
10
|
+
fill?: boolean;
|
|
11
|
+
isThreshold?: boolean;
|
|
12
|
+
isSegmentEmpty?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export interface KChartData extends ChartData {
|
|
15
|
+
datasets: Dataset[];
|
|
16
|
+
labels?: string[];
|
|
17
|
+
isLabelEmpty?: boolean[];
|
|
18
|
+
isMultiDimension?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface AnalyticsDataPoint {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Dimension value to color hex code mapping
|
|
26
|
+
* for custom color palettes
|
|
27
|
+
*
|
|
28
|
+
* Use for deterministic dimension values for example
|
|
29
|
+
* graphing requests by status code over time, dimensions
|
|
30
|
+
* are known ahead of time they will be 2xx, 3xx, 4xx, 5xx
|
|
31
|
+
*/
|
|
32
|
+
export interface AnalyticsChartColors {
|
|
33
|
+
[dimensionValue: string]: string;
|
|
34
|
+
}
|
|
35
|
+
export interface LegendValueEntry {
|
|
36
|
+
raw: number;
|
|
37
|
+
formatted: string;
|
|
38
|
+
isThreshold?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Legend item with enhanced value
|
|
42
|
+
*/
|
|
43
|
+
export interface EnhancedLegendItem extends LegendItem {
|
|
44
|
+
value: LegendValueEntry;
|
|
45
|
+
text: string;
|
|
46
|
+
isSegmentEmpty?: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Chart dataset sort function
|
|
50
|
+
*/
|
|
51
|
+
export type ChartLegendSortFn = (a: EnhancedLegendItem, b: EnhancedLegendItem) => number;
|
|
52
|
+
export type ThresholdType = 'warning' | 'error' | 'neutral';
|
|
53
|
+
export interface Threshold {
|
|
54
|
+
type: ThresholdType;
|
|
55
|
+
value: number;
|
|
56
|
+
label?: string;
|
|
57
|
+
highlightIntersections?: boolean;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Analytics Chart options
|
|
61
|
+
*/
|
|
62
|
+
export interface AnalyticsChartOptions {
|
|
63
|
+
/**
|
|
64
|
+
* Chart type
|
|
65
|
+
*/
|
|
66
|
+
type: ChartType;
|
|
67
|
+
/**
|
|
68
|
+
* Are the datasets stacked or not.
|
|
69
|
+
* If stacked, the datasets are stacked on top of each other.
|
|
70
|
+
* Applies to timeseries charts as well as bar charts.
|
|
71
|
+
*/
|
|
72
|
+
stacked?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Title to display for the metric axis
|
|
75
|
+
* If not provided, show nothing
|
|
76
|
+
*/
|
|
77
|
+
metricAxesTitle?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Title to display for the dimension axis
|
|
80
|
+
* If not provided, show nothing
|
|
81
|
+
*/
|
|
82
|
+
dimensionAxesTitle?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Chart dataset color palette
|
|
85
|
+
*/
|
|
86
|
+
chartDatasetColors?: AnalyticsChartColors | string[];
|
|
87
|
+
/**
|
|
88
|
+
* Sort the datasets as they are displayed in the legend and tooltip
|
|
89
|
+
*/
|
|
90
|
+
chartLegendSortFn?: ChartLegendSortFn;
|
|
91
|
+
/**
|
|
92
|
+
* Sort tooltip entries
|
|
93
|
+
*/
|
|
94
|
+
chartTooltipSortFn?: ChartTooltipSortFn;
|
|
95
|
+
/**
|
|
96
|
+
* A static or dynamic metric threshold to be displayed on a timeseries chart
|
|
97
|
+
*/
|
|
98
|
+
threshold?: Record<ExploreAggregations, Threshold[]>;
|
|
99
|
+
/**
|
|
100
|
+
* Hide the truncation warning. Used if manually setting a limit
|
|
101
|
+
*/
|
|
102
|
+
hideTruncationWarning?: boolean;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Metric display for simple charts
|
|
106
|
+
*/
|
|
107
|
+
export declare const simpleChartMetricDisplay: readonly ["hidden", "single", "full"];
|
|
108
|
+
export type SimpleChartMetricDisplay = typeof simpleChartMetricDisplay[number];
|
|
109
|
+
export type AlignX = 'left' | 'center' | 'right' | 'between' | 'around' | 'evenly';
|
|
110
|
+
/**
|
|
111
|
+
* Simple Chart options
|
|
112
|
+
*/
|
|
113
|
+
export interface SimpleChartOptions {
|
|
114
|
+
/**
|
|
115
|
+
* Chart type
|
|
116
|
+
*/
|
|
117
|
+
type: SimpleChartType;
|
|
118
|
+
/**
|
|
119
|
+
* Chart dataset color palette
|
|
120
|
+
*/
|
|
121
|
+
chartDatasetColors?: AnalyticsChartColors | string[];
|
|
122
|
+
/**
|
|
123
|
+
* Determines how much detail about the metric (eg: value, info text, etc) is to be shown in the center
|
|
124
|
+
*/
|
|
125
|
+
metricDisplay?: SimpleChartMetricDisplay;
|
|
126
|
+
/**
|
|
127
|
+
* Determines whether the dataset order will be reversed
|
|
128
|
+
*/
|
|
129
|
+
reverseDataset?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Determines which dataset value will be display as large text
|
|
132
|
+
*/
|
|
133
|
+
numerator?: number;
|
|
134
|
+
/**
|
|
135
|
+
* Determines number of decimal points to display in SingleValue chart
|
|
136
|
+
*/
|
|
137
|
+
decimalPoints?: number;
|
|
138
|
+
/**
|
|
139
|
+
* Determines whether to show trend line in chart
|
|
140
|
+
*/
|
|
141
|
+
showTrend?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Determines whether increase is bad for trend line
|
|
144
|
+
*/
|
|
145
|
+
increaseIsBad?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Determines alignment of the chart
|
|
148
|
+
*/
|
|
149
|
+
alignX?: AlignX;
|
|
150
|
+
}
|
|
151
|
+
export interface LegendValues {
|
|
152
|
+
[label: string]: LegendValueEntry;
|
|
153
|
+
}
|
|
154
|
+
export interface DonutChartData {
|
|
155
|
+
labels: string[];
|
|
156
|
+
backgroundColor: string[];
|
|
157
|
+
borderColor: string[];
|
|
158
|
+
data: number[];
|
|
159
|
+
}
|
|
160
|
+
export interface DatasetLabel {
|
|
161
|
+
name: string;
|
|
162
|
+
id: string;
|
|
163
|
+
}
|
|
164
|
+
export interface TopNTableRecord {
|
|
165
|
+
id: string;
|
|
166
|
+
name: string;
|
|
167
|
+
deleted: boolean;
|
|
168
|
+
dimension: string;
|
|
169
|
+
}
|
|
170
|
+
export interface SparklineDataset {
|
|
171
|
+
color?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Must be unique for each dataset
|
|
174
|
+
*/
|
|
175
|
+
label: string;
|
|
176
|
+
timestamps: number[];
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=chart-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-data.d.ts","sourceRoot":"","sources":["../../../src/types/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AAA;IACrB;;OAEG;IACH,kBAAkB,CAAC,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAAA;IACpD;;OAEG;IACH,aAAa,CAAC,EAAE,wBAAwB,CAAA;IACxC;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAAA;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,IAAI,EAAE,MAAM,EAAE,CAAA;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,EAAE,CAAA;CACrB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface CsvKeyValuePair {
|
|
2
|
+
[key: string]: string;
|
|
3
|
+
}
|
|
4
|
+
export declare enum ValidType {
|
|
5
|
+
String = "string",
|
|
6
|
+
Number = "number",
|
|
7
|
+
Boolean = "boolean",
|
|
8
|
+
Object = "object",
|
|
9
|
+
Undefined = "undefined"
|
|
10
|
+
}
|
|
11
|
+
export interface Header {
|
|
12
|
+
label: string;
|
|
13
|
+
key: string;
|
|
14
|
+
}
|
|
15
|
+
export interface TimeseriesColumn {
|
|
16
|
+
label: string;
|
|
17
|
+
key: string;
|
|
18
|
+
}
|
|
19
|
+
export type CsvData = CsvKeyValuePair[];
|
|
20
|
+
//# sourceMappingURL=chart-export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-export.d.ts","sourceRoot":"","sources":["../../../src/types/chart-export.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB;AAED,oBAAY,SAAS;IACnB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,OAAO,GAAG,eAAe,EAAE,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const chartTypes: readonly ["donut", "horizontal_bar", "vertical_bar", "timeseries_line", "timeseries_bar"];
|
|
2
|
+
export type ChartType = typeof chartTypes[number];
|
|
3
|
+
export declare const simpleChartTypes: readonly ["gauge", "top_n", "single_value"];
|
|
4
|
+
export type SimpleChartType = typeof simpleChartTypes[number];
|
|
5
|
+
export type SparklineType = 'sparkline_bar' | 'sparkline_line' | 'sparkline_step';
|
|
6
|
+
//# sourceMappingURL=chart-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-types.d.ts","sourceRoot":"","sources":["../../../src/types/chart-types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,2FAMb,CAAA;AAEV,MAAM,MAAM,SAAS,GAAG,OAAO,UAAU,CAAC,MAAM,CAAC,CAAA;AAEjD,eAAO,MAAM,gBAAgB,6CAInB,CAAA;AAEV,MAAM,MAAM,eAAe,GAAG,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAA;AAE7D,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Ref, ComputedRef } from 'vue';
|
|
2
|
+
import type { Chart, ChartType as ChartJsChartType, TooltipModel, Color } from 'chart.js';
|
|
3
|
+
import type { ChartType } from './chart-types';
|
|
4
|
+
import type { ExploreAggregations, GranularityValues } from '@kong-ui-public/analytics-utilities';
|
|
5
|
+
import type { Threshold } from './chart-data';
|
|
6
|
+
export interface TooltipEntry {
|
|
7
|
+
backgroundColor: Color;
|
|
8
|
+
borderColor: Color;
|
|
9
|
+
label: string;
|
|
10
|
+
value: string | number;
|
|
11
|
+
rawValue: number;
|
|
12
|
+
isSegmentEmpty?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export type ChartTooltipSortFn = (a: TooltipEntry, b: TooltipEntry) => number;
|
|
15
|
+
export type TooltipInteractionMode = 'idle' | 'interactive' | 'zoom-interactive' | 'selecting-chart-area';
|
|
16
|
+
export interface TooltipState {
|
|
17
|
+
showTooltip: boolean;
|
|
18
|
+
tooltipContext: string | number;
|
|
19
|
+
tooltipSeries: TooltipEntry[];
|
|
20
|
+
left: string;
|
|
21
|
+
top: string;
|
|
22
|
+
units: string;
|
|
23
|
+
translateUnit: (unit: string, value: number) => string;
|
|
24
|
+
offsetX: number;
|
|
25
|
+
offsetY: number;
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
chartType: ChartType;
|
|
29
|
+
chartID: string;
|
|
30
|
+
chartTooltipSortFn?: ChartTooltipSortFn;
|
|
31
|
+
interactionMode: TooltipInteractionMode;
|
|
32
|
+
metricDisplay: string;
|
|
33
|
+
dimensionDisplay?: string;
|
|
34
|
+
}
|
|
35
|
+
interface BaseChartOptions {
|
|
36
|
+
tooltipState: TooltipState;
|
|
37
|
+
legendID: string;
|
|
38
|
+
stacked: Ref<boolean>;
|
|
39
|
+
metricAxesTitle?: Ref<string | undefined>;
|
|
40
|
+
dimensionAxesTitle?: Ref<string | undefined>;
|
|
41
|
+
}
|
|
42
|
+
export interface BarChartOptions extends BaseChartOptions {
|
|
43
|
+
indexAxis: 'x' | 'y';
|
|
44
|
+
numLabels: Ref<number>;
|
|
45
|
+
}
|
|
46
|
+
export interface LineChartOptions extends BaseChartOptions {
|
|
47
|
+
timeRangeMs: Ref<number | undefined>;
|
|
48
|
+
granularity: Ref<GranularityValues>;
|
|
49
|
+
pointsWithoutHover?: ComputedRef<boolean | undefined>;
|
|
50
|
+
threshold?: Readonly<Ref<Record<ExploreAggregations, Threshold[]> | undefined>>;
|
|
51
|
+
}
|
|
52
|
+
export interface DonutChartOptions {
|
|
53
|
+
tooltipState: TooltipState;
|
|
54
|
+
legendID: string;
|
|
55
|
+
}
|
|
56
|
+
export interface AxesTooltipState {
|
|
57
|
+
show: boolean;
|
|
58
|
+
left: string;
|
|
59
|
+
top: string;
|
|
60
|
+
text: string;
|
|
61
|
+
offset: number;
|
|
62
|
+
}
|
|
63
|
+
export interface ExternalTooltipContext {
|
|
64
|
+
chart: Chart;
|
|
65
|
+
tooltip: TooltipModel<ChartJsChartType>;
|
|
66
|
+
}
|
|
67
|
+
export {};
|
|
68
|
+
//# sourceMappingURL=chartjs-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chartjs-options.d.ts","sourceRoot":"","sources":["../../../src/types/chartjs-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,KAAK,CAAA;AAC3C,OA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CACxC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AnalyticsChartColors, DatasetLabel } from '../types';
|
|
2
|
+
export interface BarChartDatasetGenerationParams {
|
|
3
|
+
metricNames: string[];
|
|
4
|
+
dimensionFieldNames: string[];
|
|
5
|
+
barSegmentLabels: DatasetLabel[];
|
|
6
|
+
pivotRecords: {
|
|
7
|
+
[k: string]: string | number | null | undefined;
|
|
8
|
+
};
|
|
9
|
+
rowLabels: DatasetLabel[];
|
|
10
|
+
colorPalette: string[] | AnalyticsChartColors;
|
|
11
|
+
isMultiMetric?: boolean;
|
|
12
|
+
hasDimensions?: boolean;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=dataset-generation-types.d.ts.map
|