@kong-ui-public/analytics-chart 10.34.3-pr.3869.e876c8c8a.0 → 10.34.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/dist/style.css +1 -0
  2. package/dist/types/components/AnalyticsChart.vue.d.ts +41 -0
  3. package/dist/types/components/AnalyticsChart.vue.d.ts.map +1 -0
  4. package/dist/types/components/CsvExportModal.vue.d.ts +16 -0
  5. package/dist/types/components/CsvExportModal.vue.d.ts.map +1 -0
  6. package/dist/types/components/DownloadCsv.vue.d.ts +20 -0
  7. package/dist/types/components/DownloadCsv.vue.d.ts.map +1 -0
  8. package/dist/types/components/SimpleChart.vue.d.ts +74 -0
  9. package/dist/types/components/SimpleChart.vue.d.ts.map +1 -0
  10. package/dist/types/components/SparklineChart.vue.d.ts +95 -0
  11. package/dist/types/components/SparklineChart.vue.d.ts.map +1 -0
  12. package/dist/types/components/TopNTable.vue.d.ts +59 -0
  13. package/dist/types/components/TopNTable.vue.d.ts.map +1 -0
  14. package/dist/types/components/ZoomActions.vue.d.ts +15 -0
  15. package/dist/types/components/ZoomActions.vue.d.ts.map +1 -0
  16. package/dist/types/components/ZoomTimerange.vue.d.ts +10 -0
  17. package/dist/types/components/ZoomTimerange.vue.d.ts.map +1 -0
  18. package/dist/types/components/chart-plugins/ChartLegend.vue.d.ts +36 -0
  19. package/dist/types/components/chart-plugins/ChartLegend.vue.d.ts.map +1 -0
  20. package/dist/types/components/chart-plugins/ChartTooltip.vue.d.ts +34 -0
  21. package/dist/types/components/chart-plugins/ChartTooltip.vue.d.ts.map +1 -0
  22. package/dist/types/components/chart-plugins/DragSelectPlugin.d.ts +22 -0
  23. package/dist/types/components/chart-plugins/DragSelectPlugin.d.ts.map +1 -0
  24. package/dist/types/components/chart-plugins/HighlightPlugin.d.ts +18 -0
  25. package/dist/types/components/chart-plugins/HighlightPlugin.d.ts.map +1 -0
  26. package/dist/types/components/chart-plugins/OutlierBandPlugin.d.ts +14 -0
  27. package/dist/types/components/chart-plugins/OutlierBandPlugin.d.ts.map +1 -0
  28. package/dist/types/components/chart-plugins/ReferenceLinePlugin.d.ts +12 -0
  29. package/dist/types/components/chart-plugins/ReferenceLinePlugin.d.ts.map +1 -0
  30. package/dist/types/components/chart-plugins/ThresholdPlugin.d.ts +33 -0
  31. package/dist/types/components/chart-plugins/ThresholdPlugin.d.ts.map +1 -0
  32. package/dist/types/components/chart-plugins/VerticalLinePlugin.d.ts +29 -0
  33. package/dist/types/components/chart-plugins/VerticalLinePlugin.d.ts.map +1 -0
  34. package/dist/types/components/chart-types/DonutChart.vue.d.ts +30 -0
  35. package/dist/types/components/chart-types/DonutChart.vue.d.ts.map +1 -0
  36. package/dist/types/components/chart-types/GaugeChart.vue.d.ts +92 -0
  37. package/dist/types/components/chart-types/GaugeChart.vue.d.ts.map +1 -0
  38. package/dist/types/components/chart-types/ScatterChart.vue.d.ts +40 -0
  39. package/dist/types/components/chart-types/ScatterChart.vue.d.ts.map +1 -0
  40. package/dist/types/components/chart-types/SingleValue.vue.d.ts +69 -0
  41. package/dist/types/components/chart-types/SingleValue.vue.d.ts.map +1 -0
  42. package/dist/types/components/chart-types/StackedBarChart.vue.d.ts +33 -0
  43. package/dist/types/components/chart-types/StackedBarChart.vue.d.ts.map +1 -0
  44. package/dist/types/components/chart-types/TimeSeriesChart.vue.d.ts +52 -0
  45. package/dist/types/components/chart-types/TimeSeriesChart.vue.d.ts.map +1 -0
  46. package/dist/types/components/top-n/TopNMetricBar.vue.d.ts +9 -0
  47. package/dist/types/components/top-n/TopNMetricBar.vue.d.ts.map +1 -0
  48. package/dist/types/components/top-n/TopNMetricCell.vue.d.ts +11 -0
  49. package/dist/types/components/top-n/TopNMetricCell.vue.d.ts.map +1 -0
  50. package/dist/types/components/vue-json-csv/VueJsonCsv.vue.d.ts +166 -0
  51. package/dist/types/components/vue-json-csv/VueJsonCsv.vue.d.ts.map +1 -0
  52. package/dist/types/composables/index.d.ts +35 -0
  53. package/dist/types/composables/index.d.ts.map +1 -0
  54. package/dist/types/composables/useBarChartOptions.d.ts +118 -0
  55. package/dist/types/composables/useBarChartOptions.d.ts.map +1 -0
  56. package/dist/types/composables/useChartJSCommon.d.ts +5 -0
  57. package/dist/types/composables/useChartJSCommon.d.ts.map +1 -0
  58. package/dist/types/composables/useChartLegendValues.d.ts +6 -0
  59. package/dist/types/composables/useChartLegendValues.d.ts.map +1 -0
  60. package/dist/types/composables/useChartSelectedRange.d.ts +4 -0
  61. package/dist/types/composables/useChartSelectedRange.d.ts.map +1 -0
  62. package/dist/types/composables/useDonutChartOptions.d.ts +42 -0
  63. package/dist/types/composables/useDonutChartOptions.d.ts.map +1 -0
  64. package/dist/types/composables/useEvaluateFeatureFlag.d.ts +4 -0
  65. package/dist/types/composables/useEvaluateFeatureFlag.d.ts.map +1 -0
  66. package/dist/types/composables/useExploreResultToDatasets.d.ts +5 -0
  67. package/dist/types/composables/useExploreResultToDatasets.d.ts.map +1 -0
  68. package/dist/types/composables/useExploreResultToTimeDatasets.d.ts +6 -0
  69. package/dist/types/composables/useExploreResultToTimeDatasets.d.ts.map +1 -0
  70. package/dist/types/composables/useI18n.d.ts +9 -0
  71. package/dist/types/composables/useI18n.d.ts.map +1 -0
  72. package/dist/types/composables/useLineChartOptions.d.ts +115 -0
  73. package/dist/types/composables/useLineChartOptions.d.ts.map +1 -0
  74. package/dist/types/composables/useReportChartDataForSynthetics.d.ts +9 -0
  75. package/dist/types/composables/useReportChartDataForSynthetics.d.ts.map +1 -0
  76. package/dist/types/composables/useScatterChartOptions.d.ts +139 -0
  77. package/dist/types/composables/useScatterChartOptions.d.ts.map +1 -0
  78. package/dist/types/composables/useScatterDatasets.d.ts +18 -0
  79. package/dist/types/composables/useScatterDatasets.d.ts.map +1 -0
  80. package/dist/types/composables/useSparklineSync.d.ts +30 -0
  81. package/dist/types/composables/useSparklineSync.d.ts.map +1 -0
  82. package/dist/types/composables/useTooltipAbsolutePosition.d.ts +9 -0
  83. package/dist/types/composables/useTooltipAbsolutePosition.d.ts.map +1 -0
  84. package/dist/types/composables/useTranslatedUnits.d.ts +4 -0
  85. package/dist/types/composables/useTranslatedUnits.d.ts.map +1 -0
  86. package/dist/types/constants/index.d.ts +4 -0
  87. package/dist/types/constants/index.d.ts.map +1 -0
  88. package/dist/types/enums/chart-legend-position.enum.d.ts +5 -0
  89. package/dist/types/enums/chart-legend-position.enum.d.ts.map +1 -0
  90. package/dist/types/enums/index.d.ts +2 -0
  91. package/dist/types/enums/index.d.ts.map +1 -0
  92. package/dist/types/index.d.ts +19 -0
  93. package/dist/types/index.d.ts.map +1 -0
  94. package/dist/types/types/chart-data.d.ts +279 -0
  95. package/dist/types/types/chart-data.d.ts.map +1 -0
  96. package/dist/types/types/chart-export.d.ts +20 -0
  97. package/dist/types/types/chart-export.d.ts.map +1 -0
  98. package/dist/types/types/chart-meta.d.ts +6 -0
  99. package/dist/types/types/chart-meta.d.ts.map +1 -0
  100. package/dist/types/types/chart-types.d.ts +6 -0
  101. package/dist/types/types/chart-types.d.ts.map +1 -0
  102. package/dist/types/types/chartjs-options.d.ts +84 -0
  103. package/dist/types/types/chartjs-options.d.ts.map +1 -0
  104. package/dist/types/types/dataset-generation-types.d.ts +15 -0
  105. package/dist/types/types/dataset-generation-types.d.ts.map +1 -0
  106. package/dist/types/types/explore-to-dataset-deps.d.ts +18 -0
  107. package/dist/types/types/explore-to-dataset-deps.d.ts.map +1 -0
  108. package/dist/types/types/external-link.d.ts +4 -0
  109. package/dist/types/types/external-link.d.ts.map +1 -0
  110. package/dist/types/types/index.d.ts +12 -0
  111. package/dist/types/types/index.d.ts.map +1 -0
  112. package/dist/types/types/query-error.d.ts +7 -0
  113. package/dist/types/types/query-error.d.ts.map +1 -0
  114. package/dist/types/types/scatter-data.d.ts +38 -0
  115. package/dist/types/types/scatter-data.d.ts.map +1 -0
  116. package/dist/types/types/zoom-action-item.d.ts +9 -0
  117. package/dist/types/types/zoom-action-item.d.ts.map +1 -0
  118. package/dist/types/utils/bucketTimestamps.d.ts +8 -0
  119. package/dist/types/utils/bucketTimestamps.d.ts.map +1 -0
  120. package/dist/types/utils/colors.d.ts +8 -0
  121. package/dist/types/utils/colors.d.ts.map +1 -0
  122. package/dist/types/utils/commonOptions.d.ts +22 -0
  123. package/dist/types/utils/commonOptions.d.ts.map +1 -0
  124. package/dist/types/utils/constants.d.ts +5 -0
  125. package/dist/types/utils/constants.d.ts.map +1 -0
  126. package/dist/types/utils/customColors.d.ts +8 -0
  127. package/dist/types/utils/customColors.d.ts.map +1 -0
  128. package/dist/types/utils/defaultLineOptions.d.ts +9 -0
  129. package/dist/types/utils/defaultLineOptions.d.ts.map +1 -0
  130. package/dist/types/utils/dimension-icons.d.ts +5 -0
  131. package/dist/types/utils/dimension-icons.d.ts.map +1 -0
  132. package/dist/types/utils/format-timestamps.d.ts +13 -0
  133. package/dist/types/utils/format-timestamps.d.ts.map +1 -0
  134. package/dist/types/utils/i18n.d.ts +3 -0
  135. package/dist/types/utils/i18n.d.ts.map +1 -0
  136. package/dist/types/utils/index.d.ts +14 -0
  137. package/dist/types/utils/index.d.ts.map +1 -0
  138. package/dist/types/utils/metric-units.d.ts +3 -0
  139. package/dist/types/utils/metric-units.d.ts.map +1 -0
  140. package/dist/types/utils/percentiles.d.ts +3 -0
  141. package/dist/types/utils/percentiles.d.ts.map +1 -0
  142. package/dist/types/utils/queryError.d.ts +4 -0
  143. package/dist/types/utils/queryError.d.ts.map +1 -0
  144. package/dist/types/utils/scatter-adapters.d.ts +25 -0
  145. package/dist/types/utils/scatter-adapters.d.ts.map +1 -0
  146. package/dist/types/utils/stackedBarUtil.d.ts +9 -0
  147. package/dist/types/utils/stackedBarUtil.d.ts.map +1 -0
  148. package/dist/types/utils/theme-colors.d.ts +8 -0
  149. package/dist/types/utils/theme-colors.d.ts.map +1 -0
  150. package/dist/types/utils/topn-columns.d.ts +16 -0
  151. package/dist/types/utils/topn-columns.d.ts.map +1 -0
  152. package/dist/vitals-chart.es.js +26658 -0
  153. package/dist/vitals-chart.umd.js +36 -0
  154. package/package.json +2 -2
