@fluentui/react-charts 0.0.0-nightly-20250722-0406.1 → 0.0.0-nightly-20250723-0406.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -15
- package/dist/index.d.ts +133 -0
- package/lib/FunnelChart.js +1 -0
- package/lib/FunnelChart.js.map +1 -0
- package/lib/components/FunnelChart/FunnelChart.js +391 -0
- package/lib/components/FunnelChart/FunnelChart.js.map +1 -0
- package/lib/components/FunnelChart/FunnelChart.types.js +1 -0
- package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -0
- package/lib/components/FunnelChart/funnelGeometry.js +220 -0
- package/lib/components/FunnelChart/funnelGeometry.js.map +1 -0
- package/lib/components/FunnelChart/index.js +2 -0
- package/lib/components/FunnelChart/index.js.map +1 -0
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +59 -0
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/utilities/colors.js +12 -0
- package/lib/utilities/colors.js.map +1 -1
- package/lib-commonjs/FunnelChart.js +6 -0
- package/lib-commonjs/FunnelChart.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +402 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +6 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js +248 -0
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/index.js +7 -0
- package/lib-commonjs/components/FunnelChart/index.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +79 -0
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -0
- package/lib-commonjs/index.js +1 -0
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utilities/colors.js +18 -0
- package/lib-commonjs/utilities/colors.js.map +1 -1
- package/package.json +12 -12
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["FunnelChart.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { ChartPopoverProps } from '../CommonComponents/ChartPopover.types';\nimport { LegendsProps } from '../Legends/index';\n\n/**\n * Data point for funnel chart\n * {@docCategory FunnelChart}\n */\nexport interface FunnelChartDataPoint {\n /**\n * Stage name or identifier\n */\n stage: string | number;\n /**\n * Sub-values for stacked funnel charts\n * Each sub-value represents a category within the stage\n */\n subValues?: Array<{ category: string; value: number; color: string }>;\n /**\n * Value for the stage (used for non-stacked funnel charts)\n */\n value?: number;\n /**\n * Color for the stage (used for non-stacked funnel charts)\n */\n color?: string;\n}\n\n/**\n * Funnel Chart component props\n * {@docCategory FunnelChart}\n */\nexport interface FunnelChartProps {\n /**\n * Data points for the funnel chart\n */\n data: FunnelChartDataPoint[];\n /**\n * Title for the chart\n */\n chartTitle?: string;\n /**\n * Width of the chart\n */\n width?: number;\n\n /**\n * Height of the chart\n */\n height?: number;\n\n /**\n * Decides whether to show/hide legends\n * @defaultvalue false\n */\n hideLegend?: boolean;\n\n /**\n * Props for the legends in the chart\n */\n legendProps?: Partial<LegendsProps>;\n\n /**\n * Props for the callout in the chart\n */\n calloutProps?: ChartPopoverProps;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules\n */\n styles?: FunnelChartStyles;\n\n /**\n * Defines the culture to localize the numbers and dates\n */\n culture?: string;\n\n /**\n * Reference to the chart component\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n componentRef?: React.RefObject<any>;\n\n /**\n * Additional CSS class(es) to apply to the chart\n */\n className?: string;\n\n /**\n * Orientation of the funnel chart\n * @defaultvalue 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n}\n\n/**\n * Funnel Chart style properties\n * {@docCategory FunnelChart}\n */\nexport interface FunnelChartStyleProps {\n /**\n * Additional CSS class(es) to apply to the chart\n */\n className?: string;\n /**\n * Width of the chart\n */\n chartWidth: number;\n /**\n * Height of the chart\n */\n chartHeight: number;\n}\n\n/**\n * Funnel Chart styles\n * {@docCategory FunnelChart}\n */\nexport interface FunnelChartStyles {\n /**\n * Styles for the root element\n */\n root?: string;\n\n /**\n * Styles for the chart\n */\n chart?: string;\n\n /**\n * Styles for text elements\n */\n text?: string;\n\n /**\n * Styles for the callout root element\n */\n calloutContentRoot?: string;\n}\n"],"names":["React"],"rangeMappings":"","mappings":"AAAA,YAAYA,WAAW,QAAQ"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export function getVerticalFunnelSegmentGeometry({ d, i, data, funnelWidth, funnelHeight, isRTL }) {
|
|
3
|
+
const segmentHeight = funnelHeight / data.length;
|
|
4
|
+
const widthScale = (value)=>value / Math.max(...data.map((dataPoint)=>dataPoint.value)) * funnelWidth;
|
|
5
|
+
const topWidth = widthScale(d.value);
|
|
6
|
+
const bottomWidth = i < data.length - 1 ? widthScale(data[i + 1].value) : 0;
|
|
7
|
+
const xOffset = (funnelWidth - topWidth) / 2;
|
|
8
|
+
const nextXOffset = (funnelWidth - bottomWidth) / 2;
|
|
9
|
+
const xStart = isRTL ? funnelWidth - xOffset : xOffset;
|
|
10
|
+
const xEnd = isRTL ? funnelWidth - nextXOffset : nextXOffset;
|
|
11
|
+
const isLastSegment = i === data.length - 1;
|
|
12
|
+
const textY = isLastSegment ? i * segmentHeight + segmentHeight * 0.33 : i * segmentHeight + segmentHeight / 2;
|
|
13
|
+
const textX = funnelWidth / 2;
|
|
14
|
+
let availableWidth = topWidth;
|
|
15
|
+
if (isLastSegment) {
|
|
16
|
+
const yFromTop = textY - i * segmentHeight;
|
|
17
|
+
const widthAtY = topWidth * (1 - yFromTop / segmentHeight);
|
|
18
|
+
availableWidth = Math.max(widthAtY * 0.8, 0);
|
|
19
|
+
} else {
|
|
20
|
+
availableWidth = Math.min(topWidth, bottomWidth) * 0.9;
|
|
21
|
+
}
|
|
22
|
+
const pathD = `M${xStart},${i * segmentHeight}
|
|
23
|
+
L${funnelWidth - xStart},${i * segmentHeight}
|
|
24
|
+
L${funnelWidth - xEnd},${(i + 1) * segmentHeight}
|
|
25
|
+
L${xEnd},${(i + 1) * segmentHeight}
|
|
26
|
+
Z`;
|
|
27
|
+
return {
|
|
28
|
+
pathD,
|
|
29
|
+
textX,
|
|
30
|
+
textY,
|
|
31
|
+
availableWidth
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function getHorizontalFunnelSegmentGeometry({ d, i, data, funnelWidth, funnelHeight, isRTL }) {
|
|
35
|
+
const segmentWidth = funnelWidth / data.length;
|
|
36
|
+
const heightScale = (value)=>value / Math.max(...data.map((dataPoint)=>dataPoint.value)) * funnelHeight;
|
|
37
|
+
const leftHeight = heightScale(d.value);
|
|
38
|
+
const rightHeight = i < data.length - 1 ? heightScale(data[i + 1].value) : 0;
|
|
39
|
+
const yOffset = (funnelHeight - leftHeight) / 2;
|
|
40
|
+
const nextYOffset = (funnelHeight - rightHeight) / 2;
|
|
41
|
+
const x0 = i * segmentWidth;
|
|
42
|
+
const x1 = (i + 1) * segmentWidth;
|
|
43
|
+
const isLastSegment = i === data.length - 1;
|
|
44
|
+
let textX;
|
|
45
|
+
let textY;
|
|
46
|
+
let availableWidth = segmentWidth * 0.8;
|
|
47
|
+
if (isLastSegment) {
|
|
48
|
+
// For the triangular last segment, position text at 1/4 from the left edge
|
|
49
|
+
textX = x0 + (x1 - x0) * 0.25;
|
|
50
|
+
textY = funnelHeight / 2;
|
|
51
|
+
// For triangular segments, we need to check both height and width constraints
|
|
52
|
+
// The segment needs to be large enough to contain text
|
|
53
|
+
const segmentArea = leftHeight * segmentWidth / 2; // Area of triangle
|
|
54
|
+
const minAreaForText = 800; // Minimum area needed to show text
|
|
55
|
+
if (leftHeight < 40 || segmentArea < minAreaForText) {
|
|
56
|
+
// Hide text if height is too small or area is insufficient
|
|
57
|
+
availableWidth = 0;
|
|
58
|
+
} else {
|
|
59
|
+
// Calculate available width at text position
|
|
60
|
+
const widthAtTextPosition = (x1 - x0) * 0.75;
|
|
61
|
+
availableWidth = widthAtTextPosition * 0.6;
|
|
62
|
+
}
|
|
63
|
+
} else {
|
|
64
|
+
textX = (x0 + x1) / 2;
|
|
65
|
+
textY = funnelHeight / 2;
|
|
66
|
+
const minHeight = Math.min(leftHeight, rightHeight);
|
|
67
|
+
availableWidth = minHeight > 20 ? segmentWidth * 0.8 : 0;
|
|
68
|
+
}
|
|
69
|
+
const pathD = `M${x0},${yOffset}
|
|
70
|
+
L${x1},${nextYOffset}
|
|
71
|
+
L${x1},${funnelHeight - nextYOffset}
|
|
72
|
+
L${x0},${funnelHeight - yOffset}
|
|
73
|
+
Z`;
|
|
74
|
+
return {
|
|
75
|
+
pathD,
|
|
76
|
+
textX,
|
|
77
|
+
textY,
|
|
78
|
+
availableWidth
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
export function getStackedVerticalFunnelSegmentGeometry({ i, k, stages, totals, maxTotal, funnelWidth, funnelHeight }) {
|
|
82
|
+
var _next_subValues;
|
|
83
|
+
const segmentHeight = funnelHeight / stages.length;
|
|
84
|
+
const cur = stages[i];
|
|
85
|
+
const next = stages[i + 1] || {
|
|
86
|
+
subValues: []
|
|
87
|
+
};
|
|
88
|
+
const curTotal = totals[i] || 1;
|
|
89
|
+
const nextTotal = totals[i + 1] || 0;
|
|
90
|
+
let cumTop = 0;
|
|
91
|
+
let cumBot = 0;
|
|
92
|
+
for(let idx = 0; idx < k; idx++){
|
|
93
|
+
var _next_subValues1;
|
|
94
|
+
const v = cur.subValues[idx];
|
|
95
|
+
const vNext = (_next_subValues1 = next.subValues) === null || _next_subValues1 === void 0 ? void 0 : _next_subValues1.find((x)=>x.category === v.category);
|
|
96
|
+
const val = v.value;
|
|
97
|
+
const nextVal = vNext ? vNext.value : 0;
|
|
98
|
+
cumTop += val / curTotal * (curTotal / maxTotal) * funnelWidth;
|
|
99
|
+
cumBot += (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelWidth;
|
|
100
|
+
}
|
|
101
|
+
const v = cur.subValues[k];
|
|
102
|
+
const vNext = (_next_subValues = next.subValues) === null || _next_subValues === void 0 ? void 0 : _next_subValues.find((x)=>x.category === v.category);
|
|
103
|
+
const val = v.value;
|
|
104
|
+
const nextVal = vNext ? vNext.value : 0;
|
|
105
|
+
const topW = val / curTotal * (curTotal / maxTotal) * funnelWidth;
|
|
106
|
+
const botW = (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelWidth;
|
|
107
|
+
const topStart = (funnelWidth - curTotal / maxTotal * funnelWidth) / 2 + cumTop;
|
|
108
|
+
const topEnd = topStart + topW;
|
|
109
|
+
const botStart = (funnelWidth - nextTotal / maxTotal * funnelWidth) / 2 + cumBot;
|
|
110
|
+
const botEnd = botStart + botW;
|
|
111
|
+
const textX = (topStart + topEnd + botStart + botEnd) / 4;
|
|
112
|
+
const isLastSegment = i === stages.length - 1;
|
|
113
|
+
const textY = isLastSegment ? i * segmentHeight + segmentHeight * 0.33 : (i + 0.5) * segmentHeight;
|
|
114
|
+
// Calculate available width based on this specific segment's width
|
|
115
|
+
let availableWidth;
|
|
116
|
+
if (isLastSegment) {
|
|
117
|
+
// For triangular last segment, use the width at text Y position
|
|
118
|
+
const yFromTop = textY - i * segmentHeight;
|
|
119
|
+
const widthRatio = 1 - yFromTop / segmentHeight;
|
|
120
|
+
availableWidth = topW * widthRatio;
|
|
121
|
+
} else {
|
|
122
|
+
// For trapezoidal segments, use the actual segment width
|
|
123
|
+
availableWidth = Math.min(topW, botW);
|
|
124
|
+
}
|
|
125
|
+
const pathD = `M${topStart},${i * segmentHeight}
|
|
126
|
+
L${topEnd},${i * segmentHeight}
|
|
127
|
+
L${botEnd},${(i + 1) * segmentHeight}
|
|
128
|
+
L${botStart},${(i + 1) * segmentHeight}
|
|
129
|
+
Z`;
|
|
130
|
+
return {
|
|
131
|
+
pathD,
|
|
132
|
+
textX,
|
|
133
|
+
textY,
|
|
134
|
+
availableWidth
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
export function getStackedHorizontalFunnelSegmentGeometry({ i, k, stages, totals, maxTotal, funnelWidth, funnelHeight }) {
|
|
138
|
+
var _next_subValues;
|
|
139
|
+
const segmentWidth = funnelWidth / stages.length;
|
|
140
|
+
const cur = stages[i];
|
|
141
|
+
const next = stages[i + 1] || {
|
|
142
|
+
subValues: []
|
|
143
|
+
};
|
|
144
|
+
const curTotal = totals[i] || 1;
|
|
145
|
+
const nextTotal = totals[i + 1] || 0;
|
|
146
|
+
let cumTop = 0;
|
|
147
|
+
let cumBot = 0;
|
|
148
|
+
for(let idx = 0; idx < k; idx++){
|
|
149
|
+
var _next_subValues1;
|
|
150
|
+
const v = cur.subValues[idx];
|
|
151
|
+
const vNext = (_next_subValues1 = next.subValues) === null || _next_subValues1 === void 0 ? void 0 : _next_subValues1.find((x)=>x.category === v.category);
|
|
152
|
+
const val = v.value;
|
|
153
|
+
const nextVal = vNext ? vNext.value : 0;
|
|
154
|
+
cumTop += val / curTotal * (curTotal / maxTotal) * funnelHeight;
|
|
155
|
+
cumBot += (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelHeight;
|
|
156
|
+
}
|
|
157
|
+
const v = cur.subValues[k];
|
|
158
|
+
const vNext = (_next_subValues = next.subValues) === null || _next_subValues === void 0 ? void 0 : _next_subValues.find((x)=>x.category === v.category);
|
|
159
|
+
const val = v.value;
|
|
160
|
+
const nextVal = vNext ? vNext.value : 0;
|
|
161
|
+
const topH = val / curTotal * (curTotal / maxTotal) * funnelHeight;
|
|
162
|
+
const botH = (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelHeight;
|
|
163
|
+
const leftStart = i * segmentWidth;
|
|
164
|
+
const leftEnd = (i + 1) * segmentWidth;
|
|
165
|
+
const topStart = (funnelHeight - curTotal / maxTotal * funnelHeight) / 2 + cumTop;
|
|
166
|
+
const topEnd = topStart + topH;
|
|
167
|
+
const botStart = (funnelHeight - nextTotal / maxTotal * funnelHeight) / 2 + cumBot;
|
|
168
|
+
const botEnd = botStart + botH;
|
|
169
|
+
const isLastSegment = i === stages.length - 1;
|
|
170
|
+
let textX;
|
|
171
|
+
let textY;
|
|
172
|
+
let availableWidth;
|
|
173
|
+
if (isLastSegment) {
|
|
174
|
+
textX = leftStart + (leftEnd - leftStart) * 0.25;
|
|
175
|
+
textY = (topStart + topEnd) / 2;
|
|
176
|
+
// For triangular segments, calculate available width at text position
|
|
177
|
+
const segmentWidthAtTextPos = (leftEnd - leftStart) * 0.5;
|
|
178
|
+
availableWidth = segmentWidthAtTextPos * 0.8;
|
|
179
|
+
// For triangular last segments, also check if there's enough height
|
|
180
|
+
// The segment area should be large enough to contain text
|
|
181
|
+
const segmentArea = topH * segmentWidth / 2;
|
|
182
|
+
if (topH < 24 || segmentArea < 600) {
|
|
183
|
+
availableWidth = 0;
|
|
184
|
+
}
|
|
185
|
+
} else {
|
|
186
|
+
textX = (leftStart + leftEnd) / 2;
|
|
187
|
+
textY = (topStart + topEnd + botStart + botEnd) / 4;
|
|
188
|
+
// For trapezoidal segments, use full segment width
|
|
189
|
+
availableWidth = Math.abs(leftEnd - leftStart) * 0.9;
|
|
190
|
+
// Check if the segment has sufficient height for text
|
|
191
|
+
// For non-last segments, we need to ensure there's enough vertical space
|
|
192
|
+
const avgHeight = (topH + botH) / 2;
|
|
193
|
+
if (avgHeight < 20) {
|
|
194
|
+
availableWidth = 0;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
const pathD = `M${leftStart},${topStart}
|
|
198
|
+
L${leftEnd},${botStart}
|
|
199
|
+
L${leftEnd},${botEnd}
|
|
200
|
+
L${leftStart},${topEnd}
|
|
201
|
+
Z`;
|
|
202
|
+
return {
|
|
203
|
+
pathD,
|
|
204
|
+
textX,
|
|
205
|
+
textY,
|
|
206
|
+
availableWidth
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
export function getSegmentTextProps({ availableWidth, minTextWidth = 24, textX, textY, value, culture, onMouseOver, onMouseMove, onMouseOut }) {
|
|
210
|
+
return {
|
|
211
|
+
show: availableWidth > minTextWidth && availableWidth > 0,
|
|
212
|
+
x: textX,
|
|
213
|
+
y: textY,
|
|
214
|
+
value,
|
|
215
|
+
culture,
|
|
216
|
+
onMouseOver,
|
|
217
|
+
onMouseMove,
|
|
218
|
+
onMouseOut
|
|
219
|
+
};
|
|
220
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["funnelGeometry.ts"],"sourcesContent":["import * as React from 'react';\nimport { FunnelChartDataPoint } from './FunnelChart.types';\n\nexport interface FunnelSegmentGeometry {\n pathD: string;\n textX: number;\n textY: number;\n availableWidth: number;\n}\n\nexport interface StackedFunnelSegmentGeometry {\n pathD: string;\n textX: number;\n textY: number;\n availableWidth: number;\n}\n\ninterface SubValue {\n category: string;\n value: number;\n color: string;\n}\n\ninterface Stage {\n subValues: SubValue[];\n}\n\nexport function getVerticalFunnelSegmentGeometry({\n d,\n i,\n data,\n funnelWidth,\n funnelHeight,\n isRTL,\n}: {\n d: FunnelChartDataPoint;\n i: number;\n data: FunnelChartDataPoint[];\n funnelWidth: number;\n funnelHeight: number;\n isRTL: boolean;\n}): FunnelSegmentGeometry {\n const segmentHeight = funnelHeight / data.length;\n const widthScale = (value: number) => (value / Math.max(...data.map(dataPoint => dataPoint.value!))) * funnelWidth;\n const topWidth = widthScale(d.value!);\n const bottomWidth = i < data.length - 1 ? widthScale(data[i + 1].value!) : 0;\n const xOffset = (funnelWidth - topWidth) / 2;\n const nextXOffset = (funnelWidth - bottomWidth) / 2;\n const xStart = isRTL ? funnelWidth - xOffset : xOffset;\n const xEnd = isRTL ? funnelWidth - nextXOffset : nextXOffset;\n\n const isLastSegment = i === data.length - 1;\n const textY = isLastSegment ? i * segmentHeight + segmentHeight * 0.33 : i * segmentHeight + segmentHeight / 2;\n\n const textX = funnelWidth / 2;\n let availableWidth = topWidth;\n if (isLastSegment) {\n const yFromTop = textY - i * segmentHeight;\n const widthAtY = topWidth * (1 - yFromTop / segmentHeight);\n availableWidth = Math.max(widthAtY * 0.8, 0);\n } else {\n availableWidth = Math.min(topWidth, bottomWidth) * 0.9;\n }\n const pathD = `M${xStart},${i * segmentHeight}\n L${funnelWidth - xStart},${i * segmentHeight}\n L${funnelWidth - xEnd},${(i + 1) * segmentHeight}\n L${xEnd},${(i + 1) * segmentHeight}\n Z`;\n return { pathD, textX, textY, availableWidth };\n}\n\nexport function getHorizontalFunnelSegmentGeometry({\n d,\n i,\n data,\n funnelWidth,\n funnelHeight,\n isRTL,\n}: {\n d: FunnelChartDataPoint;\n i: number;\n data: FunnelChartDataPoint[];\n funnelWidth: number;\n funnelHeight: number;\n isRTL: boolean;\n}): FunnelSegmentGeometry {\n const segmentWidth = funnelWidth / data.length;\n const heightScale = (value: number) => (value / Math.max(...data.map(dataPoint => dataPoint.value!))) * funnelHeight;\n const leftHeight = heightScale(d.value!);\n const rightHeight = i < data.length - 1 ? heightScale(data[i + 1].value!) : 0;\n const yOffset = (funnelHeight - leftHeight) / 2;\n const nextYOffset = (funnelHeight - rightHeight) / 2;\n const x0 = i * segmentWidth;\n const x1 = (i + 1) * segmentWidth;\n\n const isLastSegment = i === data.length - 1;\n let textX: number;\n let textY: number;\n let availableWidth = segmentWidth * 0.8;\n\n if (isLastSegment) {\n // For the triangular last segment, position text at 1/4 from the left edge\n textX = x0 + (x1 - x0) * 0.25;\n textY = funnelHeight / 2;\n\n // For triangular segments, we need to check both height and width constraints\n // The segment needs to be large enough to contain text\n const segmentArea = (leftHeight * segmentWidth) / 2; // Area of triangle\n const minAreaForText = 800; // Minimum area needed to show text\n\n if (leftHeight < 40 || segmentArea < minAreaForText) {\n // Hide text if height is too small or area is insufficient\n availableWidth = 0;\n } else {\n // Calculate available width at text position\n const widthAtTextPosition = (x1 - x0) * 0.75;\n availableWidth = widthAtTextPosition * 0.6;\n }\n } else {\n textX = (x0 + x1) / 2;\n textY = funnelHeight / 2;\n const minHeight = Math.min(leftHeight, rightHeight);\n availableWidth = minHeight > 20 ? segmentWidth * 0.8 : 0;\n }\n\n const pathD = `M${x0},${yOffset}\n L${x1},${nextYOffset}\n L${x1},${funnelHeight - nextYOffset}\n L${x0},${funnelHeight - yOffset}\n Z`;\n return { pathD, textX, textY, availableWidth };\n}\n\nexport function getStackedVerticalFunnelSegmentGeometry({\n i,\n k,\n stages,\n totals,\n maxTotal,\n funnelWidth,\n funnelHeight,\n}: {\n i: number;\n k: number;\n stages: Stage[];\n totals: number[];\n maxTotal: number;\n funnelWidth: number;\n funnelHeight: number;\n}): StackedFunnelSegmentGeometry {\n const segmentHeight = funnelHeight / stages.length;\n const cur = stages[i];\n const next = stages[i + 1] || { subValues: [] };\n const curTotal = totals[i] || 1;\n const nextTotal = totals[i + 1] || 0;\n\n let cumTop = 0;\n let cumBot = 0;\n for (let idx = 0; idx < k; idx++) {\n const v = cur.subValues[idx];\n const vNext = next.subValues?.find((x: SubValue) => x.category === v.category);\n const val = v.value;\n const nextVal = vNext ? vNext.value : 0;\n cumTop += (val / curTotal) * (curTotal / maxTotal) * funnelWidth;\n cumBot += (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelWidth;\n }\n const v = cur.subValues[k];\n const vNext = next.subValues?.find((x: SubValue) => x.category === v.category);\n const val = v.value;\n const nextVal = vNext ? vNext.value : 0;\n const topW = (val / curTotal) * (curTotal / maxTotal) * funnelWidth;\n const botW = (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelWidth;\n const topStart = (funnelWidth - (curTotal / maxTotal) * funnelWidth) / 2 + cumTop;\n const topEnd = topStart + topW;\n const botStart = (funnelWidth - (nextTotal / maxTotal) * funnelWidth) / 2 + cumBot;\n const botEnd = botStart + botW;\n const textX = (topStart + topEnd + botStart + botEnd) / 4;\n\n const isLastSegment = i === stages.length - 1;\n const textY = isLastSegment ? i * segmentHeight + segmentHeight * 0.33 : (i + 0.5) * segmentHeight;\n\n // Calculate available width based on this specific segment's width\n let availableWidth: number;\n if (isLastSegment) {\n // For triangular last segment, use the width at text Y position\n const yFromTop = textY - i * segmentHeight;\n const widthRatio = 1 - yFromTop / segmentHeight;\n availableWidth = topW * widthRatio;\n } else {\n // For trapezoidal segments, use the actual segment width\n availableWidth = Math.min(topW, botW);\n }\n\n const pathD = `M${topStart},${i * segmentHeight}\n L${topEnd},${i * segmentHeight}\n L${botEnd},${(i + 1) * segmentHeight}\n L${botStart},${(i + 1) * segmentHeight}\n Z`;\n return { pathD, textX, textY, availableWidth };\n}\n\nexport function getStackedHorizontalFunnelSegmentGeometry({\n i,\n k,\n stages,\n totals,\n maxTotal,\n funnelWidth,\n funnelHeight,\n}: {\n i: number;\n k: number;\n stages: Stage[];\n totals: number[];\n maxTotal: number;\n funnelWidth: number;\n funnelHeight: number;\n}): StackedFunnelSegmentGeometry {\n const segmentWidth = funnelWidth / stages.length;\n const cur = stages[i];\n const next = stages[i + 1] || { subValues: [] };\n const curTotal = totals[i] || 1;\n const nextTotal = totals[i + 1] || 0;\n\n let cumTop = 0;\n let cumBot = 0;\n for (let idx = 0; idx < k; idx++) {\n const v = cur.subValues[idx];\n const vNext = next.subValues?.find((x: SubValue) => x.category === v.category);\n const val = v.value;\n const nextVal = vNext ? vNext.value : 0;\n cumTop += (val / curTotal) * (curTotal / maxTotal) * funnelHeight;\n cumBot += (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelHeight;\n }\n const v = cur.subValues[k];\n const vNext = next.subValues?.find((x: SubValue) => x.category === v.category);\n const val = v.value;\n const nextVal = vNext ? vNext.value : 0;\n const topH = (val / curTotal) * (curTotal / maxTotal) * funnelHeight;\n const botH = (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelHeight;\n const leftStart = i * segmentWidth;\n const leftEnd = (i + 1) * segmentWidth;\n const topStart = (funnelHeight - (curTotal / maxTotal) * funnelHeight) / 2 + cumTop;\n const topEnd = topStart + topH;\n const botStart = (funnelHeight - (nextTotal / maxTotal) * funnelHeight) / 2 + cumBot;\n const botEnd = botStart + botH;\n\n const isLastSegment = i === stages.length - 1;\n let textX: number;\n let textY: number;\n let availableWidth: number;\n\n if (isLastSegment) {\n textX = leftStart + (leftEnd - leftStart) * 0.25;\n textY = (topStart + topEnd) / 2;\n // For triangular segments, calculate available width at text position\n const segmentWidthAtTextPos = (leftEnd - leftStart) * 0.5;\n availableWidth = segmentWidthAtTextPos * 0.8;\n\n // For triangular last segments, also check if there's enough height\n // The segment area should be large enough to contain text\n const segmentArea = (topH * segmentWidth) / 2;\n if (topH < 24 || segmentArea < 600) {\n availableWidth = 0;\n }\n } else {\n textX = (leftStart + leftEnd) / 2;\n textY = (topStart + topEnd + botStart + botEnd) / 4;\n // For trapezoidal segments, use full segment width\n availableWidth = Math.abs(leftEnd - leftStart) * 0.9;\n\n // Check if the segment has sufficient height for text\n // For non-last segments, we need to ensure there's enough vertical space\n const avgHeight = (topH + botH) / 2;\n if (avgHeight < 20) {\n availableWidth = 0;\n }\n }\n\n const pathD = `M${leftStart},${topStart}\n L${leftEnd},${botStart}\n L${leftEnd},${botEnd}\n L${leftStart},${topEnd}\n Z`;\n return { pathD, textX, textY, availableWidth };\n}\n\nexport function getSegmentTextProps({\n availableWidth,\n minTextWidth = 24,\n textX,\n textY,\n value,\n culture,\n onMouseOver,\n onMouseMove,\n onMouseOut,\n}: {\n availableWidth: number;\n minTextWidth?: number;\n textX: number;\n textY: number;\n value: number;\n culture: string | undefined;\n onMouseOver: ((event: React.MouseEvent<SVGElement>) => void) | undefined;\n onMouseMove: ((event: React.MouseEvent<SVGElement>) => void) | undefined;\n onMouseOut: (() => void) | undefined;\n}) {\n return {\n show: availableWidth > minTextWidth && availableWidth > 0,\n x: textX,\n y: textY,\n value,\n culture,\n onMouseOver,\n onMouseMove,\n onMouseOut,\n };\n}\n"],"names":["React","getVerticalFunnelSegmentGeometry","d","i","data","funnelWidth","funnelHeight","isRTL","segmentHeight","length","widthScale","value","Math","max","map","dataPoint","topWidth","bottomWidth","xOffset","nextXOffset","xStart","xEnd","isLastSegment","textY","textX","availableWidth","yFromTop","widthAtY","min","pathD","getHorizontalFunnelSegmentGeometry","segmentWidth","heightScale","leftHeight","rightHeight","yOffset","nextYOffset","x0","x1","segmentArea","minAreaForText","widthAtTextPosition","minHeight","getStackedVerticalFunnelSegmentGeometry","k","stages","totals","maxTotal","next","cur","subValues","curTotal","nextTotal","cumTop","cumBot","idx","v","vNext","find","x","category","val","nextVal","topW","botW","topStart","topEnd","botStart","botEnd","widthRatio","getStackedHorizontalFunnelSegmentGeometry","topH","botH","leftStart","leftEnd","segmentWidthAtTextPos","abs","avgHeight","getSegmentTextProps","minTextWidth","culture","onMouseOver","onMouseMove","onMouseOut","show","y"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AA2B/B,OAAO,SAASC,iCAAiC,EAC/CC,CAAC,EACDC,CAAC,EACDC,IAAI,EACJC,WAAW,EACXC,YAAY,EACZC,KAAK,EAQN;IACC,MAAMC,gBAAgBF,eAAeF,KAAKK,MAAM;IAChD,MAAMC,aAAa,CAACC,QAAkB,AAACA,QAAQC,KAAKC,GAAG,IAAIT,KAAKU,GAAG,CAACC,CAAAA,YAAaA,UAAUJ,KAAK,KAAON;IACvG,MAAMW,WAAWN,WAAWR,EAAES,KAAK;IACnC,MAAMM,cAAcd,IAAIC,KAAKK,MAAM,GAAG,IAAIC,WAAWN,IAAI,CAACD,IAAI,EAAE,CAACQ,KAAK,IAAK;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EA,MAAMI,QAAQ,CAAC,CAAC,EAAE4C,UAAU,CAAC,EAAER,SAAS;KACrC,EAAES,QAAQ,CAAC,EAAEP,SAAS;KACtB,EAAEO,QAAQ,CAAC,EAAEN,OAAO;KACpB,EAAEK,UAAU,CAAC,EAAEP,OAAO;KACtB,CAAC;IACJ,OAAO;QAAErC;QAAOL;QAAOD;QAAOE;IAAe;AAC/C;AAEA,OAAO,SAASqD,oBAAoB,EAClCrD,cAAc,EACdsD,eAAe,EAAE,EACjBvD,KAAK,EACLD,KAAK,EACLZ,KAAK,EACLqE,OAAO,EACPC,WAAW,EACXC,WAAW,EACXC,UAAU,EAWX;IACC,OAAO;QACLC,MAAM3D,iBAAiBsD,gBAAgBtD,iBAAiB;QACxDkC,GAAGnC;QACH6D,GAAG9D;QACHZ;QACAqE;QACAC;QACAC;QACAC;IACF;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './FunnelChart';\nexport * from './FunnelChart.types';\n"],"names":[],"rangeMappings":";","mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,sBAAsB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { __styles, mergeClasses } from '@griffel/react';
|
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export const funnelClassNames = {
|
|
7
|
+
root: 'fui-funnel__root',
|
|
8
|
+
chart: 'fui-funnel__chart',
|
|
9
|
+
text: 'fui-funnel__text',
|
|
10
|
+
calloutContentRoot: 'fui-funnel__callout-content-root'
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Base Styles
|
|
14
|
+
*/
|
|
15
|
+
const useStyles = /*#__PURE__*/__styles({
|
|
16
|
+
root: {
|
|
17
|
+
Bt984gj: "f122n59",
|
|
18
|
+
a9b677: "fly5x3f",
|
|
19
|
+
Bqenvij: "f1l02sjl",
|
|
20
|
+
Bahqtrf: "fk6fouc",
|
|
21
|
+
Be2twd7: "fkhj508",
|
|
22
|
+
Bhrd7zp: "figsok6",
|
|
23
|
+
qhf8xq: "f10pi13n"
|
|
24
|
+
},
|
|
25
|
+
chart: {
|
|
26
|
+
mc9l5x: "ftgm304",
|
|
27
|
+
a9b677: "fly5x3f",
|
|
28
|
+
Bqenvij: "f1l02sjl"
|
|
29
|
+
},
|
|
30
|
+
text: {
|
|
31
|
+
Bkecrkj: "f1aehjj5",
|
|
32
|
+
Bhrd7zp: "fl43uef",
|
|
33
|
+
Bkfmm31: "fhuob2q",
|
|
34
|
+
Bahqtrf: "fk6fouc",
|
|
35
|
+
Be2twd7: "fkhj508"
|
|
36
|
+
},
|
|
37
|
+
calloutContentRoot: {
|
|
38
|
+
B2u0y6b: "f15g8at8"
|
|
39
|
+
}
|
|
40
|
+
}, {
|
|
41
|
+
d: [".f122n59{align-items:center;}", ".fly5x3f{width:100%;}", ".f1l02sjl{height:100%;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f10pi13n{position:relative;}", ".ftgm304{display:block;}", ".f1aehjj5{pointer-events:none;}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fhuob2q{fill:var(--colorNeutralForeground1);}", ".f15g8at8{max-width:238px;}"]
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* Apply styling to the FunnelChart component
|
|
45
|
+
*/
|
|
46
|
+
export const useFunnelChartStyles = props => {
|
|
47
|
+
var _props_styles, _props_styles1, _props_styles2, _props_styles3;
|
|
48
|
+
const {
|
|
49
|
+
className
|
|
50
|
+
} = props;
|
|
51
|
+
const baseStyles = useStyles();
|
|
52
|
+
return {
|
|
53
|
+
root: mergeClasses(funnelClassNames.root, baseStyles.root, className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),
|
|
54
|
+
chart: mergeClasses(funnelClassNames.chart, baseStyles.chart, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.chart),
|
|
55
|
+
text: mergeClasses(funnelClassNames.text, baseStyles.text, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.text),
|
|
56
|
+
calloutContentRoot: mergeClasses(baseStyles.calloutContentRoot, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.calloutContentRoot)
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=useFunnelChartStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","tokens","funnelClassNames","root","chart","text","calloutContentRoot","useStyles","Bt984gj","a9b677","Bqenvij","Bahqtrf","Be2twd7","Bhrd7zp","qhf8xq","mc9l5x","Bkecrkj","Bkfmm31","B2u0y6b","d","useFunnelChartStyles","props","_props_styles","_props_styles1","_props_styles2","_props_styles3","className","baseStyles","styles"],"sources":["useFunnelChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\n/**\n * @internal\n */ export const funnelClassNames = {\n root: 'fui-funnel__root',\n chart: 'fui-funnel__chart',\n text: 'fui-funnel__text',\n calloutContentRoot: 'fui-funnel__callout-content-root'\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n root: {\n alignItems: 'center',\n width: '100%',\n height: '100%',\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightRegular,\n position: 'relative'\n },\n chart: {\n display: 'block',\n width: '100%',\n height: '100%'\n },\n text: {\n pointerEvents: 'none',\n fontWeight: tokens.fontWeightSemibold,\n fill: tokens.colorNeutralForeground1,\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase300\n },\n calloutContentRoot: {\n maxWidth: '238px'\n }\n});\n/**\n * Apply styling to the FunnelChart component\n */ export const useFunnelChartStyles = (props)=>{\n var _props_styles, _props_styles1, _props_styles2, _props_styles3;\n const { className } = props;\n const baseStyles = useStyles();\n return {\n root: mergeClasses(funnelClassNames.root, baseStyles.root, className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n chart: mergeClasses(funnelClassNames.chart, baseStyles.chart, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.chart),\n text: mergeClasses(funnelClassNames.text, baseStyles.text, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.text),\n calloutContentRoot: mergeClasses(baseStyles.calloutContentRoot, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.calloutContentRoot)\n };\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C;AACA;AACA;AAAI,OAAO,MAAMC,gBAAgB,GAAG;EAChCC,IAAI,EAAE,kBAAkB;EACxBC,KAAK,EAAE,mBAAmB;EAC1BC,IAAI,EAAE,kBAAkB;EACxBC,kBAAkB,EAAE;AACxB,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGR,QAAA;EAAAI,IAAA;IAAAK,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAV,KAAA;IAAAW,MAAA;IAAAN,MAAA;IAAAC,OAAA;EAAA;EAAAL,IAAA;IAAAW,OAAA;IAAAH,OAAA;IAAAI,OAAA;IAAAN,OAAA;IAAAC,OAAA;EAAA;EAAAN,kBAAA;IAAAY,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAyBrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,oBAAoB,GAAIC,KAAK,IAAG;EAC7C,IAAIC,aAAa,EAAEC,cAAc,EAAEC,cAAc,EAAEC,cAAc;EACjE,MAAM;IAAEC;EAAU,CAAC,GAAGL,KAAK;EAC3B,MAAMM,UAAU,GAAGpB,SAAS,CAAC,CAAC;EAC9B,OAAO;IACHJ,IAAI,EAAEH,YAAY,CAACE,gBAAgB,CAACC,IAAI,EAAEwB,UAAU,CAACxB,IAAI,EAAEuB,SAAS,EAAE,CAACJ,aAAa,GAAGD,KAAK,CAACO,MAAM,MAAM,IAAI,IAAIN,aAAa,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,aAAa,CAACnB,IAAI,CAAC;IACxKC,KAAK,EAAEJ,YAAY,CAACE,gBAAgB,CAACE,KAAK,EAAEuB,UAAU,CAACvB,KAAK,EAAE,CAACmB,cAAc,GAAGF,KAAK,CAACO,MAAM,MAAM,IAAI,IAAIL,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAACnB,KAAK,CAAC;IACpKC,IAAI,EAAEL,YAAY,CAACE,gBAAgB,CAACG,IAAI,EAAEsB,UAAU,CAACtB,IAAI,EAAE,CAACmB,cAAc,GAAGH,KAAK,CAACO,MAAM,MAAM,IAAI,IAAIJ,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAACnB,IAAI,CAAC;IAChKC,kBAAkB,EAAEN,YAAY,CAAC2B,UAAU,CAACrB,kBAAkB,EAAE,CAACmB,cAAc,GAAGJ,KAAK,CAACO,MAAM,MAAM,IAAI,IAAIH,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAACnB,kBAAkB;EACtL,CAAC;AACL,CAAC","ignoreList":[]}
|
package/lib/index.js
CHANGED
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './HorizontalBarChart';\nexport * from './DonutChart';\nexport * from './Legends';\nexport * from './LineChart';\nexport * from './VerticalBarChart';\nexport * from './VerticalStackedBarChart';\nexport * from './GroupedVerticalBarChart';\nexport * from './CartesianChart';\nexport * from './types/index';\nexport * from './Sparkline';\nexport * from './ScatterChart';\nexport * from './GaugeChart';\nexport * from './utilities/colors';\nexport * from './Popover';\nexport * from './ResponsiveContainer';\nexport * from './DeclarativeChart';\nexport * from './AreaChart';\nexport * from './HorizontalBarChartWithAxis';\nexport * from './HeatMapChart';\nexport * from './SankeyChart';\n"],"names":[],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './HorizontalBarChart';\nexport * from './DonutChart';\nexport * from './Legends';\nexport * from './LineChart';\nexport * from './VerticalBarChart';\nexport * from './VerticalStackedBarChart';\nexport * from './GroupedVerticalBarChart';\nexport * from './CartesianChart';\nexport * from './types/index';\nexport * from './Sparkline';\nexport * from './ScatterChart';\nexport * from './GaugeChart';\nexport * from './utilities/colors';\nexport * from './Popover';\nexport * from './ResponsiveContainer';\nexport * from './DeclarativeChart';\nexport * from './AreaChart';\nexport * from './HorizontalBarChartWithAxis';\nexport * from './HeatMapChart';\nexport * from './SankeyChart';\nexport * from './FunnelChart';\n"],"names":[],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,cAAc,uBAAuB;AACrC,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,cAAc,qBAAqB;AACnC,cAAc,4BAA4B;AAC1C,cAAc,4BAA4B;AAC1C,cAAc,mBAAmB;AACjC,cAAc,gBAAgB;AAC9B,cAAc,cAAc;AAC5B,cAAc,iBAAiB;AAC/B,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,YAAY;AAC1B,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,cAAc;AAC5B,cAAc,+BAA+B;AAC7C,cAAc,iBAAiB;AAC/B,cAAc,gBAAgB;AAC9B,cAAc,gBAAgB"}
|
package/lib/utilities/colors.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { tokens } from '@fluentui/react-theme';
|
|
1
2
|
import { rgb as d3Rgb } from 'd3-color';
|
|
2
3
|
export const DataVizPalette = {
|
|
3
4
|
color1: 'qualitative.1',
|
|
@@ -267,3 +268,14 @@ export const getColorContrast = (c1, c2)=>{
|
|
|
267
268
|
const l2 = lrgbLuminance(rgbLrgb(d3Rgb(c2)));
|
|
268
269
|
return (Math.max(l1, l2) + 0.05) / (Math.min(l1, l2) + 0.05);
|
|
269
270
|
};
|
|
271
|
+
export const getInvertedTextColor = (color, isDarkTheme = false)=>{
|
|
272
|
+
return color === tokens.colorNeutralForeground1 ? tokens.colorNeutralBackground1 : tokens.colorNeutralForeground1;
|
|
273
|
+
};
|
|
274
|
+
export function getContrastTextColor(backgroundColor, isDarkTheme = false) {
|
|
275
|
+
let textColor = tokens.colorNeutralForeground1;
|
|
276
|
+
const contrastRatio = getColorContrast(textColor, backgroundColor);
|
|
277
|
+
if (contrastRatio < 3) {
|
|
278
|
+
textColor = getInvertedTextColor(textColor, isDarkTheme);
|
|
279
|
+
}
|
|
280
|
+
return textColor;
|
|
281
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["colors.ts"],"sourcesContent":["import { rgb as d3Rgb } from 'd3-color';\n\nexport const DataVizPalette = {\n color1: 'qualitative.1',\n color2: 'qualitative.2',\n color3: 'qualitative.3',\n color4: 'qualitative.4',\n color5: 'qualitative.5',\n color6: 'qualitative.6',\n color7: 'qualitative.7',\n color8: 'qualitative.8',\n color9: 'qualitative.9',\n color10: 'qualitative.10',\n color11: 'qualitative.11',\n color12: 'qualitative.12',\n color13: 'qualitative.13',\n color14: 'qualitative.14',\n color15: 'qualitative.15',\n color16: 'qualitative.16',\n color17: 'qualitative.17',\n color18: 'qualitative.18',\n color19: 'qualitative.19',\n color20: 'qualitative.20',\n color21: 'qualitative.21',\n color22: 'qualitative.22',\n color23: 'qualitative.23',\n color24: 'qualitative.24',\n color25: 'qualitative.25',\n color26: 'qualitative.26',\n color27: 'qualitative.27',\n color28: 'qualitative.28',\n color29: 'qualitative.29',\n color30: 'qualitative.30',\n color31: 'qualitative.31',\n color32: 'qualitative.32',\n color33: 'qualitative.33',\n color34: 'qualitative.34',\n color35: 'qualitative.35',\n color36: 'qualitative.36',\n color37: 'qualitative.37',\n color38: 'qualitative.38',\n color39: 'qualitative.39',\n color40: 'qualitative.40',\n info: 'semantic.info',\n disabled: 'semantic.disabled',\n highError: 'semantic.highError',\n error: 'semantic.error',\n warning: 'semantic.warning',\n success: 'semantic.success',\n highSuccess: 'semantic.highSuccess',\n};\n\n/**\n * Key: Color code.\n * Value:\n * Index 0 - Default color / Color for light theme,\n * Index 1 - Color for dark theme\n */\ntype Palette = { [key: string]: string[] };\n\nconst QualitativePalette: Palette = {\n '1': ['#637cef'], // [cornflower.tint10],\n '2': ['#e3008c'], // [hotPink.primary],\n '3': ['#2aa0a4'], // [teal.tint20],\n '4': ['#9373c0'], // [orchid.tint10],\n '5': ['#13a10e'], // [lightGreen.primary],\n '6': ['#3a96dd'], // [lightBlue.primary],\n '7': ['#ca5010'], // [pumpkin.primary],\n '8': ['#57811b'], // [lime.shade20],\n '9': ['#b146c2'], // [lilac.primary],\n '10': ['#ae8c00'], // [gold.shade10],\n '11': ['#3c51b4', '#93a4f4'], // [cornflower.shade20, cornflower.tint30],\n '12': ['#ad006a', '#ee5fb7'], // [hotPink.shade20, hotPink.tint30],\n '13': ['#026467', '#4cb4b7'], // [teal.shade20, teal.tint30],\n '14': ['#674c8c', '#a083c9'], // [orchid.shade20, orchid.tint20],\n '15': ['#0e7a0b', '#27ac22'], // [lightGreen.shade20, lightGreen.tint10],\n '16': ['#2c72a8', '#4fa1e1'], // [lightBlue.shade20, lightBlue.tint10],\n '17': ['#9a3d0c', '#d77440'], // [pumpkin.shade20, pumpkin.tint20],\n '18': ['#405f14', '#73aa24'], // [lime.shade30, lime.primary],\n '19': ['#863593', '#c36bd1'], // [lilac.shade20, lilac.tint20],\n '20': ['#6d5700', '#d0b232'], // [gold.shade30, gold.tint20],\n '21': ['#4f6bed'], // [cornflower.primary],\n '22': ['#ea38a6'], // [hotPink.tint20],\n '23': ['#038387'], // [teal.primary],\n '24': ['#8764b8'], // [orchid.primary],\n '25': ['#11910d'], // [lightGreen.shade10],\n '26': ['#3487c7'], // [lightBlue.shade10],\n '27': ['#d06228'], // [pumpkin.tint10],\n '28': ['#689920'], // [lime.shade10],\n '29': ['#ba58c9'], // [lilac.tint10],\n '30': ['#937700', '#c19c00'], // [gold.shade20, gold.primary],\n '31': ['#2c3c85', '#c8d1fa'], // [cornflower.shade30, cornflower.tint40],\n '32': ['#7f004e', '#f7adda'], // [hotPink.shade30, hotPink.tint40],\n '33': ['#02494c', '#9bd9db'], // [teal.shade30, teal.tint40],\n '34': ['#4c3867', '#b29ad4'], // [orchid.shade30, orchid.tint30],\n '35': ['#0b5a08', '#a7e3a5'], // [lightGreen.shade30, lightGreen.tint40],\n '36': ['#20547c', '#83bdeb'], // [lightBlue.shade30, lightBlue.tint30],\n '37': ['#712d09', '#df8e64'], // [pumpkin.shade30, pumpkin.tint30],\n '38': ['#23330b', '#a4cc6c'], // [lime.shade40, lime.tint30],\n '39': ['#63276d', '#cf87da'], // [lilac.shade30, lilac.tint30],\n '40': ['#3a2f00', '#dac157'], // [gold.shade40, gold.tint30],\n};\n\nconst SemanticPalette: Palette = {\n info: ['#015cda'],\n disabled: ['#dbdbdb', '#4d4d4d'], // [grey[86], grey[30]]\n highError: ['#6e0811', '#cc2635'], // [cranberry.shade30, cranberry.tint10],\n error: ['#c50f1f', '#dc626d'], // [cranberry.primary, cranberry.tint30],\n warning: ['#f7630c', '#f87528'], // [orange.primary, orange.tint10],\n success: ['#107c10', '#54b054'], // [green.primary, green.tint30],\n highSuccess: ['#094509', '#218c21'], // [green.shade30, green.tint10],\n};\n\nconst Colors: { [key: string]: Palette } = {\n qualitative: QualitativePalette,\n semantic: SemanticPalette,\n};\n\nconst QUALITATIVE_COLORS = Object.values(QualitativePalette);\nconst TOKENS = Object.values(DataVizPalette);\n\nconst getThemeSpecificColor = (colors: string[], isDarkTheme: boolean): string => {\n if (colors.length === 0) {\n return '';\n }\n const colorIdx = Number(isDarkTheme);\n if (colorIdx < colors.length) {\n return colors[colorIdx];\n }\n return colors[0];\n};\n\nexport const getNextColor = (index: number, offset: number = 0, isDarkTheme: boolean = false): string => {\n const colors = QUALITATIVE_COLORS[(index + offset) % QUALITATIVE_COLORS.length];\n return getThemeSpecificColor(colors, isDarkTheme);\n};\n\nexport const getColorFromToken = (token: string, isDarkTheme: boolean = false): string => {\n if (TOKENS.indexOf(token) >= 0) {\n const [paletteName, colorCode] = token.split('.');\n const colors = Colors[paletteName][colorCode];\n return getThemeSpecificColor(colors, isDarkTheme);\n }\n return token;\n};\n\n//For reference to how these numbers are calculated, refer https://www.w3.org/TR/WCAG/#dfn-contrast-ratio\nconst rgbLrgb1 = (v: number): number => {\n return v <= 0.04045 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4;\n};\n\nconst rgbLrgb = ({ r, g, b }: { r: number; g: number; b: number }): { r: number; g: number; b: number } => {\n return {\n r: rgbLrgb1(r / 255),\n g: rgbLrgb1(g / 255),\n b: rgbLrgb1(b / 255),\n };\n};\n\nconst lrgbLuminance = ({ r, g, b }: { r: number; g: number; b: number }): number => {\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nexport const getColorContrast = (c1: string, c2: string): number => {\n const l1 = lrgbLuminance(rgbLrgb(d3Rgb(c1)));\n const l2 = lrgbLuminance(rgbLrgb(d3Rgb(c2)));\n return (Math.max(l1, l2) + 0.05) / (Math.min(l1, l2) + 0.05);\n};\n"],"names":["rgb","d3Rgb","DataVizPalette","color1","color2","color3","color4","color5","color6","color7","color8","color9","color10","color11","color12","color13","color14","color15","color16","color17","color18","color19","color20","color21","color22","color23","color24","color25","color26","color27","color28","color29","color30","color31","color32","color33","color34","color35","color36","color37","color38","color39","color40","info","disabled","highError","error","warning","success","highSuccess","QualitativePalette","SemanticPalette","Colors","qualitative","semantic","QUALITATIVE_COLORS","Object","values","TOKENS","getThemeSpecificColor","colors","isDarkTheme","length","colorIdx","Number","getNextColor","index","offset","getColorFromToken","token","indexOf","paletteName","colorCode","split","rgbLrgb1","v","rgbLrgb","r","g","b","lrgbLuminance","getColorContrast","c1","c2","l1","l2","Math","max","min"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,OAAOC,KAAK,QAAQ,WAAW;AAExC,OAAO,MAAMC,iBAAiB;IAC5BC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,MAAM;IACNC,UAAU;IACVC,WAAW;IACXC,OAAO;IACPC,SAAS;IACTC,SAAS;IACTC,aAAa;AACf,EAAE;AAUF,MAAMC,qBAA8B;IAClC,KAAK;QAA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GJ,SAASI,IAAI;QAChBC,GAAGL,SAASK,IAAI;IAClB;AACF;AAEA,MAAMC,gBAAgB,CAAC,EAAEH,CAAC,EAAEC,CAAC,EAAEC,CAAC,EAAuC;IACrE,OAAO,SAASF,IAAI,SAASC,IAAI,SAASC;AAC5C;AAEA,OAAO,MAAME,mBAAmB,CAACC,IAAYC;IAC3C,MAAMC,KAAKJ,cAAcJ,QAAQ3E,MAAMiF;IACvC,MAAMG,KAAKL,cAAcJ,QAAQ3E,MAAMkF;IACvC,OAAO,AAACG,CAAAA,KAAKC,GAAG,CAACH,IAAIC,MAAM,IAAG,IAAMC,CAAAA,KAAKE,GAAG,CAACJ,IAAIC,MAAM,IAAG;AAC5D,EAAE"}
|
|
1
|
+
{"version":3,"sources":["colors.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { rgb as d3Rgb } from 'd3-color';\n\nexport const DataVizPalette = {\n color1: 'qualitative.1',\n color2: 'qualitative.2',\n color3: 'qualitative.3',\n color4: 'qualitative.4',\n color5: 'qualitative.5',\n color6: 'qualitative.6',\n color7: 'qualitative.7',\n color8: 'qualitative.8',\n color9: 'qualitative.9',\n color10: 'qualitative.10',\n color11: 'qualitative.11',\n color12: 'qualitative.12',\n color13: 'qualitative.13',\n color14: 'qualitative.14',\n color15: 'qualitative.15',\n color16: 'qualitative.16',\n color17: 'qualitative.17',\n color18: 'qualitative.18',\n color19: 'qualitative.19',\n color20: 'qualitative.20',\n color21: 'qualitative.21',\n color22: 'qualitative.22',\n color23: 'qualitative.23',\n color24: 'qualitative.24',\n color25: 'qualitative.25',\n color26: 'qualitative.26',\n color27: 'qualitative.27',\n color28: 'qualitative.28',\n color29: 'qualitative.29',\n color30: 'qualitative.30',\n color31: 'qualitative.31',\n color32: 'qualitative.32',\n color33: 'qualitative.33',\n color34: 'qualitative.34',\n color35: 'qualitative.35',\n color36: 'qualitative.36',\n color37: 'qualitative.37',\n color38: 'qualitative.38',\n color39: 'qualitative.39',\n color40: 'qualitative.40',\n info: 'semantic.info',\n disabled: 'semantic.disabled',\n highError: 'semantic.highError',\n error: 'semantic.error',\n warning: 'semantic.warning',\n success: 'semantic.success',\n highSuccess: 'semantic.highSuccess',\n};\n\n/**\n * Key: Color code.\n * Value:\n * Index 0 - Default color / Color for light theme,\n * Index 1 - Color for dark theme\n */\ntype Palette = { [key: string]: string[] };\n\nconst QualitativePalette: Palette = {\n '1': ['#637cef'], // [cornflower.tint10],\n '2': ['#e3008c'], // [hotPink.primary],\n '3': ['#2aa0a4'], // [teal.tint20],\n '4': ['#9373c0'], // [orchid.tint10],\n '5': ['#13a10e'], // [lightGreen.primary],\n '6': ['#3a96dd'], // [lightBlue.primary],\n '7': ['#ca5010'], // [pumpkin.primary],\n '8': ['#57811b'], // [lime.shade20],\n '9': ['#b146c2'], // [lilac.primary],\n '10': ['#ae8c00'], // [gold.shade10],\n '11': ['#3c51b4', '#93a4f4'], // [cornflower.shade20, cornflower.tint30],\n '12': ['#ad006a', '#ee5fb7'], // [hotPink.shade20, hotPink.tint30],\n '13': ['#026467', '#4cb4b7'], // [teal.shade20, teal.tint30],\n '14': ['#674c8c', '#a083c9'], // [orchid.shade20, orchid.tint20],\n '15': ['#0e7a0b', '#27ac22'], // [lightGreen.shade20, lightGreen.tint10],\n '16': ['#2c72a8', '#4fa1e1'], // [lightBlue.shade20, lightBlue.tint10],\n '17': ['#9a3d0c', '#d77440'], // [pumpkin.shade20, pumpkin.tint20],\n '18': ['#405f14', '#73aa24'], // [lime.shade30, lime.primary],\n '19': ['#863593', '#c36bd1'], // [lilac.shade20, lilac.tint20],\n '20': ['#6d5700', '#d0b232'], // [gold.shade30, gold.tint20],\n '21': ['#4f6bed'], // [cornflower.primary],\n '22': ['#ea38a6'], // [hotPink.tint20],\n '23': ['#038387'], // [teal.primary],\n '24': ['#8764b8'], // [orchid.primary],\n '25': ['#11910d'], // [lightGreen.shade10],\n '26': ['#3487c7'], // [lightBlue.shade10],\n '27': ['#d06228'], // [pumpkin.tint10],\n '28': ['#689920'], // [lime.shade10],\n '29': ['#ba58c9'], // [lilac.tint10],\n '30': ['#937700', '#c19c00'], // [gold.shade20, gold.primary],\n '31': ['#2c3c85', '#c8d1fa'], // [cornflower.shade30, cornflower.tint40],\n '32': ['#7f004e', '#f7adda'], // [hotPink.shade30, hotPink.tint40],\n '33': ['#02494c', '#9bd9db'], // [teal.shade30, teal.tint40],\n '34': ['#4c3867', '#b29ad4'], // [orchid.shade30, orchid.tint30],\n '35': ['#0b5a08', '#a7e3a5'], // [lightGreen.shade30, lightGreen.tint40],\n '36': ['#20547c', '#83bdeb'], // [lightBlue.shade30, lightBlue.tint30],\n '37': ['#712d09', '#df8e64'], // [pumpkin.shade30, pumpkin.tint30],\n '38': ['#23330b', '#a4cc6c'], // [lime.shade40, lime.tint30],\n '39': ['#63276d', '#cf87da'], // [lilac.shade30, lilac.tint30],\n '40': ['#3a2f00', '#dac157'], // [gold.shade40, gold.tint30],\n};\n\nconst SemanticPalette: Palette = {\n info: ['#015cda'],\n disabled: ['#dbdbdb', '#4d4d4d'], // [grey[86], grey[30]]\n highError: ['#6e0811', '#cc2635'], // [cranberry.shade30, cranberry.tint10],\n error: ['#c50f1f', '#dc626d'], // [cranberry.primary, cranberry.tint30],\n warning: ['#f7630c', '#f87528'], // [orange.primary, orange.tint10],\n success: ['#107c10', '#54b054'], // [green.primary, green.tint30],\n highSuccess: ['#094509', '#218c21'], // [green.shade30, green.tint10],\n};\n\nconst Colors: { [key: string]: Palette } = {\n qualitative: QualitativePalette,\n semantic: SemanticPalette,\n};\n\nconst QUALITATIVE_COLORS = Object.values(QualitativePalette);\nconst TOKENS = Object.values(DataVizPalette);\n\nconst getThemeSpecificColor = (colors: string[], isDarkTheme: boolean): string => {\n if (colors.length === 0) {\n return '';\n }\n const colorIdx = Number(isDarkTheme);\n if (colorIdx < colors.length) {\n return colors[colorIdx];\n }\n return colors[0];\n};\n\nexport const getNextColor = (index: number, offset: number = 0, isDarkTheme: boolean = false): string => {\n const colors = QUALITATIVE_COLORS[(index + offset) % QUALITATIVE_COLORS.length];\n return getThemeSpecificColor(colors, isDarkTheme);\n};\n\nexport const getColorFromToken = (token: string, isDarkTheme: boolean = false): string => {\n if (TOKENS.indexOf(token) >= 0) {\n const [paletteName, colorCode] = token.split('.');\n const colors = Colors[paletteName][colorCode];\n return getThemeSpecificColor(colors, isDarkTheme);\n }\n return token;\n};\n\n//For reference to how these numbers are calculated, refer https://www.w3.org/TR/WCAG/#dfn-contrast-ratio\nconst rgbLrgb1 = (v: number): number => {\n return v <= 0.04045 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4;\n};\n\nconst rgbLrgb = ({ r, g, b }: { r: number; g: number; b: number }): { r: number; g: number; b: number } => {\n return {\n r: rgbLrgb1(r / 255),\n g: rgbLrgb1(g / 255),\n b: rgbLrgb1(b / 255),\n };\n};\n\nconst lrgbLuminance = ({ r, g, b }: { r: number; g: number; b: number }): number => {\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nexport const getColorContrast = (c1: string, c2: string): number => {\n const l1 = lrgbLuminance(rgbLrgb(d3Rgb(c1)));\n const l2 = lrgbLuminance(rgbLrgb(d3Rgb(c2)));\n return (Math.max(l1, l2) + 0.05) / (Math.min(l1, l2) + 0.05);\n};\n\nexport const getInvertedTextColor = (color: string, isDarkTheme: boolean = false): string => {\n return color === tokens.colorNeutralForeground1 ? tokens.colorNeutralBackground1 : tokens.colorNeutralForeground1;\n};\n\nexport function getContrastTextColor(backgroundColor: string, isDarkTheme: boolean = false): string {\n let textColor = tokens.colorNeutralForeground1;\n const contrastRatio = getColorContrast(textColor, backgroundColor);\n if (contrastRatio < 3) {\n textColor = getInvertedTextColor(textColor, isDarkTheme);\n }\n return textColor;\n}\n"],"names":["tokens","rgb","d3Rgb","DataVizPalette","color1","color2","color3","color4","color5","color6","color7","color8","color9","color10","color11","color12","color13","color14","color15","color16","color17","color18","color19","color20","color21","color22","color23","color24","color25","color26","color27","color28","color29","color30","color31","color32","color33","color34","color35","color36","color37","color38","color39","color40","info","disabled","highError","error","warning","success","highSuccess","QualitativePalette","SemanticPalette","Colors","qualitative","semantic","QUALITATIVE_COLORS","Object","values","TOKENS","getThemeSpecificColor","colors","isDarkTheme","length","colorIdx","Number","getNextColor","index","offset","getColorFromToken","token","indexOf","paletteName","colorCode","split","rgbLrgb1","v","rgbLrgb","r","g","b","lrgbLuminance","getColorContrast","c1","c2","l1","l2","Math","max","min","getInvertedTextColor","color","colorNeutralForeground1","colorNeutralBackground1","getContrastTextColor","backgroundColor","textColor","contrastRatio"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,OAAOC,KAAK,QAAQ,WAAW;AAExC,OAAO,MAAMC,iBAAiB;IAC5BC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,SAAS;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UAAUA,IAAI,QAAQ,AAAC,CAAA,AAACA,CAAAA,IAAI,KAAI,IAAK,KAAI,KAAM;AAC7D;AAEA,MAAMC,UAAU,CAAC,EAAEC,CAAC,EAAEC,CAAC,EAAEC,CAAC,EAAuC;IAC/D,OAAO;QACLF,GAAGH,SAASG,IAAI;QAChBC,GAAGJ,SAASI,IAAI;QAChBC,GAAGL,SAASK,IAAI;IAClB;AACF;AAEA,MAAMC,gBAAgB,CAAC,EAAEH,CAAC,EAAEC,CAAC,EAAEC,CAAC,EAAuC;IACrE,OAAO,SAASF,IAAI,SAASC,IAAI,SAASC;AAC5C;AAEA,OAAO,MAAME,mBAAmB,CAACC,IAAYC;IAC3C,MAAMC,KAAKJ,cAAcJ,QAAQ3E,MAAMiF;IACvC,MAAMG,KAAKL,cAAcJ,QAAQ3E,MAAMkF;IACvC,OAAO,AAACG,CAAAA,KAAKC,GAAG,CAACH,IAAIC,MAAM,IAAG,IAAMC,CAAAA,KAAKE,GAAG,CAACJ,IAAIC,MAAM,IAAG;AAC5D,EAAE;AAEF,OAAO,MAAMI,uBAAuB,CAACC,OAAe7B,cAAuB,KAAK;IAC9E,OAAO6B,UAAU3F,OAAO4F,uBAAuB,GAAG5F,OAAO6F,uBAAuB,GAAG7F,OAAO4F,uBAAuB;AACnH,EAAE;AAEF,OAAO,SAASE,qBAAqBC,eAAuB,EAAEjC,cAAuB,KAAK;IACxF,IAAIkC,YAAYhG,OAAO4F,uBAAuB;IAC9C,MAAMK,gBAAgBf,iBAAiBc,WAAWD;IAClD,IAAIE,gBAAgB,GAAG;QACrBD,YAAYN,qBAAqBM,WAAWlC;IAC9C;IACA,OAAOkC;AACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["FunnelChart.ts"],"sourcesContent":["export * from './components/FunnelChart/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|