Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
[Chore] Pass onBruch, filter and datasets through range slide to plot (#2220)
Igor D41c80993c345
diff --git a/src/components/src/common/range-plot.tsx b/src/components/src/common/range-plot.tsxindex 59ce7d5d6..839fd32e5 100644--- a/src/components/src/common/range-plot.tsx+++ b/src/components/src/common/range-plot.tsx@@ -25,7 +25,8 @@ import HistogramPlotFactory from './histogram-plot';import LineChartFactory, {HoverDP} from './line-chart';import {isTest, hasMobileWidth} from '@kepler.gl/utils';import {breakPointValues} from '@kepler.gl/styles';-import {LineChart} from '@kepler.gl/types';+import {LineChart, Filter} from '@kepler.gl/types';+import {Datasets} from '@kepler.gl/table';const StyledRangePlot = styled.div`margin-bottom: ${props => props.theme.sliderBarHeight}px;@@ -47,6 +48,10 @@ interface RangePlotProps {timeFormat?: string;timezone?: string | null;playbackControlWidth?: number;++ animationWindow?: string;+ filter?: Filter;+ datasets?: Datasets;}RangePlotFactory.deps = [RangeBrushFactory, HistogramPlotFactory, LineChartFactory];@@ -127,6 +132,7 @@ export default function RangePlotFactory(onMouseMove,hoveredDP,isRanged,+ onBrush,...chartProps};diff --git a/src/components/src/common/range-slider.tsx b/src/components/src/common/range-slider.tsxindex a2f7d90a8..9a9ae3cf6 100644--- a/src/components/src/common/range-slider.tsx+++ b/src/components/src/common/range-slider.tsx@@ -27,7 +27,8 @@ import Slider from './slider/slider';import {Input} from './styled-components';import {observeDimensions, unobserveDimensions, roundValToStep, clamp} from '@kepler.gl/utils';-import {LineChart} from '@kepler.gl/types';+import {LineChart, Filter} from '@kepler.gl/types';+import {Datasets} from '@kepler.gl/table';interface SliderInputProps {flush?: boolean;@@ -79,6 +80,10 @@ interface RangeSliderProps {marks?: number[];plotType?: string;plotValue?: number[];++ animationWindow?: string;+ filter?: Filter;+ datasets?: Datasets;}RangeSliderFactory.deps = [RangePlotFactory];@@ -227,7 +232,10 @@ export default function RangeSliderFactory(step,timezone,timeFormat,- playbackControlWidth+ playbackControlWidth,+ animationWindow,+ filter,+ datasets} = this.props;const {width} = this.state;@@ -249,6 +257,9 @@ export default function RangeSliderFactory(isEnlarged={this.props.isEnlarged}onBrush={(val0, val1) => onChange([val0, val1])}marks={this.props.marks}+ animationWindow={animationWindow}+ filter={filter}+ datasets={datasets}range={range}value={this.props.plotValue || this.filterValueSelector(this.props)}width={plotWidth}