@fluentui/react-charts 9.3.12 → 9.3.14
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 +25 -2
- package/dist/index.d.ts +859 -0
- package/lib/VegaDeclarativeChart.js +1 -0
- package/lib/VegaDeclarativeChart.js.map +1 -0
- package/lib/components/LineChart/LineChart.js +47 -7
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.js +12 -12
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js +405 -0
- package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js.map +1 -0
- package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js +20 -0
- package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js.map +1 -0
- package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js +415 -0
- package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js.map +1 -0
- package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js +537 -0
- package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +1 -0
- package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +3279 -0
- package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +1 -0
- package/lib/components/VegaDeclarativeChart/VegaLiteTypes.js +28 -0
- package/lib/components/VegaDeclarativeChart/VegaLiteTypes.js.map +1 -0
- package/lib/components/VegaDeclarativeChart/index.js +1 -0
- package/lib/components/VegaDeclarativeChart/index.js.map +1 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +5 -2
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/utilities/utilities.js +41 -0
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/VegaDeclarativeChart.js +6 -0
- package/lib-commonjs/VegaDeclarativeChart.js.map +1 -0
- package/lib-commonjs/components/LineChart/LineChart.js +46 -6
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +11 -11
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChart.js +274 -0
- package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChart.js.map +1 -0
- package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js +35 -0
- package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js.map +1 -0
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.js +412 -0
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.js.map +1 -0
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js +533 -0
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +1 -0
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +3214 -0
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +1 -0
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteTypes.js +31 -0
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteTypes.js.map +1 -0
- package/lib-commonjs/components/VegaDeclarativeChart/index.js +6 -0
- package/lib-commonjs/components/VegaDeclarativeChart/index.js.map +1 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +4 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/index.js +1 -0
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +33 -0
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/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';\nexport * from './GanttChart';\nexport * from './ChartTable';\nexport * from './AnnotationOnlyChart';\nexport * from './PolarChart';\n"],"names":[],"mappings":";;;;;uBAAc,uBAAuB;uBACvB,eAAe;uBACf,YAAY;uBACZ,cAAc;uBACd,qBAAqB;uBACrB,4BAA4B;uBAC5B,4BAA4B;uBAC5B,mBAAmB;uBACnB,gBAAgB;uBAChB,cAAc;uBACd,iBAAiB;uBACjB,eAAe;uBACf,qBAAqB;uBACrB,YAAY;uBACZ,wBAAwB;uBACxB,qBAAqB;uBACrB,cAAc;uBACd,+BAA+B;uBAC/B,iBAAiB;uBACjB,gBAAgB;uBAChB,gBAAgB;uBAChB,eAAe;uBACf,eAAe;uBACf,wBAAwB;uBACxB,eAAe"}
|
|
1
|
+
{"version":3,"sources":["../src/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';\nexport * from './GanttChart';\nexport * from './ChartTable';\nexport * from './AnnotationOnlyChart';\nexport * from './PolarChart';\nexport * from './VegaDeclarativeChart';\n"],"names":[],"mappings":";;;;;uBAAc,uBAAuB;uBACvB,eAAe;uBACf,YAAY;uBACZ,cAAc;uBACd,qBAAqB;uBACrB,4BAA4B;uBAC5B,4BAA4B;uBAC5B,mBAAmB;uBACnB,gBAAgB;uBAChB,cAAc;uBACd,iBAAiB;uBACjB,eAAe;uBACf,qBAAqB;uBACrB,YAAY;uBACZ,wBAAwB;uBACxB,qBAAqB;uBACrB,cAAc;uBACd,+BAA+B;uBAC/B,iBAAiB;uBACjB,gBAAgB;uBAChB,gBAAgB;uBAChB,eAAe;uBACf,eAAe;uBACf,wBAAwB;uBACxB,eAAe;uBACf,yBAAyB"}
|
|
@@ -58,6 +58,9 @@ _export(exports, {
|
|
|
58
58
|
calculateLongestLabelWidth: function() {
|
|
59
59
|
return calculateLongestLabelWidth;
|
|
60
60
|
},
|
|
61
|
+
calculateMarkerRadius: function() {
|
|
62
|
+
return calculateMarkerRadius;
|
|
63
|
+
},
|
|
61
64
|
calculatePrecision: function() {
|
|
62
65
|
return calculatePrecision;
|
|
63
66
|
},
|
|
@@ -202,6 +205,9 @@ _export(exports, {
|
|
|
202
205
|
isPlottable: function() {
|
|
203
206
|
return isPlottable;
|
|
204
207
|
},
|
|
208
|
+
isSafeUrl: function() {
|
|
209
|
+
return isSafeUrl;
|
|
210
|
+
},
|
|
205
211
|
isScalePaddingDefined: function() {
|
|
206
212
|
return isScalePaddingDefined;
|
|
207
213
|
},
|
|
@@ -1759,6 +1765,27 @@ const getScatterXDomainExtent = (points, scaleType)=>{
|
|
|
1759
1765
|
xMax
|
|
1760
1766
|
];
|
|
1761
1767
|
};
|
|
1768
|
+
const calculateMarkerRadius = ({ pointMarkerSize, minMarkerSize, maxMarkerSize, extraMaxPixels, isContinuousXY, isActive = false, defaultRadius = 3.5, activeRadius = 5.5, minRadius = 4 })=>{
|
|
1769
|
+
const minPixel = 4;
|
|
1770
|
+
const maxPixel = 16;
|
|
1771
|
+
// If no marker size is specified, use default or active radius
|
|
1772
|
+
if (!pointMarkerSize) {
|
|
1773
|
+
return isActive ? activeRadius : defaultRadius;
|
|
1774
|
+
}
|
|
1775
|
+
let radius;
|
|
1776
|
+
if (isContinuousXY && maxMarkerSize !== 0) {
|
|
1777
|
+
// For continuous axes: scale markers based on available space
|
|
1778
|
+
radius = maxMarkerSize < extraMaxPixels ? pointMarkerSize : pointMarkerSize / maxMarkerSize * extraMaxPixels;
|
|
1779
|
+
} else if (!isContinuousXY && maxMarkerSize !== minMarkerSize) {
|
|
1780
|
+
// For categorical axes: normalize to pixel range [minPixel, maxPixel]
|
|
1781
|
+
radius = minPixel + (pointMarkerSize - minMarkerSize) / (maxMarkerSize - minMarkerSize) * (maxPixel - minPixel);
|
|
1782
|
+
} else {
|
|
1783
|
+
// Fallback to default/active radius
|
|
1784
|
+
return isActive ? activeRadius : defaultRadius;
|
|
1785
|
+
}
|
|
1786
|
+
// Ensure minimum radius for visibility
|
|
1787
|
+
return Math.max(radius, minRadius);
|
|
1788
|
+
};
|
|
1762
1789
|
const getRangeForScatterMarkerSize = ({ data, xScale, yScalePrimary, yScaleSecondary, useSecondaryYScale, xScaleType, yScaleType: primaryYScaleType, secondaryYScaleType })=>{
|
|
1763
1790
|
// Note: This function is executed after the scale is created, so the actual padding can be
|
|
1764
1791
|
// obtained by calculating the difference between the respective minimums or maximums of the
|
|
@@ -1990,3 +2017,9 @@ const truncateTextToFitWidth = (text, maxWidth, measure)=>{
|
|
|
1990
2017
|
}
|
|
1991
2018
|
return text.slice(0, lo) + '...';
|
|
1992
2019
|
};
|
|
2020
|
+
function isSafeUrl(href) {
|
|
2021
|
+
if (/^[a-z][a-z0-9+.-]*:/i.test(href)) {
|
|
2022
|
+
return /^https?:/i.test(href);
|
|
2023
|
+
}
|
|
2024
|
+
return true;
|
|
2025
|
+
}
|