@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/VegaDeclarativeChart';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/VegaDeclarativeChart.ts"],"sourcesContent":["export * from './components/VegaDeclarativeChart';\n"],"names":[],"mappings":"AAAA,cAAc,oCAAoC"}
|
|
@@ -11,7 +11,7 @@ import { find, findCalloutPoints } from '../../utilities/index';
|
|
|
11
11
|
import { CartesianChart } from '../../index';
|
|
12
12
|
import { EventsAnnotation } from './eventAnnotation/EventAnnotation';
|
|
13
13
|
import { tokens } from '@fluentui/react-theme';
|
|
14
|
-
import { calloutData, ChartTypes, getXAxisType, XAxisTypes, Points, pointTypes, getTypeOfAxis, getNextColor, getColorFromToken, findNumericMinMaxOfY, createNumericYAxis, domainRangeOfDateForAreaLineScatterVerticalBarCharts, domainRangeOfNumericForAreaLineScatterCharts, createStringYAxis, useRtl, getCurveFactory, isScatterPolarSeries, getDomainPaddingForMarkers, isPlottable, getRangeForScatterMarkerSize } from '../../utilities/index';
|
|
14
|
+
import { calloutData, ChartTypes, getXAxisType, XAxisTypes, Points, pointTypes, getTypeOfAxis, getNextColor, getColorFromToken, findNumericMinMaxOfY, createNumericYAxis, domainRangeOfDateForAreaLineScatterVerticalBarCharts, domainRangeOfNumericForAreaLineScatterCharts, createStringYAxis, useRtl, getCurveFactory, isScatterPolarSeries, getDomainPaddingForMarkers, isPlottable, getRangeForScatterMarkerSize, calculateMarkerRadius } from '../../utilities/index';
|
|
15
15
|
import { renderScatterPolarCategoryLabels } from '../../utilities/scatterpolar-utils';
|
|
16
16
|
import { formatDateToLocaleString } from '@fluentui/chart-utilities';
|
|
17
17
|
import { useImageExport } from '../../utilities/hooks';
|
|
@@ -446,7 +446,14 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
446
446
|
}, /*#__PURE__*/ React.createElement("circle", {
|
|
447
447
|
id: circleId,
|
|
448
448
|
key: circleId,
|
|
449
|
-
r:
|
|
449
|
+
r: calculateMarkerRadius({
|
|
450
|
+
pointMarkerSize: currentMarkerSize,
|
|
451
|
+
minMarkerSize: 0,
|
|
452
|
+
maxMarkerSize,
|
|
453
|
+
extraMaxPixels,
|
|
454
|
+
isContinuousXY: true,
|
|
455
|
+
isActive: activePoint === circleId
|
|
456
|
+
}),
|
|
450
457
|
cx: xPoint,
|
|
451
458
|
cy: yPoint,
|
|
452
459
|
fill: activePoint === circleId ? tokens.colorNeutralBackground1 : lineColor,
|
|
@@ -578,7 +585,14 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
578
585
|
var _points_i_data_k_text;
|
|
579
586
|
pointsForLine.push(/*#__PURE__*/ React.createElement("circle", {
|
|
580
587
|
key: `${_circleId}_${i}_${k}_marker`,
|
|
581
|
-
r:
|
|
588
|
+
r: calculateMarkerRadius({
|
|
589
|
+
pointMarkerSize: markerSize,
|
|
590
|
+
minMarkerSize: 0,
|
|
591
|
+
maxMarkerSize,
|
|
592
|
+
extraMaxPixels,
|
|
593
|
+
isContinuousXY: true,
|
|
594
|
+
isActive: activePoint === _circleId
|
|
595
|
+
}),
|
|
582
596
|
cx: xPoint,
|
|
583
597
|
cy: yPoint,
|
|
584
598
|
fill: activePoint === _circleId ? tokens.colorNeutralBackground1 : perPointColor || ((_points_i = _points[i]) === null || _points_i === void 0 ? void 0 : _points_i.color) || lineColor,
|
|
@@ -625,7 +639,14 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
625
639
|
pointsForLine.push(((_points_i_lineOptions15 = _points[i].lineOptions) === null || _points_i_lineOptions15 === void 0 ? void 0 : (_points_i_lineOptions_mode3 = _points_i_lineOptions15.mode) === null || _points_i_lineOptions_mode3 === void 0 ? void 0 : _points_i_lineOptions_mode3.includes('markers')) || supportsTextMode ? /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("circle", {
|
|
626
640
|
id: circleId,
|
|
627
641
|
key: circleId,
|
|
628
|
-
r:
|
|
642
|
+
r: calculateMarkerRadius({
|
|
643
|
+
pointMarkerSize: currentMarkerSize,
|
|
644
|
+
minMarkerSize: 0,
|
|
645
|
+
maxMarkerSize,
|
|
646
|
+
extraMaxPixels,
|
|
647
|
+
isContinuousXY: true,
|
|
648
|
+
isActive: activePoint === circleId
|
|
649
|
+
}),
|
|
629
650
|
cx: xPoint1,
|
|
630
651
|
cy: yPoint1,
|
|
631
652
|
tabIndex: isLegendSelected ? 0 : undefined,
|
|
@@ -644,7 +665,13 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
644
665
|
}), !_isScatterPolar && supportsTextMode && text && /*#__PURE__*/ React.createElement("text", {
|
|
645
666
|
key: `${circleId}-label`,
|
|
646
667
|
x: xPoint1,
|
|
647
|
-
y: yPoint1 +
|
|
668
|
+
y: yPoint1 + calculateMarkerRadius({
|
|
669
|
+
pointMarkerSize: currentMarkerSize,
|
|
670
|
+
minMarkerSize: 0,
|
|
671
|
+
maxMarkerSize,
|
|
672
|
+
extraMaxPixels,
|
|
673
|
+
isContinuousXY: true
|
|
674
|
+
}) + 12,
|
|
648
675
|
className: classes.markerLabel,
|
|
649
676
|
opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01
|
|
650
677
|
}, text)) : /*#__PURE__*/ React.createElement("path", {
|
|
@@ -686,7 +713,14 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
686
713
|
}, ((_points_i_lineOptions17 = _points[i].lineOptions) === null || _points_i_lineOptions17 === void 0 ? void 0 : (_points_i_lineOptions_mode5 = _points_i_lineOptions17.mode) === null || _points_i_lineOptions_mode5 === void 0 ? void 0 : _points_i_lineOptions_mode5.includes('markers')) || lastSupportsTextMode ? /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("circle", {
|
|
687
714
|
id: lastCircleId,
|
|
688
715
|
key: lastCircleId,
|
|
689
|
-
r:
|
|
716
|
+
r: calculateMarkerRadius({
|
|
717
|
+
pointMarkerSize: currentMarkerSize,
|
|
718
|
+
minMarkerSize: 0,
|
|
719
|
+
maxMarkerSize,
|
|
720
|
+
extraMaxPixels,
|
|
721
|
+
isContinuousXY: true,
|
|
722
|
+
isActive: activePoint === lastCircleId
|
|
723
|
+
}),
|
|
690
724
|
cx: xPoint2,
|
|
691
725
|
cy: yPoint2,
|
|
692
726
|
tabIndex: isLegendSelected ? 0 : undefined,
|
|
@@ -705,7 +739,13 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
705
739
|
}), !_isScatterPolar && lastSupportsTextMode && lastText && /*#__PURE__*/ React.createElement("text", {
|
|
706
740
|
key: `${lastCircleId}-label`,
|
|
707
741
|
x: xPoint2,
|
|
708
|
-
y: yPoint2 +
|
|
742
|
+
y: yPoint2 + calculateMarkerRadius({
|
|
743
|
+
pointMarkerSize: currentMarkerSize,
|
|
744
|
+
minMarkerSize: 0,
|
|
745
|
+
maxMarkerSize,
|
|
746
|
+
extraMaxPixels,
|
|
747
|
+
isContinuousXY: true
|
|
748
|
+
}) + 12,
|
|
709
749
|
className: classes.markerLabel
|
|
710
750
|
}, text)) : /*#__PURE__*/ React.createElement("path", {
|
|
711
751
|
id: lastCircleId,
|