@mui/x-charts 8.13.1 → 8.14.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/BarChart/BarChart.js +44 -36
- package/BarChart/useBarPlotData.js +20 -33
- package/CHANGELOG.md +204 -1
- package/ChartContainer/ChartContainer.js +68 -56
- package/ChartsTooltip/ChartsTooltipContainer.js +2 -0
- package/ChartsXAxis/useAxisTicksProps.d.ts +197 -355
- package/ChartsYAxis/useAxisTicksProps.d.ts +197 -355
- package/Gauge/Gauge.js +2 -9
- package/Gauge/GaugeReferenceArc.d.ts +4 -1
- package/Gauge/GaugeReferenceArc.js +12 -3
- package/Gauge/GaugeValueArc.d.ts +4 -1
- package/Gauge/GaugeValueArc.js +16 -8
- package/Gauge/GaugeValueText.js +3 -1
- package/LineChart/LineChart.js +44 -36
- package/PieChart/PieArc.d.ts +18 -4
- package/PieChart/PieArc.js +11 -5
- package/PieChart/PieArcPlot.js +3 -1
- package/ScatterChart/ScatterChart.js +44 -36
- package/ScatterChart/seriesConfig/seriesProcessor.js +1 -1
- package/SparkLineChart/SparkLineChart.js +44 -36
- package/esm/BarChart/BarChart.js +44 -36
- package/esm/BarChart/useBarPlotData.js +20 -33
- package/esm/ChartContainer/ChartContainer.js +68 -56
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +2 -0
- package/esm/ChartsXAxis/useAxisTicksProps.d.ts +197 -355
- package/esm/ChartsYAxis/useAxisTicksProps.d.ts +197 -355
- package/esm/Gauge/Gauge.js +2 -9
- package/esm/Gauge/GaugeReferenceArc.d.ts +4 -1
- package/esm/Gauge/GaugeReferenceArc.js +11 -2
- package/esm/Gauge/GaugeValueArc.d.ts +4 -1
- package/esm/Gauge/GaugeValueArc.js +16 -8
- package/esm/Gauge/GaugeValueText.js +3 -1
- package/esm/LineChart/LineChart.js +44 -36
- package/esm/PieChart/PieArc.d.ts +18 -4
- package/esm/PieChart/PieArc.js +11 -5
- package/esm/PieChart/PieArcPlot.js +3 -1
- package/esm/ScatterChart/ScatterChart.js +44 -36
- package/esm/ScatterChart/seriesConfig/seriesProcessor.js +1 -1
- package/esm/SparkLineChart/SparkLineChart.js +44 -36
- package/esm/hooks/animation/useAnimate.js +5 -3
- package/esm/hooks/useScale.d.ts +5 -1
- package/esm/index.js +1 -1
- package/esm/internals/Flatbush.bench.d.ts +1 -0
- package/esm/internals/Flatbush.bench.js +42 -0
- package/esm/internals/Flatbush.d.ts +63 -0
- package/esm/internals/Flatbush.js +468 -0
- package/esm/internals/animation/useAnimateInternal.d.ts +1 -1
- package/esm/internals/animation/useAnimateInternal.js +1 -1
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +8 -8
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +4 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +9 -11
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -28
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +4 -5
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +3 -24
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +20 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +77 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +4 -65
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +7 -104
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +6 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +3 -6
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +31 -39
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +185 -6
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +199 -47
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +4 -1
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +5 -0
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +33 -0
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +40 -81
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +10 -3
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -2
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +6 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +5 -1
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +9 -1
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +10 -1
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +2 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +2 -2
- package/esm/internals/scaleGuards.d.ts +12 -6
- package/esm/internals/symlogScale.js +5 -0
- package/esm/locales/enUS.js +4 -4
- package/esm/locales/ptBR.js +97 -99
- package/esm/models/axis.d.ts +39 -17
- package/esm/models/axis.js +3 -0
- package/esm/models/seriesType/scatter.d.ts +2 -0
- package/esm/themeAugmentation/components.d.ts +3 -0
- package/esm/themeAugmentation/overrides.d.ts +2 -0
- package/hooks/animation/useAnimate.js +4 -3
- package/hooks/useScale.d.ts +5 -1
- package/index.js +1 -1
- package/internals/Flatbush.bench.d.ts +1 -0
- package/internals/Flatbush.bench.js +44 -0
- package/internals/Flatbush.d.ts +63 -0
- package/internals/Flatbush.js +477 -0
- package/internals/animation/useAnimateInternal.d.ts +1 -1
- package/internals/animation/useAnimateInternal.js +1 -1
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +7 -7
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +4 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +9 -11
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -28
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +4 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +3 -25
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +20 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +84 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +4 -65
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +8 -108
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +6 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +3 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +29 -37
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +185 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +200 -47
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +4 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +5 -0
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +39 -0
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +39 -80
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +10 -3
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -2
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +6 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +5 -1
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +9 -1
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +11 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +2 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +1 -1
- package/internals/scaleGuards.d.ts +12 -6
- package/internals/symlogScale.js +5 -0
- package/locales/enUS.js +4 -4
- package/locales/ptBR.js +97 -99
- package/models/axis.d.ts +39 -17
- package/models/axis.js +4 -0
- package/models/seriesType/scatter.d.ts +2 -0
- package/package.json +7 -6
- package/themeAugmentation/components.d.ts +3 -0
- package/themeAugmentation/overrides.d.ts +2 -0
|
@@ -260,8 +260,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
260
260
|
ignoreTooltip: PropTypes.bool,
|
|
261
261
|
label: PropTypes.string,
|
|
262
262
|
labelStyle: PropTypes.object,
|
|
263
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
264
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
265
263
|
offset: PropTypes.number,
|
|
266
264
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
267
265
|
reverse: PropTypes.bool,
|
|
@@ -314,8 +312,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
314
312
|
ignoreTooltip: PropTypes.bool,
|
|
315
313
|
label: PropTypes.string,
|
|
316
314
|
labelStyle: PropTypes.object,
|
|
317
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
318
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
319
315
|
offset: PropTypes.number,
|
|
320
316
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
321
317
|
reverse: PropTypes.bool,
|
|
@@ -358,8 +354,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
358
354
|
ignoreTooltip: PropTypes.bool,
|
|
359
355
|
label: PropTypes.string,
|
|
360
356
|
labelStyle: PropTypes.object,
|
|
361
|
-
max: PropTypes.
|
|
362
|
-
min: PropTypes.
|
|
357
|
+
max: PropTypes.number,
|
|
358
|
+
min: PropTypes.number,
|
|
363
359
|
offset: PropTypes.number,
|
|
364
360
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
365
361
|
reverse: PropTypes.bool,
|
|
@@ -403,8 +399,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
403
399
|
ignoreTooltip: PropTypes.bool,
|
|
404
400
|
label: PropTypes.string,
|
|
405
401
|
labelStyle: PropTypes.object,
|
|
406
|
-
max: PropTypes.
|
|
407
|
-
min: PropTypes.
|
|
402
|
+
max: PropTypes.number,
|
|
403
|
+
min: PropTypes.number,
|
|
408
404
|
offset: PropTypes.number,
|
|
409
405
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
410
406
|
reverse: PropTypes.bool,
|
|
@@ -447,8 +443,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
447
443
|
ignoreTooltip: PropTypes.bool,
|
|
448
444
|
label: PropTypes.string,
|
|
449
445
|
labelStyle: PropTypes.object,
|
|
450
|
-
max: PropTypes.
|
|
451
|
-
min: PropTypes.
|
|
446
|
+
max: PropTypes.number,
|
|
447
|
+
min: PropTypes.number,
|
|
452
448
|
offset: PropTypes.number,
|
|
453
449
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
454
450
|
reverse: PropTypes.bool,
|
|
@@ -491,8 +487,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
491
487
|
ignoreTooltip: PropTypes.bool,
|
|
492
488
|
label: PropTypes.string,
|
|
493
489
|
labelStyle: PropTypes.object,
|
|
494
|
-
max: PropTypes.
|
|
495
|
-
min: PropTypes.
|
|
490
|
+
max: PropTypes.number,
|
|
491
|
+
min: PropTypes.number,
|
|
496
492
|
offset: PropTypes.number,
|
|
497
493
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
498
494
|
reverse: PropTypes.bool,
|
|
@@ -535,8 +531,12 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
535
531
|
ignoreTooltip: PropTypes.bool,
|
|
536
532
|
label: PropTypes.string,
|
|
537
533
|
labelStyle: PropTypes.object,
|
|
538
|
-
max: PropTypes.oneOfType([PropTypes.
|
|
539
|
-
|
|
534
|
+
max: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
535
|
+
valueOf: PropTypes.func.isRequired
|
|
536
|
+
})]),
|
|
537
|
+
min: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
538
|
+
valueOf: PropTypes.func.isRequired
|
|
539
|
+
})]),
|
|
540
540
|
offset: PropTypes.number,
|
|
541
541
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
542
542
|
reverse: PropTypes.bool,
|
|
@@ -579,8 +579,12 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
579
579
|
ignoreTooltip: PropTypes.bool,
|
|
580
580
|
label: PropTypes.string,
|
|
581
581
|
labelStyle: PropTypes.object,
|
|
582
|
-
max: PropTypes.oneOfType([PropTypes.
|
|
583
|
-
|
|
582
|
+
max: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
583
|
+
valueOf: PropTypes.func.isRequired
|
|
584
|
+
})]),
|
|
585
|
+
min: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
586
|
+
valueOf: PropTypes.func.isRequired
|
|
587
|
+
})]),
|
|
584
588
|
offset: PropTypes.number,
|
|
585
589
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
586
590
|
reverse: PropTypes.bool,
|
|
@@ -623,8 +627,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
623
627
|
ignoreTooltip: PropTypes.bool,
|
|
624
628
|
label: PropTypes.string,
|
|
625
629
|
labelStyle: PropTypes.object,
|
|
626
|
-
max: PropTypes.
|
|
627
|
-
min: PropTypes.
|
|
630
|
+
max: PropTypes.number,
|
|
631
|
+
min: PropTypes.number,
|
|
628
632
|
offset: PropTypes.number,
|
|
629
633
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
630
634
|
reverse: PropTypes.bool,
|
|
@@ -684,8 +688,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
684
688
|
ignoreTooltip: PropTypes.bool,
|
|
685
689
|
label: PropTypes.string,
|
|
686
690
|
labelStyle: PropTypes.object,
|
|
687
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
688
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
689
691
|
offset: PropTypes.number,
|
|
690
692
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
691
693
|
reverse: PropTypes.bool,
|
|
@@ -737,8 +739,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
737
739
|
ignoreTooltip: PropTypes.bool,
|
|
738
740
|
label: PropTypes.string,
|
|
739
741
|
labelStyle: PropTypes.object,
|
|
740
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
741
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
742
742
|
offset: PropTypes.number,
|
|
743
743
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
744
744
|
reverse: PropTypes.bool,
|
|
@@ -780,8 +780,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
780
780
|
ignoreTooltip: PropTypes.bool,
|
|
781
781
|
label: PropTypes.string,
|
|
782
782
|
labelStyle: PropTypes.object,
|
|
783
|
-
max: PropTypes.
|
|
784
|
-
min: PropTypes.
|
|
783
|
+
max: PropTypes.number,
|
|
784
|
+
min: PropTypes.number,
|
|
785
785
|
offset: PropTypes.number,
|
|
786
786
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
787
787
|
reverse: PropTypes.bool,
|
|
@@ -824,8 +824,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
824
824
|
ignoreTooltip: PropTypes.bool,
|
|
825
825
|
label: PropTypes.string,
|
|
826
826
|
labelStyle: PropTypes.object,
|
|
827
|
-
max: PropTypes.
|
|
828
|
-
min: PropTypes.
|
|
827
|
+
max: PropTypes.number,
|
|
828
|
+
min: PropTypes.number,
|
|
829
829
|
offset: PropTypes.number,
|
|
830
830
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
831
831
|
reverse: PropTypes.bool,
|
|
@@ -867,8 +867,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
867
867
|
ignoreTooltip: PropTypes.bool,
|
|
868
868
|
label: PropTypes.string,
|
|
869
869
|
labelStyle: PropTypes.object,
|
|
870
|
-
max: PropTypes.
|
|
871
|
-
min: PropTypes.
|
|
870
|
+
max: PropTypes.number,
|
|
871
|
+
min: PropTypes.number,
|
|
872
872
|
offset: PropTypes.number,
|
|
873
873
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
874
874
|
reverse: PropTypes.bool,
|
|
@@ -910,8 +910,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
910
910
|
ignoreTooltip: PropTypes.bool,
|
|
911
911
|
label: PropTypes.string,
|
|
912
912
|
labelStyle: PropTypes.object,
|
|
913
|
-
max: PropTypes.
|
|
914
|
-
min: PropTypes.
|
|
913
|
+
max: PropTypes.number,
|
|
914
|
+
min: PropTypes.number,
|
|
915
915
|
offset: PropTypes.number,
|
|
916
916
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
917
917
|
reverse: PropTypes.bool,
|
|
@@ -953,8 +953,12 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
953
953
|
ignoreTooltip: PropTypes.bool,
|
|
954
954
|
label: PropTypes.string,
|
|
955
955
|
labelStyle: PropTypes.object,
|
|
956
|
-
max: PropTypes.oneOfType([PropTypes.
|
|
957
|
-
|
|
956
|
+
max: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
957
|
+
valueOf: PropTypes.func.isRequired
|
|
958
|
+
})]),
|
|
959
|
+
min: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
960
|
+
valueOf: PropTypes.func.isRequired
|
|
961
|
+
})]),
|
|
958
962
|
offset: PropTypes.number,
|
|
959
963
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
960
964
|
reverse: PropTypes.bool,
|
|
@@ -996,8 +1000,12 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
996
1000
|
ignoreTooltip: PropTypes.bool,
|
|
997
1001
|
label: PropTypes.string,
|
|
998
1002
|
labelStyle: PropTypes.object,
|
|
999
|
-
max: PropTypes.oneOfType([PropTypes.
|
|
1000
|
-
|
|
1003
|
+
max: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
1004
|
+
valueOf: PropTypes.func.isRequired
|
|
1005
|
+
})]),
|
|
1006
|
+
min: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
1007
|
+
valueOf: PropTypes.func.isRequired
|
|
1008
|
+
})]),
|
|
1001
1009
|
offset: PropTypes.number,
|
|
1002
1010
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
1003
1011
|
reverse: PropTypes.bool,
|
|
@@ -1039,8 +1047,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
1039
1047
|
ignoreTooltip: PropTypes.bool,
|
|
1040
1048
|
label: PropTypes.string,
|
|
1041
1049
|
labelStyle: PropTypes.object,
|
|
1042
|
-
max: PropTypes.
|
|
1043
|
-
min: PropTypes.
|
|
1050
|
+
max: PropTypes.number,
|
|
1051
|
+
min: PropTypes.number,
|
|
1044
1052
|
offset: PropTypes.number,
|
|
1045
1053
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
1046
1054
|
reverse: PropTypes.bool,
|
|
@@ -5,7 +5,7 @@ const seriesProcessor = ({
|
|
|
5
5
|
}, dataset) => {
|
|
6
6
|
const completeSeries = Object.fromEntries(Object.entries(series).map(([seriesId, seriesData]) => {
|
|
7
7
|
const datasetKeys = seriesData?.datasetKeys;
|
|
8
|
-
const missingKeys = ['x', 'y'
|
|
8
|
+
const missingKeys = ['x', 'y'].filter(key => typeof datasetKeys?.[key] !== 'string');
|
|
9
9
|
if (seriesData?.datasetKeys && missingKeys.length > 0) {
|
|
10
10
|
throw new Error([`MUI X Charts: scatter series with id='${seriesId}' has incomplete datasetKeys.`, `Properties ${missingKeys.map(key => `"${key}"`).join(', ')} are missing.`].join('\n'));
|
|
11
11
|
}
|
|
@@ -391,8 +391,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
391
391
|
ignoreTooltip: PropTypes.bool,
|
|
392
392
|
label: PropTypes.string,
|
|
393
393
|
labelStyle: PropTypes.object,
|
|
394
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
395
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
396
394
|
offset: PropTypes.number,
|
|
397
395
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
398
396
|
reverse: PropTypes.bool,
|
|
@@ -445,8 +443,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
445
443
|
ignoreTooltip: PropTypes.bool,
|
|
446
444
|
label: PropTypes.string,
|
|
447
445
|
labelStyle: PropTypes.object,
|
|
448
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
449
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
450
446
|
offset: PropTypes.number,
|
|
451
447
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
452
448
|
reverse: PropTypes.bool,
|
|
@@ -489,8 +485,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
489
485
|
ignoreTooltip: PropTypes.bool,
|
|
490
486
|
label: PropTypes.string,
|
|
491
487
|
labelStyle: PropTypes.object,
|
|
492
|
-
max: PropTypes.
|
|
493
|
-
min: PropTypes.
|
|
488
|
+
max: PropTypes.number,
|
|
489
|
+
min: PropTypes.number,
|
|
494
490
|
offset: PropTypes.number,
|
|
495
491
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
496
492
|
reverse: PropTypes.bool,
|
|
@@ -534,8 +530,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
534
530
|
ignoreTooltip: PropTypes.bool,
|
|
535
531
|
label: PropTypes.string,
|
|
536
532
|
labelStyle: PropTypes.object,
|
|
537
|
-
max: PropTypes.
|
|
538
|
-
min: PropTypes.
|
|
533
|
+
max: PropTypes.number,
|
|
534
|
+
min: PropTypes.number,
|
|
539
535
|
offset: PropTypes.number,
|
|
540
536
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
541
537
|
reverse: PropTypes.bool,
|
|
@@ -578,8 +574,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
578
574
|
ignoreTooltip: PropTypes.bool,
|
|
579
575
|
label: PropTypes.string,
|
|
580
576
|
labelStyle: PropTypes.object,
|
|
581
|
-
max: PropTypes.
|
|
582
|
-
min: PropTypes.
|
|
577
|
+
max: PropTypes.number,
|
|
578
|
+
min: PropTypes.number,
|
|
583
579
|
offset: PropTypes.number,
|
|
584
580
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
585
581
|
reverse: PropTypes.bool,
|
|
@@ -622,8 +618,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
622
618
|
ignoreTooltip: PropTypes.bool,
|
|
623
619
|
label: PropTypes.string,
|
|
624
620
|
labelStyle: PropTypes.object,
|
|
625
|
-
max: PropTypes.
|
|
626
|
-
min: PropTypes.
|
|
621
|
+
max: PropTypes.number,
|
|
622
|
+
min: PropTypes.number,
|
|
627
623
|
offset: PropTypes.number,
|
|
628
624
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
629
625
|
reverse: PropTypes.bool,
|
|
@@ -666,8 +662,12 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
666
662
|
ignoreTooltip: PropTypes.bool,
|
|
667
663
|
label: PropTypes.string,
|
|
668
664
|
labelStyle: PropTypes.object,
|
|
669
|
-
max: PropTypes.oneOfType([PropTypes.
|
|
670
|
-
|
|
665
|
+
max: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
666
|
+
valueOf: PropTypes.func.isRequired
|
|
667
|
+
})]),
|
|
668
|
+
min: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
669
|
+
valueOf: PropTypes.func.isRequired
|
|
670
|
+
})]),
|
|
671
671
|
offset: PropTypes.number,
|
|
672
672
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
673
673
|
reverse: PropTypes.bool,
|
|
@@ -710,8 +710,12 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
710
710
|
ignoreTooltip: PropTypes.bool,
|
|
711
711
|
label: PropTypes.string,
|
|
712
712
|
labelStyle: PropTypes.object,
|
|
713
|
-
max: PropTypes.oneOfType([PropTypes.
|
|
714
|
-
|
|
713
|
+
max: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
714
|
+
valueOf: PropTypes.func.isRequired
|
|
715
|
+
})]),
|
|
716
|
+
min: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
717
|
+
valueOf: PropTypes.func.isRequired
|
|
718
|
+
})]),
|
|
715
719
|
offset: PropTypes.number,
|
|
716
720
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
717
721
|
reverse: PropTypes.bool,
|
|
@@ -754,8 +758,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
754
758
|
ignoreTooltip: PropTypes.bool,
|
|
755
759
|
label: PropTypes.string,
|
|
756
760
|
labelStyle: PropTypes.object,
|
|
757
|
-
max: PropTypes.
|
|
758
|
-
min: PropTypes.
|
|
761
|
+
max: PropTypes.number,
|
|
762
|
+
min: PropTypes.number,
|
|
759
763
|
offset: PropTypes.number,
|
|
760
764
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
761
765
|
reverse: PropTypes.bool,
|
|
@@ -814,8 +818,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
814
818
|
ignoreTooltip: PropTypes.bool,
|
|
815
819
|
label: PropTypes.string,
|
|
816
820
|
labelStyle: PropTypes.object,
|
|
817
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
818
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
819
821
|
offset: PropTypes.number,
|
|
820
822
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
821
823
|
reverse: PropTypes.bool,
|
|
@@ -867,8 +869,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
867
869
|
ignoreTooltip: PropTypes.bool,
|
|
868
870
|
label: PropTypes.string,
|
|
869
871
|
labelStyle: PropTypes.object,
|
|
870
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
871
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
872
872
|
offset: PropTypes.number,
|
|
873
873
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
874
874
|
reverse: PropTypes.bool,
|
|
@@ -910,8 +910,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
910
910
|
ignoreTooltip: PropTypes.bool,
|
|
911
911
|
label: PropTypes.string,
|
|
912
912
|
labelStyle: PropTypes.object,
|
|
913
|
-
max: PropTypes.
|
|
914
|
-
min: PropTypes.
|
|
913
|
+
max: PropTypes.number,
|
|
914
|
+
min: PropTypes.number,
|
|
915
915
|
offset: PropTypes.number,
|
|
916
916
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
917
917
|
reverse: PropTypes.bool,
|
|
@@ -954,8 +954,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
954
954
|
ignoreTooltip: PropTypes.bool,
|
|
955
955
|
label: PropTypes.string,
|
|
956
956
|
labelStyle: PropTypes.object,
|
|
957
|
-
max: PropTypes.
|
|
958
|
-
min: PropTypes.
|
|
957
|
+
max: PropTypes.number,
|
|
958
|
+
min: PropTypes.number,
|
|
959
959
|
offset: PropTypes.number,
|
|
960
960
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
961
961
|
reverse: PropTypes.bool,
|
|
@@ -997,8 +997,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
997
997
|
ignoreTooltip: PropTypes.bool,
|
|
998
998
|
label: PropTypes.string,
|
|
999
999
|
labelStyle: PropTypes.object,
|
|
1000
|
-
max: PropTypes.
|
|
1001
|
-
min: PropTypes.
|
|
1000
|
+
max: PropTypes.number,
|
|
1001
|
+
min: PropTypes.number,
|
|
1002
1002
|
offset: PropTypes.number,
|
|
1003
1003
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
1004
1004
|
reverse: PropTypes.bool,
|
|
@@ -1040,8 +1040,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
1040
1040
|
ignoreTooltip: PropTypes.bool,
|
|
1041
1041
|
label: PropTypes.string,
|
|
1042
1042
|
labelStyle: PropTypes.object,
|
|
1043
|
-
max: PropTypes.
|
|
1044
|
-
min: PropTypes.
|
|
1043
|
+
max: PropTypes.number,
|
|
1044
|
+
min: PropTypes.number,
|
|
1045
1045
|
offset: PropTypes.number,
|
|
1046
1046
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
1047
1047
|
reverse: PropTypes.bool,
|
|
@@ -1083,8 +1083,12 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
1083
1083
|
ignoreTooltip: PropTypes.bool,
|
|
1084
1084
|
label: PropTypes.string,
|
|
1085
1085
|
labelStyle: PropTypes.object,
|
|
1086
|
-
max: PropTypes.oneOfType([PropTypes.
|
|
1087
|
-
|
|
1086
|
+
max: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
1087
|
+
valueOf: PropTypes.func.isRequired
|
|
1088
|
+
})]),
|
|
1089
|
+
min: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
1090
|
+
valueOf: PropTypes.func.isRequired
|
|
1091
|
+
})]),
|
|
1088
1092
|
offset: PropTypes.number,
|
|
1089
1093
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
1090
1094
|
reverse: PropTypes.bool,
|
|
@@ -1126,8 +1130,12 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
1126
1130
|
ignoreTooltip: PropTypes.bool,
|
|
1127
1131
|
label: PropTypes.string,
|
|
1128
1132
|
labelStyle: PropTypes.object,
|
|
1129
|
-
max: PropTypes.oneOfType([PropTypes.
|
|
1130
|
-
|
|
1133
|
+
max: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
1134
|
+
valueOf: PropTypes.func.isRequired
|
|
1135
|
+
})]),
|
|
1136
|
+
min: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
1137
|
+
valueOf: PropTypes.func.isRequired
|
|
1138
|
+
})]),
|
|
1131
1139
|
offset: PropTypes.number,
|
|
1132
1140
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
1133
1141
|
reverse: PropTypes.bool,
|
|
@@ -1169,8 +1177,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
1169
1177
|
ignoreTooltip: PropTypes.bool,
|
|
1170
1178
|
label: PropTypes.string,
|
|
1171
1179
|
labelStyle: PropTypes.object,
|
|
1172
|
-
max: PropTypes.
|
|
1173
|
-
min: PropTypes.
|
|
1180
|
+
max: PropTypes.number,
|
|
1181
|
+
min: PropTypes.number,
|
|
1174
1182
|
offset: PropTypes.number,
|
|
1175
1183
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
1176
1184
|
reverse: PropTypes.bool,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import useForkRef from '@mui/utils/useForkRef';
|
|
3
5
|
import { useAnimateInternal } from "../../internals/animation/useAnimateInternal.js";
|
|
@@ -34,14 +36,14 @@ export function useAnimate(props, {
|
|
|
34
36
|
ref
|
|
35
37
|
}) {
|
|
36
38
|
const transform = transformProps ?? (p => p);
|
|
37
|
-
const animateRef = useAnimateInternal(props, {
|
|
39
|
+
const [animateRef, lastInterpolatedProps] = useAnimateInternal(props, {
|
|
38
40
|
initialProps,
|
|
39
41
|
createInterpolator,
|
|
40
42
|
applyProps: (element, animatedProps) => applyProps(element, transform(animatedProps)),
|
|
41
43
|
skip
|
|
42
44
|
});
|
|
43
|
-
const usedProps = skip ? props :
|
|
44
|
-
return _extends({},
|
|
45
|
+
const usedProps = skip ? transformProps(props) : transformProps(lastInterpolatedProps);
|
|
46
|
+
return _extends({}, usedProps, {
|
|
45
47
|
ref: useForkRef(animateRef, ref)
|
|
46
48
|
});
|
|
47
49
|
}
|
package/esm/hooks/useScale.d.ts
CHANGED
|
@@ -5,7 +5,11 @@ import { AxisId, AxisScaleConfig, D3Scale, ScaleName } from "../models/axis.js";
|
|
|
5
5
|
* @param {D3Scale} scale The scale to use
|
|
6
6
|
* @returns {(value: any) => number} A function that map value to their position
|
|
7
7
|
*/
|
|
8
|
-
export declare function getValueToPositionMapper
|
|
8
|
+
export declare function getValueToPositionMapper<Domain extends {
|
|
9
|
+
toString(): string;
|
|
10
|
+
} = {
|
|
11
|
+
toString(): string;
|
|
12
|
+
}, Range = number>(scale: D3Scale<Domain, Range>): (value: any) => number;
|
|
9
13
|
/**
|
|
10
14
|
* Get the X scale.
|
|
11
15
|
*
|
package/esm/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { describe, bench } from 'vitest';
|
|
2
|
+
import { Flatbush } from "./Flatbush.js";
|
|
3
|
+
const data = [],
|
|
4
|
+
n = 1_000_000;
|
|
5
|
+
|
|
6
|
+
// Generate and position the datapoints in a tangent wave pattern
|
|
7
|
+
for (let i = 0; i < n; i += 1) {
|
|
8
|
+
const theta = Math.random() * 2 * Math.PI;
|
|
9
|
+
const radius = Math.pow(Math.random(), 2) * 100;
|
|
10
|
+
const waveDeviation = (Math.random() - 0.5) * 70;
|
|
11
|
+
const waveValue = Math.tan(theta) * waveDeviation;
|
|
12
|
+
data.push({
|
|
13
|
+
x: 50 + (radius + waveValue) * Math.cos(theta),
|
|
14
|
+
y: 50 + (radius + waveValue) * Math.sin(theta)
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
const flatbush1M = new Flatbush(data.length);
|
|
18
|
+
for (let i = 0; i < data.length; i += 1) {
|
|
19
|
+
flatbush1M.add(data[i].x, data[i].y);
|
|
20
|
+
}
|
|
21
|
+
flatbush1M.finish();
|
|
22
|
+
describe('Flatbush benchmarks', () => {
|
|
23
|
+
describe('add + finish', () => {
|
|
24
|
+
bench('add 1M points + finish', () => {
|
|
25
|
+
const flatbush = new Flatbush(data.length);
|
|
26
|
+
for (let i = 0; i < data.length; i += 1) {
|
|
27
|
+
flatbush.add(data[i].x, data[i].y);
|
|
28
|
+
}
|
|
29
|
+
flatbush.finish();
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
describe('search 1M points', () => {
|
|
33
|
+
bench('search 1M points', () => {
|
|
34
|
+
flatbush1M.search(0.4, 0.4, 0.6, 0.6);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
describe('neighbors 1M points', () => {
|
|
38
|
+
bench('neighbors 1M points', () => {
|
|
39
|
+
flatbush1M.neighbors(0.5, 0.5, 1, 0.04, undefined);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import FlatQueue from 'flatqueue';
|
|
2
|
+
type TypedArrayConstructor = Int8ArrayConstructor | Uint8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor;
|
|
3
|
+
export declare class Flatbush {
|
|
4
|
+
_queue: FlatQueue<number>;
|
|
5
|
+
_boxes: TypedArrayConstructor;
|
|
6
|
+
_indices: Uint16Array | Uint32Array;
|
|
7
|
+
data: ArrayBufferLike;
|
|
8
|
+
numItems: number;
|
|
9
|
+
nodeSize: number;
|
|
10
|
+
_levelBounds: number[];
|
|
11
|
+
byteOffset: number;
|
|
12
|
+
/**
|
|
13
|
+
* Recreate a Flatbush index from raw `ArrayBuffer` or `SharedArrayBuffer` data.
|
|
14
|
+
* @param {ArrayBufferLike} data
|
|
15
|
+
* @param {number} [byteOffset=0] byte offset to the start of the Flatbush buffer in the referenced ArrayBuffer.
|
|
16
|
+
* @returns {Flatbush} index
|
|
17
|
+
*/
|
|
18
|
+
static from(data: any, byteOffset?: number): Flatbush;
|
|
19
|
+
/**
|
|
20
|
+
* Create a Flatbush index that will hold a given number of items.
|
|
21
|
+
* @param {number} numItems
|
|
22
|
+
* @param {number} [nodeSize=16] Size of the tree node (16 by default).
|
|
23
|
+
* @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).
|
|
24
|
+
* @param {ArrayBufferConstructor | SharedArrayBufferConstructor} [ArrayBufferType=ArrayBuffer] The array buffer type used to store data (`ArrayBuffer` by default).
|
|
25
|
+
* @param {ArrayBufferLike} [data] (Only used internally)
|
|
26
|
+
* @param {number} [byteOffset=0] (Only used internally)
|
|
27
|
+
*/
|
|
28
|
+
constructor(numItems: number, nodeSize?: number, ArrayType?: TypedArrayConstructor, ArrayBufferType?: ArrayBufferConstructor | SharedArrayBufferConstructor, data?: ArrayBufferLike, byteOffset?: number);
|
|
29
|
+
/**
|
|
30
|
+
* Add a given rectangle to the index.
|
|
31
|
+
* @param {number} minX
|
|
32
|
+
* @param {number} minY
|
|
33
|
+
* @param {number} maxX
|
|
34
|
+
* @param {number} maxY
|
|
35
|
+
* @returns {number} A zero-based, incremental number that represents the newly added rectangle.
|
|
36
|
+
*/
|
|
37
|
+
add(minX: any, minY: any, maxX?: any, maxY?: any): number;
|
|
38
|
+
/** Perform indexing of the added rectangles. */
|
|
39
|
+
finish(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Search the index by a bounding box.
|
|
42
|
+
* @param {number} minX
|
|
43
|
+
* @param {number} minY
|
|
44
|
+
* @param {number} maxX
|
|
45
|
+
* @param {number} maxY
|
|
46
|
+
* @param {(index: number) => boolean} [filterFn] An optional function for filtering the results.
|
|
47
|
+
* @returns {number[]} An array containing the index, the x coordinate and the y coordinate of the points intersecting or touching the given bounding box.
|
|
48
|
+
*/
|
|
49
|
+
search(minX: number, minY: number, maxX: number, maxY: number, filterFn?: (index: number) => boolean): number[];
|
|
50
|
+
/**
|
|
51
|
+
* Search items in order of distance from the given point.
|
|
52
|
+
* @param x
|
|
53
|
+
* @param y
|
|
54
|
+
* @param [maxResults=Infinity]
|
|
55
|
+
* @param maxDistSq
|
|
56
|
+
* @param [filterFn] An optional function for filtering the results.
|
|
57
|
+
* @param [sqDistFn] An optional function to calculate squared distance from the point to the item.
|
|
58
|
+
* @returns {number[]} An array of indices of items found.
|
|
59
|
+
*/
|
|
60
|
+
neighbors(x: any, y: any, maxResults?: number, maxDistSq?: number, filterFn?: (index: number) => boolean, sqDistFn?: typeof sqDist): number[];
|
|
61
|
+
}
|
|
62
|
+
declare function sqDist(dx: number, dy: number): number;
|
|
63
|
+
export {};
|