@@ -0,0 +1,4 @@
1
+ export declare const INJECT_QUERY_PROVIDER = "analytics-query-provider";
2
+ export declare const INJECT_DASHBOARD_COORDINATION_STORE = "analytics-dashboard-coordination-store";
3
+ export declare const SINGLE_VALUE_DEFAULT_DECIMAL_POINTS = 2;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -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,2CAA2C,CAAA;AAC3F,eAAO,MAAM,mCAAmC,IAAI,CAAA"}
@@ -0,0 +1,5 @@
1
+ export declare enum ChartLegendPosition {
2
+ Hidden = "hidden",
3
+ Bottom = "bottom"
4
+ }
5
+ //# sourceMappingURL=chart-legend-position.enum.d.ts.map
@@ -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,2 @@
1
+ export * from './chart-legend-position.enum';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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,19 @@
1
+ import AnalyticsChart from './components/AnalyticsChart.vue';
2
+ import SimpleChart from './components/SimpleChart.vue';
3
+ import TopNTable from './components/TopNTable.vue';
4
+ import SparklineChart from './components/SparklineChart.vue';
5
+ export { AnalyticsChart, SimpleChart, TopNTable, SparklineChart };
6
+ /**
7
+ * @deprecated Import CsvExportModal from '@kong-ui-public/dashboard-renderer' instead.
8
+ * TODO: Remove this deprecated analytics-chart export after consumers migrate to
9
+ * @kong-ui-public/dashboard-renderer. MA-5236: https://konghq.atlassian.net/browse/MA-5236
10
+ */
11
+ export { default as CsvExportModal } from './components/CsvExportModal.vue';
12
+ export * from './types';
13
+ export * from './enums';
14
+ export { statusCodeBadgeBackgroundColor } from './utils/colors';
15
+ export { lookupStatusCodeColor } from './utils/customColors';
16
+ export * from './utils/constants';
17
+ export * from './utils/queryError';
18
+ export * from './utils/scatter-adapters';
19
+ //# 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;AAE5D,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,CAAA;AAEjE;;;;GAIG;AACH,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAE3E,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAA;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA"}
@@ -0,0 +1,279 @@
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
+ import type { ScatterPointExtra } from './scatter-data';
6
+ export type Dataset = ChartDataset & {
7
+ rawDimension: string;
8
+ rawMetric?: string;
9
+ total?: number;
10
+ lineTension?: number;
11
+ fill?: boolean;
12
+ isThreshold?: boolean;
13
+ isSegmentEmpty?: boolean;
14
+ };
15
+ export interface KChartData extends ChartData {
16
+ datasets: Dataset[];
17
+ labels?: string[];
18
+ isLabelEmpty?: boolean[];
19
+ isMultiDimension?: boolean;
20
+ outlier?: ScatterOutlier;
21
+ referenceLines?: ResolvedReferenceLine[];
22
+ }
23
+ export interface AnalyticsDataPoint {
24
+ x: number;
25
+ y: number;
26
+ }
27
+ /**
28
+ * A label for the chart tooltip instead of using the dataset's label.
29
+ * Scatter plots need this for outliers as they would show the "Outlier..." label
30
+ */
31
+ export interface LabeledDataPoint extends AnalyticsDataPoint {
32
+ tooltipLabel?: string;
33
+ extras?: ScatterPointExtra[];
34
+ }
35
+ /**
36
+ * Dimension value to color hex code mapping
37
+ * for custom color palettes
38
+ *
39
+ * Use for deterministic dimension values for example
40
+ * graphing requests by status code over time, dimensions
41
+ * are known ahead of time they will be 2xx, 3xx, 4xx, 5xx
42
+ */
43
+ export interface AnalyticsChartColors {
44
+ [dimensionValue: string]: string;
45
+ }
46
+ export interface LegendValueEntry {
47
+ raw: number;
48
+ formatted: string;
49
+ isThreshold?: boolean;
50
+ }
51
+ /**
52
+ * Legend item with enhanced value
53
+ */
54
+ export interface EnhancedLegendItem extends LegendItem {
55
+ value: LegendValueEntry;
56
+ text: string;
57
+ isSegmentEmpty?: boolean;
58
+ /**
59
+ * A key is not tied to a specific dataset, only used for extra things in a chart like
60
+ * outliers, thresholds, etc. They also don't toggle anything and always show their value.
61
+ */
62
+ isKey?: boolean;
63
+ }
64
+ /**
65
+ * Chart dataset sort function
66
+ */
67
+ export type ChartLegendSortFn = (a: EnhancedLegendItem, b: EnhancedLegendItem) => number;
68
+ export type ThresholdType = 'warning' | 'error' | 'neutral';
69
+ export interface Threshold {
70
+ type: ThresholdType;
71
+ value: number;
72
+ label?: string;
73
+ highlightIntersections?: boolean;
74
+ }
75
+ /**
76
+ * A horizontal reference line drawn at a percentile of the plotted y-values.
77
+ */
78
+ export interface ScatterPercentileLine {
79
+ /**
80
+ * Percentile to draw, 0 to 100.
81
+ */
82
+ percentile: number;
83
+ /**
84
+ * Overrides the default label.
85
+ */
86
+ label?: string;
87
+ /**
88
+ * Dash pattern for the line, defaults to a dashed [6, 4] for the median and a
89
+ * dotted [2, 3] for anything else.
90
+ */
91
+ borderDash?: number[];
92
+ /**
93
+ * Line color, defaults to neutral text for the median, danger for anything above it.
94
+ */
95
+ color?: string;
96
+ }
97
+ export interface ResolvedReferenceLine {
98
+ percentile: number;
99
+ label: string;
100
+ value: number;
101
+ color: string;
102
+ borderDash: number[];
103
+ }
104
+ export interface ScatterOutlier {
105
+ value: number;
106
+ /**
107
+ * Legend key text, e.g. "Outlier (> p95)".
108
+ */
109
+ label: string;
110
+ color: string;
111
+ }
112
+ export interface ScatterOptions {
113
+ /**
114
+ * Reference lines derived from the plotted y-values, defaults to none.
115
+ */
116
+ percentileLines?: ScatterPercentileLine[];
117
+ /**
118
+ * Percentile above which points are colored as outliers, defaults to undefined
119
+ */
120
+ outlierPercentile?: number;
121
+ /**
122
+ * Shade the chart region above `outlierPercentile`, defaults to false.
123
+ */
124
+ shadeOutlierRegion?: boolean;
125
+ /**
126
+ * Maximum horizontal jitter, applied to points so that records sharing a timestamp
127
+ * don't stack into a single column, defaults to 0 (no jitter).
128
+ */
129
+ jitterMs?: number;
130
+ /**
131
+ * Radius of each plotted point, defaults to 2.
132
+ */
133
+ pointRadius?: number;
134
+ /**
135
+ * Opacity of the plotted points between 0 and 1, defaults to 0.6
136
+ * Doesn't apply to outlier points
137
+ */
138
+ pointOpacity?: number;
139
+ }
140
+ /**
141
+ * Analytics Chart options
142
+ */
143
+ export interface AnalyticsChartOptions {
144
+ /**
145
+ * Chart type
146
+ */
147
+ type: ChartType;
148
+ /**
149
+ * Are the datasets stacked or not.
150
+ * If stacked, the datasets are stacked on top of each other.
151
+ * Applies to timeseries charts as well as bar charts.
152
+ */
153
+ stacked?: boolean;
154
+ /**
155
+ * Title to display for the metric axis
156
+ * If not provided, show nothing
157
+ */
158
+ metricAxesTitle?: string;
159
+ /**
160
+ * Title to display for the dimension axis
161
+ * If not provided, show nothing
162
+ */
163
+ dimensionAxesTitle?: string;
164
+ /**
165
+ * Chart dataset color palette
166
+ */
167
+ chartDatasetColors?: AnalyticsChartColors | string[];
168
+ /**
169
+ * Sort the datasets as they are displayed in the legend and tooltip
170
+ */
171
+ chartLegendSortFn?: ChartLegendSortFn;
172
+ /**
173
+ * Sort tooltip entries
174
+ */
175
+ chartTooltipSortFn?: ChartTooltipSortFn;
176
+ /**
177
+ * A static or dynamic metric threshold to be displayed on a timeseries chart
178
+ */
179
+ threshold?: Record<ExploreAggregations, Threshold[]>;
180
+ /**
181
+ * Hide the truncation warning. Used if manually setting a limit
182
+ */
183
+ hideTruncationWarning?: boolean;
184
+ /**
185
+ * Show a total metric value in the center of the donut chart.
186
+ * Only applies when type is 'donut'.
187
+ */
188
+ showCenterMetric?: boolean;
189
+ /**
190
+ * Scatter plot options, only applies when type is 'scatter'.
191
+ */
192
+ scatter?: ScatterOptions;
193
+ }
194
+ /**
195
+ * Metric display for simple charts
196
+ */
197
+ export declare const simpleChartMetricDisplay: readonly ["hidden", "single", "full"];
198
+ export type SimpleChartMetricDisplay = typeof simpleChartMetricDisplay[number];
199
+ export type AlignX = 'left' | 'center' | 'right' | 'between' | 'around' | 'evenly';
200
+ /**
201
+ * Simple Chart options
202
+ */
203
+ export interface SimpleChartOptions {
204
+ /**
205
+ * Chart type
206
+ */
207
+ type: SimpleChartType;
208
+ /**
209
+ * Chart dataset color palette
210
+ */
211
+ chartDatasetColors?: AnalyticsChartColors | string[];
212
+ /**
213
+ * Determines how much detail about the metric (eg: value, info text, etc) is to be shown in the center
214
+ */
215
+ metricDisplay?: SimpleChartMetricDisplay;
216
+ /**
217
+ * Determines whether the dataset order will be reversed
218
+ */
219
+ reverseDataset?: boolean;
220
+ /**
221
+ * Determines which dataset value will be display as large text
222
+ */
223
+ numerator?: number;
224
+ /**
225
+ * Determines number of decimal points to display in SingleValue chart
226
+ */
227
+ decimalPoints?: number;
228
+ /**
229
+ * Determines whether to show trend line in chart
230
+ */
231
+ showTrend?: boolean;
232
+ /**
233
+ * Determines whether increase is bad for trend line
234
+ */
235
+ increaseIsBad?: boolean;
236
+ /**
237
+ * Determines alignment of the chart
238
+ */
239
+ alignX?: AlignX;
240
+ }
241
+ export interface LegendValues {
242
+ [label: string]: LegendValueEntry;
243
+ }
244
+ export interface DonutChartData {
245
+ labels: string[];
246
+ backgroundColor: string[];
247
+ borderColor: string;
248
+ borderWidth: number;
249
+ hoverBorderColor: string[];
250
+ hoverBorderWidth: number;
251
+ data: number[];
252
+ hoverOffset: number;
253
+ }
254
+ export interface DatasetLabel {
255
+ name: string;
256
+ id: string;
257
+ }
258
+ export interface TopNTableRecord {
259
+ id: string;
260
+ name: string;
261
+ deleted: boolean;
262
+ dimension: string;
263
+ dimensions?: Array<{
264
+ dimension: string;
265
+ id: string;
266
+ name: string;
267
+ deleted: boolean;
268
+ }>;
269
+ isEmpty?: boolean;
270
+ }
271
+ export interface SparklineDataset {
272
+ color?: string;
273
+ /**
274
+ * Must be unique for each dataset
275
+ */
276
+ label: string;
277
+ timestamps: number[];
278
+ }
279
+ //# sourceMappingURL=chart-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart-data.d.ts","sourceRoot":"","sources":["../../../src/types/chart-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;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AAM,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,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,gBAAgB,EAAE,MAAM,CAAA;IACxB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;CACpB;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;IACjB,UAAU,CAAC,EAAE,KAAK,CAAC;QACjB,SAAS,EAAE,MAAM,CAAA;QACjB,EAAE,EAAE,MAAM,CAAA;QACV,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,OAAO,CAAA;KACjB,CAAC,CAAA;IACF,OAAO,CAAC,EAAE,OAAO,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":"AACA,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
+ import type { ResultMetaBase } from '@kong-ui-public/analytics-utilities';
2
+ export type SharedMeta = Partial<ResultMetaBase> & {
3
+ metricNames?: string[];
4
+ metricUnits?: Record<string, string | undefined>;
5
+ };
6
+ //# sourceMappingURL=chart-meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart-meta.d.ts","sourceRoot":"","sources":["../../../src/types/chart-meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAEzE,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC,GAAG;IACjD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;CACjD,CAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const chartTypes: readonly ["donut", "horizontal_bar", "vertical_bar", "timeseries_line", "timeseries_bar", "scatter"];
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,sGAOb,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,84 @@
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 { ResolvedReferenceLine, Threshold } from './chart-data';
6
+ import type { ScatterChartColors } from '../utils/theme-colors';
7
+ export interface TooltipEntry {
8
+ backgroundColor: Color;
9
+ borderColor: Color;
10
+ label: string;
11
+ value: string | number;
12
+ rawValue: number;
13
+ isSegmentEmpty?: boolean;
14
+ isExtra?: boolean;
15
+ }
16
+ export type ChartTooltipSortFn = (a: TooltipEntry, b: TooltipEntry) => number;
17
+ export type TooltipInteractionMode = 'idle' | 'interactive' | 'zoom-interactive' | 'selecting-chart-area';
18
+ export interface TooltipState {
19
+ showTooltip: boolean;
20
+ tooltipContext: string | number;
21
+ tooltipSeries: TooltipEntry[];
22
+ left: string;
23
+ top: string;
24
+ units: string;
25
+ translateUnit: (unit: string, value: number) => string;
26
+ offsetX: number;
27
+ offsetY: number;
28
+ width: number;
29
+ height: number;
30
+ chartType: ChartType;
31
+ chartID: string;
32
+ chartTooltipSortFn?: ChartTooltipSortFn;
33
+ interactionMode: TooltipInteractionMode;
34
+ metricDisplay: string;
35
+ dimensionDisplay?: string;
36
+ }
37
+ interface BaseChartOptions {
38
+ tooltipState: TooltipState;
39
+ legendID: string;
40
+ stacked: Ref<boolean>;
41
+ metricAxesTitle?: Ref<string | undefined>;
42
+ dimensionAxesTitle?: Ref<string | undefined>;
43
+ }
44
+ export interface BarChartOptions extends BaseChartOptions {
45
+ indexAxis: 'x' | 'y';
46
+ numLabels: Ref<number>;
47
+ }
48
+ export interface LineChartOptions extends BaseChartOptions {
49
+ timeRangeMs: Ref<number | undefined>;
50
+ granularity: Ref<GranularityValues>;
51
+ pointsWithoutHover?: ComputedRef<boolean | undefined>;
52
+ threshold?: Readonly<Ref<Record<ExploreAggregations, Threshold[]> | undefined>>;
53
+ }
54
+ export interface ScatterChartOptions {
55
+ tooltipState: TooltipState;
56
+ legendID: string;
57
+ granularity: Ref<GranularityValues>;
58
+ timeRangeMs: Ref<number | undefined>;
59
+ metricAxesTitle?: Ref<string | undefined>;
60
+ dimensionAxesTitle?: Ref<string | undefined>;
61
+ metricUnit?: Ref<string | undefined>;
62
+ xMetric?: Ref<string | undefined>;
63
+ xMetricUnit?: Ref<string | undefined>;
64
+ outlierValue?: Ref<number | undefined>;
65
+ referenceLines?: Ref<ResolvedReferenceLine[]>;
66
+ themeColors: Ref<ScatterChartColors>;
67
+ }
68
+ export interface DonutChartOptions {
69
+ tooltipState: TooltipState;
70
+ legendID: string;
71
+ }
72
+ export interface AxesTooltipState {
73
+ show: boolean;
74
+ left: string;
75
+ top: string;
76
+ text: string;
77
+ offset: number;
78
+ }
79
+ export interface ExternalTooltipContext {
80
+ chart: Chart;
81
+ tooltip: TooltipModel<ChartJsChartType>;
82
+ }
83
+ export {};
84
+ //# 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,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,IAAI,gBAAgB,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AACzF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AACjG,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAE/D,MAAM,WAAW,YAAY;IAC3B,eAAe,EAAE,KAAK,CAAA;IACtB,WAAW,EAAE,KAAK,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,YAAY,KAAK,MAAM,CAAA;AAC7E,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,aAAa,GAAG,kBAAkB,GAAG,sBAAsB,CAAA;AAEzG,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B,aAAa,EAAE,YAAY,EAAE,CA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S,CAAC,CAAC,CAAA;CAChF;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,YAAY,CAAA;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAW,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACpC,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACzC,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC5C,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACpC,OAAO,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACjC,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACrC,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACtC,cAAc,CAAC,EAAE,GAAG,CAAC,qBAAqB,EAAE,CAAC,CAAA;IAC7C,WAAW,EAAE,GAAG,CAAC,kBAAkB,CAAC,CAAA;CACrC;AAED,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,YAAY,CAAA;IAC1B,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAA;IACZ,OAAO,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAA;CACxC"}
@@ -0,0 +1,15 @@
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
+ seriesDimension?: string;
12
+ isMultiMetric?: boolean;
13
+ hasDimensions?: boolean;
14
+ }
15
+ //# sourceMappingURL=dataset-generation-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataset-generation-types.d.ts","sourceRoot":"","sources":["../../../src/types/dataset-generation-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAElE,MAAM,WAAW,+BAA+B;IAC9C,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,mBAAmB,EAAE,MAAM,EAAE,CAAA;IAC7B,gBAAgB,EAAE,YAAY,EAAE,CAAA;IAChC,YAAY,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;KAAE,CAAA;IACjE,SAAS,EAAE,YAAY,EAAE,CAAA;IACzB,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,oBAAoB,CAAA;IAC9C,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB"}
@@ -0,0 +1,18 @@
1
+ import type { AnalyticsChartColors, Threshold } from './chart-data';
2
+ import type { ExploreAggregations } from '@kong-ui-public/analytics-utilities';
3
+ /**
4
+ * Interace representing the various options
5
+ * that can be provided to the useExploreResultToTimeddatasets composable
6
+ *
7
+ * fill
8
+ * - determines if the generated should have the area under the line filled
9
+ * useMetricForColor
10
+ * - determines if colors should be generated based on the metrics
11
+ * - if false, colors will be auto generated using the generic datavis palette
12
+ */
13
+ export interface ExploreToDatasetDeps {
14
+ colorPalette?: AnalyticsChartColors | string[];
15
+ fill?: boolean;
16
+ threshold?: Record<ExploreAggregations, Threshold[]>;
17
+ }
18
+ //# sourceMappingURL=explore-to-dataset-deps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"explore-to-dataset-deps.d.ts","sourceRoot":"","sources":["../../../src/types/explore-to-dataset-deps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAE9E;;;;;;;;;GASG;AACH,MAAM,WAAW,oBAAoB;IACnC,YAAY,CAAC,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAAA;IAC9C,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAC,mBAAmB,EAAE,SAAS,EAAE,CAAC,CAAA;CACrD"}
@@ -0,0 +1,4 @@
1
+ export interface ExternalLink {
2
+ href: string;
3
+ }
4
+ //# sourceMappingURL=external-link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"external-link.d.ts","sourceRoot":"","sources":["../../../src/types/external-link.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;CACb"}
@@ -0,0 +1,12 @@
1
+ export * from './chart-data';
2
+ export * from './chart-meta';
3
+ export * from './chart-export';
4
+ export * from './chart-types';
5
+ export * from './chartjs-options';
6
+ export * from './explore-to-dataset-deps';
7
+ export * from './dataset-generation-types';
8
+ export * from './zoom-action-item';
9
+ export * from './external-link';
10
+ export * from './query-error';
11
+ export * from './scatter-data';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA"}
@@ -0,0 +1,7 @@
1
+ export interface QueryError {
2
+ status?: number;
3
+ type: 'forbidden' | 'timeout' | 'range_exceeded' | 'canceled' | 'other';
4
+ message: string;
5
+ details?: string;
6
+ }
7
+ //# sourceMappingURL=query-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-error.d.ts","sourceRoot":"","sources":["../../../src/types/query-error.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,WAAW,GAAG,SAAS,GAAG,gBAAgB,GAAG,UAAU,GAAG,OAAO,CAAA;IACvE,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB"}
@@ -0,0 +1,38 @@
1
+ import type { Display, ResultMetaBase } from '@kong-ui-public/analytics-utilities';
2
+ export interface ScatterPointExtra {
3
+ label: string;
4
+ value: number | string;
5
+ unit?: string;
6
+ }
7
+ export interface ScatterDataPoint {
8
+ /**
9
+ * Epoch milliseconds.
10
+ */
11
+ timestamp: number;
12
+ /**
13
+ * The value on the y axis.
14
+ */
15
+ value: number;
16
+ /**
17
+ * The value on the x axis when it plots a metric. Undefined plots `timestamp` instead.
18
+ */
19
+ x?: number;
20
+ /**
21
+ * Raw id of the series the point belongs to. Undefined puts every point in one series
22
+ * named after the metric.
23
+ */
24
+ group?: string;
25
+ /** Extra values to be placed in the tooltip */
26
+ extras?: ScatterPointExtra[];
27
+ }
28
+ export interface ScatterChartData extends ResultMetaBase {
29
+ points: ScatterDataPoint[];
30
+ metric: string;
31
+ metricUnit?: string;
32
+ xMetric?: string;
33
+ xMetricUnit?: string;
34
+ dimension?: string;
35
+ display?: Display;
36
+ }
37
+ export declare const isScatterChartData: (data: unknown) => data is ScatterChartData;
38
+ //# sourceMappingURL=scatter-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scatter-data.d.ts","sourceRoot":"","sources":["../../../src/types/scatter-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAElF,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,CAAA;IACV;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,+CAA+C;IAC/C,MAAM,CAAC,EAAE,iBAAiB,EAAE,CAAA;CAC7B;AAED,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,MAAM,EAAE,gBAAgB,EAAE,CAAA;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,eAAO,MAAM,kBAAkB,GAAI,MAAM,OAAO,KAAG,IAAI,IAAI,gBAU1D,CAAA"}
@@ -0,0 +1,9 @@
1
+ import type { AbsoluteTimeRangeV4 } from '@kong-ui-public/analytics-utilities';
2
+ export interface ZoomActionItem {
3
+ label: string;
4
+ key: string;
5
+ action?: (newTimeRange: AbsoluteTimeRangeV4) => void;
6
+ href?: string;
7
+ disabled?: boolean;
8
+ }
9
+ //# sourceMappingURL=zoom-action-item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zoom-action-item.d.ts","sourceRoot":"","sources":["../../../src/types/zoom-action-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAE9E,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,CAAC,YAAY,EAAE,mBAAmB,KAAK,IAAI,CAAA;IACpD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB"}
@@ -0,0 +1,8 @@
1
+ declare const _default: ({ bucketCount, minStamp, maxStamp, timestamps, }: {
2
+ bucketCount: number;
3
+ minStamp: number;
4
+ maxStamp: number;
5
+ timestamps: number[];
6
+ }) => Array<[number, number]>;
7
+ export default _default;
8
+ //# sourceMappingURL=bucketTimestamps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bucketTimestamps.d.ts","sourceRoot":"","sources":["../../../src/utils/bucketTimestamps.ts"],"names":[],"mappings":"yBAAgB,kDAKb;IACD,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,EAAE,CAAA;CACrB,KAAG,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAV3B,wBAoCC"}
@@ -0,0 +1,8 @@
1
+ import type { AnalyticsChartColors, ThresholdType } from '../../src/types';
2
+ export declare const datavisPalette: string[];
3
+ export declare const lookupDatavisColor: (idx: number, customPalette?: string[]) => string;
4
+ export declare const accessibleGrey = "#6f7787";
5
+ export declare const statusCodeBadgeBackgroundColor: (statusCode: string) => string;
6
+ export declare const determineBaseColor: (i: number, dimensionName: string, isEmpty: boolean, colorPalette: string[] | AnalyticsChartColors) => string;
7
+ export declare const thresholdColor: (type: ThresholdType) => string;
8
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../src/utils/colors.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAU1E,eAAO,MAAM,cAAc,UAM1B,CAAA;AAGD,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,EAAE,gBAAgB,MAAM,EAAE,WAGvE,CAAA;AAED,eAAO,MAAM,cAAc,YAAY,CAAA;AAYvC,eAAO,MAAM,8BAA8B,GAAI,YAAY,MAAM,WAIhE,CAAA;AAID,eAAO,MAAM,kBAAkB,GAAI,GAAG,MAAM,EAAE,eAAe,MAAM,EAAE,SAAS,OAAO,EAAE,cAAc,MAAM,EAAE,GAAG,oBAAoB,KAAG,MAYtI,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,MAAM,aAAa,KAAG,MAWpD,CAAA"}