@antv/g2 5.0.0-beta.6 → 5.0.0-beta.8
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/dist/g2-lite.min.js +3 -3
- package/dist/g2.min.js +3 -3
- package/esm/api/chart.d.ts +8 -4
- package/esm/api/chart.js +33 -17
- package/esm/api/chart.js.map +1 -1
- package/esm/api/composition/base.d.ts +21 -0
- package/esm/api/composition/base.js +59 -0
- package/esm/api/composition/base.js.map +1 -0
- package/esm/api/composition/facetCircle.d.ts +2 -3
- package/esm/api/composition/facetCircle.js +2 -2
- package/esm/api/composition/facetCircle.js.map +1 -1
- package/esm/api/composition/facetRect.d.ts +2 -3
- package/esm/api/composition/facetRect.js +2 -2
- package/esm/api/composition/facetRect.js.map +1 -1
- package/esm/api/composition/geoPath.d.ts +2 -3
- package/esm/api/composition/geoPath.js +2 -2
- package/esm/api/composition/geoPath.js.map +1 -1
- package/esm/api/composition/geoView.d.ts +2 -3
- package/esm/api/composition/geoView.js +2 -2
- package/esm/api/composition/geoView.js.map +1 -1
- package/esm/api/composition/index.d.ts +2 -1
- package/esm/api/composition/index.js +2 -1
- package/esm/api/composition/index.js.map +1 -1
- package/esm/api/composition/repeatMatrix.d.ts +2 -3
- package/esm/api/composition/repeatMatrix.js +2 -2
- package/esm/api/composition/repeatMatrix.js.map +1 -1
- package/esm/api/composition/spaceFlex.d.ts +2 -3
- package/esm/api/composition/spaceFlex.js +2 -2
- package/esm/api/composition/spaceFlex.js.map +1 -1
- package/esm/api/composition/spaceLayer.d.ts +2 -3
- package/esm/api/composition/spaceLayer.js +2 -2
- package/esm/api/composition/spaceLayer.js.map +1 -1
- package/esm/api/composition/timingKeyframe.d.ts +2 -3
- package/esm/api/composition/timingKeyframe.js +2 -2
- package/esm/api/composition/timingKeyframe.js.map +1 -1
- package/esm/api/composition/view.d.ts +3 -3
- package/esm/api/composition/view.js +4 -4
- package/esm/api/composition/view.js.map +1 -1
- package/esm/api/mark/base.d.ts +22 -0
- package/esm/api/mark/base.js +54 -0
- package/esm/api/mark/base.js.map +1 -0
- package/esm/api/mark/mark.d.ts +29 -29
- package/esm/api/mark/mark.js +27 -27
- package/esm/api/mark/mark.js.map +1 -1
- package/esm/api/node.d.ts +2 -1
- package/esm/api/node.js +8 -9
- package/esm/api/node.js.map +1 -1
- package/esm/api/props.js +0 -20
- package/esm/api/props.js.map +1 -1
- package/esm/component/axis.js +4 -0
- package/esm/component/axis.js.map +1 -1
- package/esm/component/legendContinuous.d.ts +1 -0
- package/esm/component/legendContinuous.js +14 -16
- package/esm/component/legendContinuous.js.map +1 -1
- package/esm/component/slider.js +3 -13
- package/esm/component/slider.js.map +1 -1
- package/esm/geo/{d3-projection.d.ts → d3Projection.d.ts} +0 -0
- package/esm/geo/{d3-projection.js → d3Projection.js} +1 -1
- package/esm/geo/d3Projection.js.map +1 -0
- package/esm/geo/geoView.js +1 -1
- package/esm/geo/geoView.js.map +1 -1
- package/esm/interaction/builtin/elementHighlight.d.ts +2 -0
- package/esm/interaction/builtin/elementHighlightByColor.d.ts +2 -0
- package/esm/interaction/builtin/elementHighlightByX.d.ts +2 -0
- package/esm/interaction/index.d.ts +2 -0
- package/esm/interaction/index.js +2 -0
- package/esm/interaction/index.js.map +1 -1
- package/esm/interaction/native/brushFilter.d.ts +3 -1
- package/esm/interaction/native/brushFilter.js +7 -32
- package/esm/interaction/native/brushFilter.js.map +1 -1
- package/esm/interaction/native/brushXFilter.js +1 -1
- package/esm/interaction/native/brushXFilter.js.map +1 -1
- package/esm/interaction/native/brushYFilter.js +1 -1
- package/esm/interaction/native/brushYFilter.js.map +1 -1
- package/esm/interaction/native/elementHighlight.d.ts +7 -2
- package/esm/interaction/native/elementHighlight.js +72 -18
- package/esm/interaction/native/elementHighlight.js.map +1 -1
- package/esm/interaction/native/elementHighlightByColor.d.ts +4 -1
- package/esm/interaction/native/elementHighlightByColor.js +19 -3
- package/esm/interaction/native/elementHighlightByColor.js.map +1 -1
- package/esm/interaction/native/elementHighlightByX.d.ts +3 -3
- package/esm/interaction/native/elementHighlightByX.js +19 -3
- package/esm/interaction/native/elementHighlightByX.js.map +1 -1
- package/esm/interaction/native/elementSelect.d.ts +1 -1
- package/esm/interaction/native/elementSelect.js +42 -20
- package/esm/interaction/native/elementSelect.js.map +1 -1
- package/esm/interaction/native/elementSelectByColor.js +3 -2
- package/esm/interaction/native/elementSelectByColor.js.map +1 -1
- package/esm/interaction/native/elementSelectByX.js +3 -2
- package/esm/interaction/native/elementSelectByX.js.map +1 -1
- package/esm/interaction/native/legendFilter.d.ts +4 -0
- package/esm/interaction/native/legendFilter.js +7 -4
- package/esm/interaction/native/legendFilter.js.map +1 -1
- package/esm/interaction/native/legendHighlight.d.ts +4 -0
- package/esm/interaction/native/legendHighlight.js +94 -0
- package/esm/interaction/native/legendHighlight.js.map +1 -0
- package/esm/interaction/native/sliderFilter.d.ts +5 -0
- package/esm/interaction/native/sliderFilter.js +87 -0
- package/esm/interaction/native/sliderFilter.js.map +1 -0
- package/esm/interaction/native/tooltip.js +11 -0
- package/esm/interaction/native/tooltip.js.map +1 -1
- package/esm/interaction/native/utils.d.ts +13 -2
- package/esm/interaction/native/utils.js +151 -26
- package/esm/interaction/native/utils.js.map +1 -1
- package/esm/label-transform/overlapDodgeY.js.map +1 -1
- package/esm/mark/area.js +1 -1
- package/esm/mark/area.js.map +1 -1
- package/esm/runtime/component.d.ts +1 -1
- package/esm/runtime/component.js +5 -3
- package/esm/runtime/component.js.map +1 -1
- package/esm/runtime/plot.d.ts +1 -1
- package/esm/runtime/plot.js +68 -29
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/render.js +18 -13
- package/esm/runtime/render.js.map +1 -1
- package/esm/runtime/scale.d.ts +2 -1
- package/esm/runtime/scale.js +7 -0
- package/esm/runtime/scale.js.map +1 -1
- package/esm/runtime/types/options.d.ts +4 -2
- package/esm/shape/area/hv.d.ts +3 -0
- package/esm/shape/area/hv.js +9 -0
- package/esm/shape/area/hv.js.map +1 -0
- package/esm/shape/area/hvh.d.ts +3 -0
- package/esm/shape/area/{step.js → hvh.js} +3 -3
- package/esm/shape/area/hvh.js.map +1 -0
- package/esm/shape/area/vh.d.ts +3 -0
- package/esm/shape/area/vh.js +9 -0
- package/esm/shape/area/vh.js.map +1 -0
- package/esm/shape/index.d.ts +6 -2
- package/esm/shape/index.js +3 -1
- package/esm/shape/index.js.map +1 -1
- package/esm/shape/interval/color.d.ts +1 -0
- package/esm/shape/interval/color.js +65 -53
- package/esm/shape/interval/color.js.map +1 -1
- package/esm/spec/composition.d.ts +0 -3
- package/esm/spec/geometry.d.ts +1 -0
- package/esm/spec/interaction.d.ts +30 -11
- package/esm/spec/transform.d.ts +15 -5
- package/esm/stdlib/index.js +3 -8
- package/esm/stdlib/index.js.map +1 -1
- package/esm/transform/sample.js +42 -26
- package/esm/transform/sample.js.map +1 -1
- package/esm/transform/select.js +1 -13
- package/esm/transform/select.js.map +1 -1
- package/esm/transform/selectX.js +1 -1
- package/esm/transform/selectX.js.map +1 -1
- package/esm/transform/selectY.js +1 -1
- package/esm/transform/selectY.js.map +1 -1
- package/esm/transform/utils/lttb.d.ts +5 -0
- package/esm/transform/utils/lttb.js +56 -0
- package/esm/transform/utils/lttb.js.map +1 -0
- package/esm/utils/event.d.ts +0 -2
- package/esm/utils/event.js +0 -18
- package/esm/utils/event.js.map +1 -1
- package/esm/utils/scale.d.ts +3 -0
- package/esm/utils/scale.js +30 -0
- package/esm/utils/scale.js.map +1 -0
- package/esm/utils/vector.d.ts +1 -1
- package/esm/utils/vector.js +1 -1
- package/lib/api/chart.d.ts +8 -4
- package/lib/api/chart.js +34 -15
- package/lib/api/chart.js.map +1 -1
- package/lib/api/composition/base.d.ts +21 -0
- package/lib/api/composition/base.js +62 -0
- package/lib/api/composition/base.js.map +1 -0
- package/lib/api/composition/facetCircle.d.ts +2 -3
- package/lib/api/composition/facetCircle.js +2 -2
- package/lib/api/composition/facetCircle.js.map +1 -1
- package/lib/api/composition/facetRect.d.ts +2 -3
- package/lib/api/composition/facetRect.js +2 -2
- package/lib/api/composition/facetRect.js.map +1 -1
- package/lib/api/composition/geoPath.d.ts +2 -3
- package/lib/api/composition/geoPath.js +2 -2
- package/lib/api/composition/geoPath.js.map +1 -1
- package/lib/api/composition/geoView.d.ts +2 -3
- package/lib/api/composition/geoView.js +2 -2
- package/lib/api/composition/geoView.js.map +1 -1
- package/lib/api/composition/index.d.ts +2 -1
- package/lib/api/composition/index.js +3 -1
- package/lib/api/composition/index.js.map +1 -1
- package/lib/api/composition/repeatMatrix.d.ts +2 -3
- package/lib/api/composition/repeatMatrix.js +2 -2
- package/lib/api/composition/repeatMatrix.js.map +1 -1
- package/lib/api/composition/spaceFlex.d.ts +2 -3
- package/lib/api/composition/spaceFlex.js +2 -2
- package/lib/api/composition/spaceFlex.js.map +1 -1
- package/lib/api/composition/spaceLayer.d.ts +2 -3
- package/lib/api/composition/spaceLayer.js +2 -2
- package/lib/api/composition/spaceLayer.js.map +1 -1
- package/lib/api/composition/timingKeyframe.d.ts +2 -3
- package/lib/api/composition/timingKeyframe.js +2 -2
- package/lib/api/composition/timingKeyframe.js.map +1 -1
- package/lib/api/composition/view.d.ts +3 -3
- package/lib/api/composition/view.js +4 -4
- package/lib/api/composition/view.js.map +1 -1
- package/lib/api/mark/base.d.ts +22 -0
- package/lib/api/mark/base.js +58 -0
- package/lib/api/mark/base.js.map +1 -0
- package/lib/api/mark/mark.d.ts +29 -29
- package/lib/api/mark/mark.js +27 -27
- package/lib/api/mark/mark.js.map +1 -1
- package/lib/api/node.d.ts +2 -1
- package/lib/api/node.js +8 -9
- package/lib/api/node.js.map +1 -1
- package/lib/api/props.js +0 -20
- package/lib/api/props.js.map +1 -1
- package/lib/component/axis.js +4 -0
- package/lib/component/axis.js.map +1 -1
- package/lib/component/legendContinuous.d.ts +1 -0
- package/lib/component/legendContinuous.js +14 -16
- package/lib/component/legendContinuous.js.map +1 -1
- package/lib/component/slider.js +3 -13
- package/lib/component/slider.js.map +1 -1
- package/lib/geo/{d3-projection.d.ts → d3Projection.d.ts} +0 -0
- package/lib/geo/{d3-projection.js → d3Projection.js} +1 -1
- package/lib/geo/d3Projection.js.map +1 -0
- package/lib/geo/geoView.js +1 -1
- package/lib/geo/geoView.js.map +1 -1
- package/lib/interaction/builtin/elementHighlight.d.ts +2 -0
- package/lib/interaction/builtin/elementHighlightByColor.d.ts +2 -0
- package/lib/interaction/builtin/elementHighlightByX.d.ts +2 -0
- package/lib/interaction/index.d.ts +2 -0
- package/lib/interaction/index.js +5 -1
- package/lib/interaction/index.js.map +1 -1
- package/lib/interaction/native/brushFilter.d.ts +3 -1
- package/lib/interaction/native/brushFilter.js +10 -35
- package/lib/interaction/native/brushFilter.js.map +1 -1
- package/lib/interaction/native/brushXFilter.js +1 -1
- package/lib/interaction/native/brushXFilter.js.map +1 -1
- package/lib/interaction/native/brushYFilter.js +1 -1
- package/lib/interaction/native/brushYFilter.js.map +1 -1
- package/lib/interaction/native/elementHighlight.d.ts +7 -2
- package/lib/interaction/native/elementHighlight.js +71 -17
- package/lib/interaction/native/elementHighlight.js.map +1 -1
- package/lib/interaction/native/elementHighlightByColor.d.ts +4 -1
- package/lib/interaction/native/elementHighlightByColor.js +18 -2
- package/lib/interaction/native/elementHighlightByColor.js.map +1 -1
- package/lib/interaction/native/elementHighlightByX.d.ts +3 -3
- package/lib/interaction/native/elementHighlightByX.js +18 -2
- package/lib/interaction/native/elementHighlightByX.js.map +1 -1
- package/lib/interaction/native/elementSelect.d.ts +1 -1
- package/lib/interaction/native/elementSelect.js +41 -19
- package/lib/interaction/native/elementSelect.js.map +1 -1
- package/lib/interaction/native/elementSelectByColor.js +2 -1
- package/lib/interaction/native/elementSelectByColor.js.map +1 -1
- package/lib/interaction/native/elementSelectByX.js +2 -1
- package/lib/interaction/native/elementSelectByX.js.map +1 -1
- package/lib/interaction/native/legendFilter.d.ts +4 -0
- package/lib/interaction/native/legendFilter.js +10 -3
- package/lib/interaction/native/legendFilter.js.map +1 -1
- package/lib/interaction/native/legendHighlight.d.ts +4 -0
- package/lib/interaction/native/legendHighlight.js +98 -0
- package/lib/interaction/native/legendHighlight.js.map +1 -0
- package/lib/interaction/native/sliderFilter.d.ts +5 -0
- package/lib/interaction/native/sliderFilter.js +91 -0
- package/lib/interaction/native/sliderFilter.js.map +1 -0
- package/lib/interaction/native/tooltip.js +11 -0
- package/lib/interaction/native/tooltip.js.map +1 -1
- package/lib/interaction/native/utils.d.ts +13 -2
- package/lib/interaction/native/utils.js +154 -27
- package/lib/interaction/native/utils.js.map +1 -1
- package/lib/label-transform/overlapDodgeY.js.map +1 -1
- package/lib/mark/area.js +1 -1
- package/lib/mark/area.js.map +1 -1
- package/lib/runtime/component.d.ts +1 -1
- package/lib/runtime/component.js +4 -2
- package/lib/runtime/component.js.map +1 -1
- package/lib/runtime/plot.d.ts +1 -1
- package/lib/runtime/plot.js +65 -26
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/render.js +20 -12
- package/lib/runtime/render.js.map +1 -1
- package/lib/runtime/scale.d.ts +2 -1
- package/lib/runtime/scale.js +9 -1
- package/lib/runtime/scale.js.map +1 -1
- package/lib/runtime/types/options.d.ts +4 -2
- package/lib/shape/area/hv.d.ts +3 -0
- package/lib/shape/area/hv.js +13 -0
- package/lib/shape/area/hv.js.map +1 -0
- package/lib/shape/area/hvh.d.ts +3 -0
- package/lib/shape/area/{step.js → hvh.js} +5 -5
- package/lib/shape/area/hvh.js.map +1 -0
- package/lib/shape/area/vh.d.ts +3 -0
- package/lib/shape/area/vh.js +13 -0
- package/lib/shape/area/vh.js.map +1 -0
- package/lib/shape/index.d.ts +6 -2
- package/lib/shape/index.js +7 -3
- package/lib/shape/index.js.map +1 -1
- package/lib/shape/interval/color.d.ts +1 -0
- package/lib/shape/interval/color.js +67 -54
- package/lib/shape/interval/color.js.map +1 -1
- package/lib/spec/composition.d.ts +0 -3
- package/lib/spec/geometry.d.ts +1 -0
- package/lib/spec/interaction.d.ts +30 -11
- package/lib/spec/transform.d.ts +15 -5
- package/lib/stdlib/index.js +1 -1
- package/lib/stdlib/index.js.map +1 -1
- package/lib/transform/sample.js +42 -26
- package/lib/transform/sample.js.map +1 -1
- package/lib/transform/select.js +1 -13
- package/lib/transform/select.js.map +1 -1
- package/lib/transform/selectX.js +1 -1
- package/lib/transform/selectX.js.map +1 -1
- package/lib/transform/selectY.js +1 -1
- package/lib/transform/selectY.js.map +1 -1
- package/lib/transform/utils/lttb.d.ts +5 -0
- package/lib/transform/utils/lttb.js +60 -0
- package/lib/transform/utils/lttb.js.map +1 -0
- package/lib/utils/event.d.ts +0 -2
- package/lib/utils/event.js +1 -21
- package/lib/utils/event.js.map +1 -1
- package/lib/utils/scale.d.ts +3 -0
- package/lib/utils/scale.js +36 -0
- package/lib/utils/scale.js.map +1 -0
- package/lib/utils/vector.d.ts +1 -1
- package/lib/utils/vector.js +1 -1
- package/package.json +4 -3
- package/src/.DS_Store +0 -0
- package/src/api/chart.ts +39 -18
- package/src/api/composition/base.ts +56 -0
- package/src/api/composition/facetCircle.ts +2 -3
- package/src/api/composition/facetRect.ts +2 -3
- package/src/api/composition/geoPath.ts +2 -3
- package/src/api/composition/geoView.ts +2 -3
- package/src/api/composition/index.ts +2 -0
- package/src/api/composition/repeatMatrix.ts +2 -3
- package/src/api/composition/spaceFlex.ts +2 -3
- package/src/api/composition/spaceLayer.ts +2 -3
- package/src/api/composition/timingKeyframe.ts +2 -3
- package/src/api/composition/view.ts +6 -4
- package/src/api/mark/base.ts +58 -0
- package/src/api/mark/mark.ts +29 -28
- package/src/api/node.ts +9 -11
- package/src/api/props.ts +0 -23
- package/src/component/axis.ts +7 -0
- package/src/component/legendContinuous.ts +15 -5
- package/src/component/slider.ts +3 -12
- package/src/data/.DS_Store +0 -0
- package/src/geo/{d3-projection.ts → d3Projection.ts} +0 -0
- package/src/geo/geoView.ts +1 -1
- package/src/interaction/index.ts +2 -0
- package/src/interaction/native/brushFilter.ts +18 -38
- package/src/interaction/native/brushXFilter.ts +1 -0
- package/src/interaction/native/brushYFilter.ts +1 -0
- package/src/interaction/native/elementHighlight.ts +78 -11
- package/src/interaction/native/elementHighlightByColor.ts +9 -4
- package/src/interaction/native/elementHighlightByX.ts +9 -5
- package/src/interaction/native/elementSelect.ts +58 -14
- package/src/interaction/native/elementSelectByColor.ts +4 -1
- package/src/interaction/native/elementSelectByX.ts +4 -1
- package/src/interaction/native/legendFilter.ts +8 -4
- package/src/interaction/native/legendHighlight.ts +87 -0
- package/src/interaction/native/sliderFilter.ts +112 -0
- package/src/interaction/native/tooltip.ts +11 -0
- package/src/interaction/native/utils.ts +183 -26
- package/src/label-transform/overlapDodgeY.ts +1 -1
- package/src/mark/area.ts +1 -1
- package/src/runtime/component.ts +18 -25
- package/src/runtime/plot.ts +123 -75
- package/src/runtime/render.ts +26 -13
- package/src/runtime/scale.ts +14 -0
- package/src/runtime/types/options.ts +10 -2
- package/src/shape/.DS_Store +0 -0
- package/src/shape/area/hv.ts +20 -0
- package/src/shape/area/{step.ts → hvh.ts} +3 -3
- package/src/shape/area/vh.ts +20 -0
- package/src/shape/index.ts +7 -2
- package/src/shape/interval/color.ts +86 -54
- package/src/spec/composition.ts +0 -1
- package/src/spec/geometry.ts +1 -0
- package/src/spec/interaction.ts +45 -12
- package/src/spec/transform.ts +30 -3
- package/src/stdlib/index.ts +10 -6
- package/src/transform/sample.ts +54 -18
- package/src/transform/select.ts +1 -2
- package/src/transform/selectX.ts +1 -1
- package/src/transform/selectY.ts +1 -1
- package/src/transform/utils/lttb.ts +73 -0
- package/src/utils/event.ts +0 -26
- package/src/utils/scale.ts +31 -0
- package/src/utils/vector.ts +1 -1
- package/esm/geo/d3-projection.js.map +0 -1
- package/esm/shape/area/step.d.ts +0 -3
- package/esm/shape/area/step.js.map +0 -1
- package/lib/geo/d3-projection.js.map +0 -1
- package/lib/shape/area/step.d.ts +0 -3
- package/lib/shape/area/step.js.map +0 -1
package/esm/shape/index.d.ts
CHANGED
|
@@ -31,7 +31,9 @@ export { Text } from './text/text';
|
|
|
31
31
|
export { Badge } from './text/badge';
|
|
32
32
|
export { Area } from './area/area';
|
|
33
33
|
export { Smooth as SmoothArea } from './area/smooth';
|
|
34
|
-
export {
|
|
34
|
+
export { HVH as HVHArea } from './area/hvh';
|
|
35
|
+
export { VH as VHArea } from './area/vh';
|
|
36
|
+
export { HV as HVArea } from './area/hv';
|
|
35
37
|
export { Link } from './link/link';
|
|
36
38
|
export { Smooth as SmoothEdge } from './link/smooth';
|
|
37
39
|
export { VHV as VHVEdge } from './link/vhv';
|
|
@@ -79,7 +81,9 @@ export type { TextOptions } from './text/text';
|
|
|
79
81
|
export type { BadgeOptions } from './text/badge';
|
|
80
82
|
export type { AreaOptions } from './area/area';
|
|
81
83
|
export type { SmoothOptions as SmoothAreaOptions } from './area/smooth';
|
|
82
|
-
export type {
|
|
84
|
+
export type { HVHOptions as HVHAreaOptions } from './area/hvh';
|
|
85
|
+
export type { VHOptions as VHAreaOptions } from './area/vh';
|
|
86
|
+
export type { HVOptions as HVAreaOptions } from './area/hv';
|
|
83
87
|
export type { LinkOptions } from './link/link';
|
|
84
88
|
export type { ImageOptions } from './image/image';
|
|
85
89
|
export type { PolygonOptions } from './polygon/polygon';
|
package/esm/shape/index.js
CHANGED
|
@@ -31,7 +31,9 @@ export { Text } from './text/text';
|
|
|
31
31
|
export { Badge } from './text/badge';
|
|
32
32
|
export { Area } from './area/area';
|
|
33
33
|
export { Smooth as SmoothArea } from './area/smooth';
|
|
34
|
-
export {
|
|
34
|
+
export { HVH as HVHArea } from './area/hvh';
|
|
35
|
+
export { VH as VHArea } from './area/vh';
|
|
36
|
+
export { HV as HVArea } from './area/hv';
|
|
35
37
|
export { Link } from './link/link';
|
|
36
38
|
export { Smooth as SmoothEdge } from './link/smooth';
|
|
37
39
|
export { VHV as VHVEdge } from './link/vhv';
|
package/esm/shape/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","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C;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -3,6 +3,7 @@ export type ColorOptions = {
|
|
|
3
3
|
colorAttribute: 'fill' | 'stroke';
|
|
4
4
|
[key: string]: any;
|
|
5
5
|
};
|
|
6
|
+
export declare function rect(points: any, value: any, coordinate: any, style?: Record<string, any>): import("../../utils/selection").G2Element;
|
|
6
7
|
/**
|
|
7
8
|
* Render rect in different coordinate.
|
|
8
9
|
* Calc arc path based on control points directly rather startAngle, endAngle, innerRadius,
|
|
@@ -15,6 +15,50 @@ import { isPolar, isHelix, isTranspose } from '../../utils/coordinate';
|
|
|
15
15
|
import { select } from '../../utils/selection';
|
|
16
16
|
import { sub } from '../.././utils/vector';
|
|
17
17
|
import { applyStyle, getArcObject, getShapeTheme, reorder, toOpacityKey, } from '../utils';
|
|
18
|
+
// Render rect in different coordinate.
|
|
19
|
+
export function rect(points, value, coordinate, style = {}) {
|
|
20
|
+
const { inset = 0, radius = 0, insetLeft = inset, insetTop = inset, insetRight = inset, insetBottom = inset, radiusBottomLeft = radius, radiusBottomRight = radius, radiusTopLeft = radius, radiusTopRight = radius } = style, rest = __rest(style, ["inset", "radius", "insetLeft", "insetTop", "insetRight", "insetBottom", "radiusBottomLeft", "radiusBottomRight", "radiusTopLeft", "radiusTopRight"]);
|
|
21
|
+
if (!isPolar(coordinate) && !isHelix(coordinate)) {
|
|
22
|
+
const tpShape = !!isTranspose(coordinate);
|
|
23
|
+
const [p0, , p2] = tpShape ? reorder(points) : points;
|
|
24
|
+
const [x, y] = p0;
|
|
25
|
+
const [width, height] = sub(p2, p0);
|
|
26
|
+
// Deal with width or height is negative.
|
|
27
|
+
const absX = width > 0 ? x : x + width;
|
|
28
|
+
const absY = height > 0 ? y : y + height;
|
|
29
|
+
const absWidth = Math.abs(width);
|
|
30
|
+
const absHeight = Math.abs(height);
|
|
31
|
+
const finalX = absX + insetLeft;
|
|
32
|
+
const finalY = absY + insetTop;
|
|
33
|
+
const finalWidth = absWidth - (insetLeft + insetRight);
|
|
34
|
+
const finalHeight = absHeight - (insetTop + insetBottom);
|
|
35
|
+
return select(new Rect({}))
|
|
36
|
+
.style('x', finalX)
|
|
37
|
+
.style('y', finalY)
|
|
38
|
+
.style('width', finalWidth)
|
|
39
|
+
.style('height', finalHeight)
|
|
40
|
+
.style('radius', [
|
|
41
|
+
radiusTopLeft,
|
|
42
|
+
radiusTopRight,
|
|
43
|
+
radiusBottomRight,
|
|
44
|
+
radiusBottomLeft,
|
|
45
|
+
])
|
|
46
|
+
.call(applyStyle, rest)
|
|
47
|
+
.node();
|
|
48
|
+
}
|
|
49
|
+
// Render path in polar coordinate.
|
|
50
|
+
const { y, y1 } = value;
|
|
51
|
+
const center = coordinate.getCenter();
|
|
52
|
+
const arcObject = getArcObject(coordinate, points, [y, y1]);
|
|
53
|
+
const path = arc()
|
|
54
|
+
.cornerRadius(radius)
|
|
55
|
+
.padAngle((inset * Math.PI) / 180);
|
|
56
|
+
return select(new Path({}))
|
|
57
|
+
.style('path', path(arcObject))
|
|
58
|
+
.style('transform', `translate(${center[0]}, ${center[1]})`)
|
|
59
|
+
.call(applyStyle, rest)
|
|
60
|
+
.node();
|
|
61
|
+
}
|
|
18
62
|
/**
|
|
19
63
|
* Render rect in different coordinate.
|
|
20
64
|
* Calc arc path based on control points directly rather startAngle, endAngle, innerRadius,
|
|
@@ -26,62 +70,30 @@ export const Color = (options) => {
|
|
|
26
70
|
const { colorAttribute, opacityAttribute = 'fill', first = true, last = true } = options, style = __rest(options, ["colorAttribute", "opacityAttribute", "first", "last"]);
|
|
27
71
|
return (points, value, coordinate, theme) => {
|
|
28
72
|
const { mark, shape, defaultShape } = value;
|
|
29
|
-
const _a = getShapeTheme(theme, mark, shape, defaultShape), {
|
|
30
|
-
// [colorAttribute]: defaultColor,
|
|
31
|
-
defaultColor, radius: defaultRadius = 0 } = _a, defaults = __rest(_a, ["defaultColor", "radius"]);
|
|
73
|
+
const _a = getShapeTheme(theme, mark, shape, defaultShape), { defaultColor, radius: defaultRadius = 0 } = _a, defaults = __rest(_a, ["defaultColor", "radius"]);
|
|
32
74
|
const defaultLineWidth = defaults.lineWidth || 1;
|
|
33
|
-
const { stroke, radius = defaultRadius, radiusTopLeft = radius, radiusTopRight = radius, radiusBottomRight = radius, radiusBottomLeft = radius, innerRadius = 0, innerRadiusTopLeft = innerRadius, innerRadiusTopRight = innerRadius, innerRadiusBottomRight = innerRadius, innerRadiusBottomLeft = innerRadius, inset = 0, insetLeft = inset, insetRight = inset, insetBottom = inset, insetTop = inset
|
|
75
|
+
const { stroke, radius = defaultRadius, radiusTopLeft = radius, radiusTopRight = radius, radiusBottomRight = radius, radiusBottomLeft = radius, innerRadius = 0, innerRadiusTopLeft = innerRadius, innerRadiusTopRight = innerRadius, innerRadiusBottomRight = innerRadius, innerRadiusBottomLeft = innerRadius, lineWidth = colorAttribute === 'stroke' || stroke ? defaultLineWidth : 0, inset = 0, insetLeft = inset, insetRight = inset, insetBottom = inset, insetTop = inset } = style, rest = __rest(style, ["stroke", "radius", "radiusTopLeft", "radiusTopRight", "radiusBottomRight", "radiusBottomLeft", "innerRadius", "innerRadiusTopLeft", "innerRadiusTopRight", "innerRadiusBottomRight", "innerRadiusBottomLeft", "lineWidth", "inset", "insetLeft", "insetRight", "insetBottom", "insetTop"]);
|
|
34
76
|
const { color = defaultColor, opacity } = value;
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
.call(applyStyle, defaults)
|
|
52
|
-
.style('lineWidth', lineWidth)
|
|
53
|
-
.style('x', finalX)
|
|
54
|
-
.style('y', finalY)
|
|
55
|
-
.style('width', finalWidth)
|
|
56
|
-
.style('height', finalHeight)
|
|
57
|
-
.style('stroke', stroke === undefined ? color : stroke)
|
|
58
|
-
.style(toOpacityKey(options), opacity)
|
|
59
|
-
.style(colorAttribute, color)
|
|
60
|
-
.style('radius', [
|
|
61
|
-
first ? radiusTopLeft : innerRadiusTopLeft,
|
|
62
|
-
first ? radiusTopRight : innerRadiusTopRight,
|
|
63
|
-
last ? radiusBottomRight : innerRadiusBottomRight,
|
|
64
|
-
last ? radiusBottomLeft : innerRadiusBottomLeft,
|
|
65
|
-
])
|
|
66
|
-
.call(applyStyle, rest)
|
|
67
|
-
.node();
|
|
68
|
-
}
|
|
69
|
-
// Render path in polar coordinate.
|
|
70
|
-
const { y, y1 } = value;
|
|
71
|
-
const center = coordinate.getCenter();
|
|
72
|
-
const arcObject = getArcObject(coordinate, points, [y, y1]);
|
|
73
|
-
const path = arc()
|
|
74
|
-
.cornerRadius(radius)
|
|
75
|
-
.padAngle((inset * Math.PI) / 180);
|
|
76
|
-
return select(new Path({}))
|
|
77
|
-
.call(applyStyle, defaults)
|
|
78
|
-
.style('path', path(arcObject))
|
|
79
|
-
.style('transform', `translate(${center[0]}, ${center[1]})`)
|
|
80
|
-
.style('stroke', color || stroke)
|
|
81
|
-
.style('lineWidth', lineWidth)
|
|
82
|
-
.style(colorAttribute, color)
|
|
77
|
+
// Extended style, which is not supported by native g shape,
|
|
78
|
+
// should apply at first.
|
|
79
|
+
const extendedStyle = {
|
|
80
|
+
radius,
|
|
81
|
+
radiusTopLeft: first ? radiusTopLeft : innerRadiusTopLeft,
|
|
82
|
+
radiusTopRight: first ? radiusTopRight : innerRadiusTopRight,
|
|
83
|
+
radiusBottomRight: last ? radiusBottomRight : innerRadiusBottomRight,
|
|
84
|
+
radiusBottomLeft: last ? radiusBottomLeft : innerRadiusBottomLeft,
|
|
85
|
+
inset,
|
|
86
|
+
insetLeft,
|
|
87
|
+
insetRight,
|
|
88
|
+
insetBottom,
|
|
89
|
+
insetTop,
|
|
90
|
+
};
|
|
91
|
+
return select(rect(points, value, coordinate, extendedStyle))
|
|
92
|
+
.call(applyStyle, Object.assign(Object.assign({}, defaults), rest))
|
|
83
93
|
.style(toOpacityKey(options), opacity)
|
|
84
|
-
.
|
|
94
|
+
.style(colorAttribute, color)
|
|
95
|
+
.style('lineWidth', lineWidth)
|
|
96
|
+
.style('stroke', stroke === undefined ? color : stroke)
|
|
85
97
|
.node();
|
|
86
98
|
};
|
|
87
99
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.js","sourceRoot":"src/","sources":["shape/interval/color.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,M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IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;aAC1D,IAAI,CAAC,UAAU,kCAAO,QAAQ,GAAK,IAAI,EAAG;aAC1C,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;aACrC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC;aAC5B,KAAK,CAAC,WAAW,EAAE,SAAS,CAAC;aAC7B,KAAK,CAAC,QAAQ,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;aACtD,IAAI,EAAE,CAAC;IACZ,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,sEAAsE;AACtE,KAAK,CAAC,KAAK,GAAG;IACZ,qBAAqB,EAAE,UAAU;IACjC,sBAAsB,EAAE,UAAU;IAClC,oBAAoB,EAAE,SAAS;CAChC,CAAC"}
|
|
@@ -8,7 +8,6 @@ import { Title } from './title';
|
|
|
8
8
|
import { Data } from './data';
|
|
9
9
|
import { LabelTransform } from './labelTransform';
|
|
10
10
|
import { Encode } from './encode';
|
|
11
|
-
type EventType = (...args: any[]) => void;
|
|
12
11
|
export type Node = MarkComposition | ViewComposition | SpaceLayerComposition | SpaceFlexComposition | RepeatMatrixComposition | FacetRectComposition | FacetCircleComposition | GeoViewComposition | TimingKeyframeComposition;
|
|
13
12
|
export type MarkComposition = Geometry & {
|
|
14
13
|
title?: Title;
|
|
@@ -46,7 +45,6 @@ export type ViewComposition = {
|
|
|
46
45
|
labelTransform?: LabelTransform[];
|
|
47
46
|
axis?: Record<string, any>;
|
|
48
47
|
legend?: Record<string, any>;
|
|
49
|
-
on?: Record<string, EventType | EventType[]>;
|
|
50
48
|
style?: Record<string, any>;
|
|
51
49
|
clip?: boolean;
|
|
52
50
|
};
|
|
@@ -175,4 +173,3 @@ export type GeoPathComposition = Omit<GeoViewComposition, 'type'> & {
|
|
|
175
173
|
type?: 'geoView';
|
|
176
174
|
encode?: Record<string, Encode>;
|
|
177
175
|
};
|
|
178
|
-
export {};
|
package/esm/spec/geometry.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { InteractionComponent } from '../runtime';
|
|
|
2
2
|
import { ChannelTypes } from './geometry';
|
|
3
3
|
import { ActiveRegionAction, PoptipAction, TooltipAction } from './action';
|
|
4
4
|
import { FisheyeCoordinate } from './coordinate';
|
|
5
|
-
export type Interaction = ElementHighlightInteraction | ElementHighlightByColorInteraction | ElementHighlightByXInteraction | ElementSelectByColorInteraction | ElementSelectByXInteraction | ElementSelectInteraction | TooltipInteraction | FisheyeInteraction |
|
|
6
|
-
export type InteractionTypes = 'elementHighlight' | 'elementHighlightByX' | 'elementHighlightByColor' | 'fisheye' | 'chartIndex' | 'elementSelect' | 'elementSelectByX' | 'elementSelectByColor' | 'fisheye' | 'tooltip' | 'legendFilter' | 'brushXHighlight' | 'brushYHighlight' | 'brushHighlight' | 'brushFilter' | 'brushXFilter' | 'brushYFilter' | InteractionComponent;
|
|
5
|
+
export type Interaction = ElementHighlightInteraction | ElementHighlightByColorInteraction | ElementHighlightByXInteraction | ElementSelectByColorInteraction | ElementSelectByXInteraction | ElementSelectInteraction | TooltipInteraction | FisheyeInteraction | ChartIndexInteraction | CustomInteraction | LegendFilterInteraction | LegendHighlightInteraction | BrushHighlightInteraction | BrushXHighlightInteraction | BrushYHighlightInteraction | BrushAxisHighlightInteraction | BrushFilter | BrushYFilter | BrushXFilter | SliderFilter;
|
|
6
|
+
export type InteractionTypes = 'elementHighlight' | 'elementHighlightByX' | 'elementHighlightByColor' | 'fisheye' | 'chartIndex' | 'elementSelect' | 'elementSelectByX' | 'elementSelectByColor' | 'fisheye' | 'tooltip' | 'legendFilter' | 'legendHighlight' | 'brushXHighlight' | 'brushYHighlight' | 'brushHighlight' | 'brushFilter' | 'brushXFilter' | 'brushYFilter' | 'sliderFilter' | InteractionComponent;
|
|
7
7
|
export type BrushInteraction = {
|
|
8
8
|
type?: 'brush';
|
|
9
9
|
brushType?: 'rect' | 'rectX' | 'rectY' | 'polygon';
|
|
@@ -55,48 +55,67 @@ export type BrushVisibleInteraction = {
|
|
|
55
55
|
export type ElementHighlightInteraction = {
|
|
56
56
|
type?: 'elementHighlight';
|
|
57
57
|
link?: boolean;
|
|
58
|
-
|
|
58
|
+
background?: boolean;
|
|
59
|
+
offset?: number;
|
|
60
|
+
} & Record<`${'link' | 'highlighted' | 'unhighlighted' | 'background'}${any}`, any>;
|
|
59
61
|
export type ElementSelectInteraction = {
|
|
60
62
|
type?: 'elementSelect';
|
|
61
63
|
single?: boolean;
|
|
62
|
-
|
|
64
|
+
background?: true;
|
|
65
|
+
offset?: number;
|
|
66
|
+
} & Record<`${'selected' | 'link' | 'unselected' | 'background'}${any}`, any>;
|
|
63
67
|
export type ElementSelectByColorInteraction = {
|
|
64
68
|
type?: 'elementSelectByColor';
|
|
65
69
|
single?: boolean;
|
|
70
|
+
offset?: number;
|
|
66
71
|
} & Record<`${'selected' | 'link' | 'unselected'}${any}`, any>;
|
|
67
72
|
export type ElementSelectByXInteraction = {
|
|
68
73
|
type?: 'elementSelectByX';
|
|
69
74
|
single?: boolean;
|
|
70
|
-
|
|
75
|
+
background?: true;
|
|
76
|
+
offset?: number;
|
|
77
|
+
} & Record<`${'selected' | 'link' | 'unselected' | 'background'}${any}`, any>;
|
|
71
78
|
export type ElementHighlightByXInteraction = {
|
|
72
79
|
type?: 'elementHighlightByX';
|
|
73
80
|
x?: string;
|
|
74
81
|
link?: boolean;
|
|
75
|
-
|
|
82
|
+
background?: boolean;
|
|
83
|
+
offset?: number;
|
|
84
|
+
} & Record<`${'link' | 'highlighted' | 'unhighlighted' | 'background'}${any}`, any>;
|
|
76
85
|
export type ElementHighlightByColorInteraction = {
|
|
77
86
|
type?: 'elementHighlightByColor';
|
|
78
87
|
color?: string;
|
|
79
|
-
|
|
88
|
+
background?: boolean;
|
|
89
|
+
link?: boolean;
|
|
90
|
+
offset?: number;
|
|
91
|
+
} & Record<`${'link' | 'highlighted' | 'unhighlighted' | 'background'}${any}`, any>;
|
|
80
92
|
export type LegendFilterInteraction = {
|
|
81
93
|
type?: 'legendFilter';
|
|
82
94
|
channel?: ChannelTypes;
|
|
83
95
|
[key: string]: any;
|
|
84
96
|
} & Record<`${'marker' | 'label'}Unselected${any}`, any>;
|
|
85
|
-
export type
|
|
97
|
+
export type LegendHighlightInteraction = {
|
|
98
|
+
type?: 'legendHighlight';
|
|
99
|
+
[key: string]: any;
|
|
100
|
+
} & Record<`${'marker' | 'label'}Unhighlighted${any}`, any>;
|
|
101
|
+
export type ChartIndexInteraction = {
|
|
86
102
|
type?: 'chartIndex';
|
|
87
103
|
wait?: number;
|
|
88
104
|
leading?: boolean;
|
|
89
105
|
trailing?: boolean;
|
|
90
106
|
} & Record<`${'rule' | 'label'}${any}`, any>;
|
|
107
|
+
export type SliderFilter = {
|
|
108
|
+
type?: 'sliderFilter';
|
|
109
|
+
wait?: number;
|
|
110
|
+
leading?: boolean;
|
|
111
|
+
trailing?: boolean;
|
|
112
|
+
};
|
|
91
113
|
export type ElementListHighlightInteraction = {
|
|
92
114
|
type?: 'elementListHighlight';
|
|
93
115
|
};
|
|
94
116
|
export type LegendActiveInteraction = {
|
|
95
117
|
type?: 'legendActive';
|
|
96
118
|
};
|
|
97
|
-
export type LegendHighlightInteraction = {
|
|
98
|
-
type?: 'legendHighlight';
|
|
99
|
-
};
|
|
100
119
|
export type TooltipInteraction = Omit<TooltipAction, 'type'> & {
|
|
101
120
|
type?: 'tooltip';
|
|
102
121
|
shared?: boolean;
|
package/esm/spec/transform.d.ts
CHANGED
|
@@ -58,8 +58,8 @@ export type Selector = 'min' | 'max' | 'first' | 'last' | 'mean' | 'median' | ((
|
|
|
58
58
|
export type SelectTransform = {
|
|
59
59
|
type?: 'select';
|
|
60
60
|
groupBy?: string | string[];
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
channel?: ChannelTypes;
|
|
62
|
+
selector?: Selector;
|
|
63
63
|
};
|
|
64
64
|
export type SelectXTransform = {
|
|
65
65
|
type?: 'selectX';
|
|
@@ -136,12 +136,22 @@ export type BinTransform = {
|
|
|
136
136
|
} & {
|
|
137
137
|
[key in ChannelTypes]?: Reducer;
|
|
138
138
|
};
|
|
139
|
+
export type SampleFunction = (I: number[], X: number[], Y: number[], thresholds: number) => number[];
|
|
139
140
|
export type SampleTransform = {
|
|
140
141
|
type?: 'sample';
|
|
141
|
-
|
|
142
|
+
/**
|
|
143
|
+
* Sample strategy. Default is 'median'.
|
|
144
|
+
*/
|
|
145
|
+
strategy?: 'lttb' | 'median' | 'max' | 'min' | 'first' | 'last' | SampleFunction;
|
|
146
|
+
/**
|
|
147
|
+
* The thresholds of sample, when data size great then thresholds, sample will take effect.
|
|
148
|
+
* Default is 2000.
|
|
149
|
+
*/
|
|
142
150
|
thresholds?: number;
|
|
143
|
-
|
|
144
|
-
|
|
151
|
+
/**
|
|
152
|
+
* Group data by fields, for series data.
|
|
153
|
+
*/
|
|
154
|
+
groupBy?: string | string[];
|
|
145
155
|
};
|
|
146
156
|
export type FilterTransform = {
|
|
147
157
|
type?: 'filter';
|
package/esm/stdlib/index.js
CHANGED
|
@@ -3,16 +3,11 @@ import { Constant, Field, Transform, Column } from '../encode';
|
|
|
3
3
|
import { Cell, Interval, Rect, Line, Point as PointGeometry, Text as TextGeometry, Area as AreaGeometry, Image as ImageGeometry, Polygon as PolygonGeometry, Box as BoxGeometry, Vector as VectorGeometry, Link as LinkGeometry, LineX, LineY, Connector, Range, RangeX, RangeY, Sankey, Path, Treemap, Pack as PackGeometry, Shape, Boxplot, ForceGraph, Tree as TreeGeometry, WordCloud as WordCloudGeometry, } from '../mark';
|
|
4
4
|
import { Category10, Category20, SequentialBlue, SequentialDarkBlue, SequentialGreen, SequentialDarkGreen, SequentialGrey, SequentialOrange, SequentialPink, SequentialRed, SequentialYellow, SequentialPurple, SequentialYellowOrange, SequentialYellowGreen, SequentialPinkPurple, SequentialGreenBlue, DivergingGreenYellow, DivergingRedBlue, DivergingGreenRed, DivergingRedPurple, } from '../palette';
|
|
5
5
|
import { Linear, Ordinal, Band, Identity, Point, Time, Log, Pow, Threshold, Quantile, Quantize, Sqrt, Sequential, } from '../scale';
|
|
6
|
-
import { Rect as RectShape, HollowRect, Line as LineShape, HV, VH, HVH, Smooth, Bowtie, Cross, Diamond, Hexagon, HollowBowtie, HollowDiamond, HollowHexagon, HollowPoint, HollowSquare, HollowTriangle, HollowTriangleDown, Hyphen, LinePoint, Plus, Point as PointShape, Square, Tick, Triangle, TriangleDown, Text, Badge, LineXY, Connector as ConnectorShape, Area, SmoothArea,
|
|
6
|
+
import { Rect as RectShape, HollowRect, Line as LineShape, HV, VH, HVH, Smooth, Bowtie, Cross, Diamond, Hexagon, HollowBowtie, HollowDiamond, HollowHexagon, HollowPoint, HollowSquare, HollowTriangle, HollowTriangleDown, Hyphen, LinePoint, Plus, Point as PointShape, Square, Tick, Triangle, TriangleDown, Text, Badge, LineXY, Connector as ConnectorShape, Area, SmoothArea, HVHArea, VHArea, HVArea, SmoothEdge, VHVEdge, Arc, Image, Polygon, Ribbon, Box, Funnel, Pyramid, Vector, Link, Label, Path as PathShape, HollowPath, Shape as CustomShape, } from '../shape';
|
|
7
7
|
import { Light, Dark, Academy } from '../theme';
|
|
8
8
|
import { AxisX, AxisY, LegendCategory, LegendContinuous, TitleComponent, SliderX, SliderY, ScrollbarX, ScrollbarY, } from '../component';
|
|
9
9
|
import { ScaleInX, ScaleOutX, ScaleInY, ScaleOutY, WaveIn, FadeIn, FadeOut, Morphing, ZoomIn, ZoomOut, PathIn, GrowInX, GrowInY, } from '../animation';
|
|
10
|
-
import {
|
|
11
|
-
// ElementHighlight,
|
|
12
|
-
// ElementSelected,
|
|
13
|
-
// Tooltip,
|
|
14
|
-
// Fisheye as FisheyeInteraction,
|
|
15
|
-
ElementHighlight, ElementHighlightByX, ElementHighlightByColor, ElementSelect, ElementSelectByX, ElementSelectByColor, ChartIndex, Fisheye as ChartFisheye, Tooltip, LegendFilter, BrushHighlight, BrushXHighlight, BrushYHighlight, BrushAxisHighlight, BrushFilter, BrushXFilter, BrushYFilter,
|
|
10
|
+
import { ElementHighlight, ElementHighlightByX, ElementHighlightByColor, ElementSelect, ElementSelectByX, ElementSelectByColor, ChartIndex, Fisheye as ChartFisheye, Tooltip, LegendFilter, LegendHighlight, BrushHighlight, BrushXHighlight, BrushYHighlight, BrushAxisHighlight, BrushFilter, BrushXFilter, BrushYFilter, SliderFilter,
|
|
16
11
|
// ElementHighlightByX,
|
|
17
12
|
// ElementHighlightByColor,
|
|
18
13
|
// ElementListHighlight,
|
|
@@ -32,7 +27,7 @@ import { geoLibrary } from '../geo';
|
|
|
32
27
|
export function createLibrary() {
|
|
33
28
|
return Object.assign({ 'data.fetch': Fetch, 'data.inline': Inline, 'data.sortBy': SortBy, 'data.sort': Sort, 'data.filter': DataFilter, 'data.pick': Pick, 'data.rename': Rename, 'data.fold': Fold, 'data.slice': Slice, 'data.custom': Custom, 'data.map': Map, 'data.cluster': Cluster, 'data.tree': Tree, 'data.sankey': SankeyTransform, 'data.arc': ArcTransform, 'data.wordCloud': WordCloud, 'data.join': Join,
|
|
34
29
|
// 'transform.voronoi': Voronoi,
|
|
35
|
-
'transform.maybeZeroY1': MaybeZeroY1, 'transform.maybeZeroX': MaybeZeroX, 'transform.maybeStackY': MaybeStackY, 'transform.maybeTitle': MaybeTitle, 'transform.maybeSeries': MaybeSeries, 'transform.maybeZeroPadding': MaybeZeroPadding, 'transform.stackY': StackY, 'transform.binX': BinX, 'transform.bin': Bin, 'transform.dodgeX': DodgeX, 'transform.jitter': Jitter, 'transform.jitterX': JitterX, 'transform.symmetryY': SymmetryY, 'transform.diffY': DiffY, 'transform.stackEnter': StackEnter, 'transform.normalizeY': NormalizeY, 'transform.select': Select, 'transform.selectX': SelectX, 'transform.selectY': SelectY, 'transform.groupX': GroupX, 'transform.groupY': GroupY, 'transform.groupColor': GroupColor, 'transform.group': Group, 'transform.maybeSize': MaybeSize, 'transform.maybeZeroY': MaybeZeroY, 'transform.maybeKey': MaybeKey, 'transform.sortX': SortX, 'transform.sortY': SortY, 'transform.sortColor': SortColor, 'transform.flexX': FlexX, 'transform.maybeTupleY': MaybeTupleY, 'transform.maybeTupleX': MaybeTupleX, 'transform.maybeIdentityY': MaybeIdentityY, 'transform.maybeIdentityX': MaybeIdentityX, 'transform.maybeTuple': MaybeTuple, 'transform.maybeVisualPosition': MaybeVisualPosition, 'transform.maybeFunctionAttribute': MaybeFunctionAttribute, 'transform.maybeGradient': MaybeGradient, 'transform.maybeTooltip': MaybeTooltip, 'transform.pack': Pack, 'transform.sample': Sample, 'transform.filter': Filter, 'coordinate.cartesian': Cartesian, 'coordinate.polar': Polar, 'coordinate.helix': Helix, 'coordinate.transpose': Transpose, 'coordinate.theta': Theta, 'coordinate.reflect': Reflect, 'coordinate.reflectX': ReflectX, 'coordinate.reflectY': ReflectY, 'coordinate.parallel': Parallel, 'coordinate.fisheye': Fisheye, 'coordinate.fisheyeX': FisheyeX, 'coordinate.fisheyeY': FisheyeY, 'coordinate.radial': Radial, 'encode.constant': Constant, 'encode.field': Field, 'encode.transform': Transform, 'encode.column': Column, 'mark.interval': Interval, 'mark.rect': Rect, 'mark.line': Line, 'mark.point': PointGeometry, 'mark.text': TextGeometry, 'mark.cell': Cell, 'mark.area': AreaGeometry, 'mark.link': LinkGeometry, 'mark.image': ImageGeometry, 'mark.polygon': PolygonGeometry, 'mark.box': BoxGeometry, 'mark.vector': VectorGeometry, 'mark.lineX': LineX, 'mark.lineY': LineY, 'mark.connector': Connector, 'mark.range': Range, 'mark.rangeX': RangeX, 'mark.rangeY': RangeY, 'mark.sankey': Sankey, 'mark.path': Path, 'mark.treemap': Treemap, 'mark.pack': PackGeometry, 'mark.boxplot': Boxplot, 'mark.shape': Shape, 'mark.forceGraph': ForceGraph, 'mark.tree': TreeGeometry, 'mark.wordCloud': WordCloudGeometry, 'palette.category10': Category10, 'palette.category20': Category20, 'palette.sequentialBlue': SequentialBlue, 'palette.sequentialDarkBlue': SequentialDarkBlue, 'palette.sequentialGreen': SequentialGreen, 'palette.sequentialDarkGreen': SequentialDarkGreen, 'palette.sequentialGrey': SequentialGrey, 'palette.sequentialOrange': SequentialOrange, 'palette.sequentialPink': SequentialPink, 'palette.sequentialRed': SequentialRed, 'palette.sequentialYellow': SequentialYellow, 'palette.sequentialPurple': SequentialPurple, 'palette.sequentialYellowOrange': SequentialYellowOrange, 'palette.sequentialYellowGreen': SequentialYellowGreen, 'palette.sequentialPinkPurple': SequentialPinkPurple, 'palette.sequentialGreenBlue': SequentialGreenBlue, 'palette.divergingGreenYellow': DivergingGreenYellow, 'palette.divergingRedBlue': DivergingRedBlue, 'palette.divergingGreenRed': DivergingGreenRed, 'palette.divergingRedPurple': DivergingRedPurple, 'scale.linear': Linear, 'scale.ordinal': Ordinal, 'scale.band': Band, 'scale.identity': Identity, 'scale.point': Point, 'scale.time': Time, 'scale.log': Log, 'scale.pow': Pow, 'scale.sqrt': Sqrt, 'scale.threshold': Threshold, 'scale.quantile': Quantile, 'scale.quantize': Quantize, 'scale.sequential': Sequential, 'shape.interval.rect': RectShape, 'shape.interval.hollow': HollowRect, 'shape.interval.funnel': Funnel, 'shape.interval.pyramid': Pyramid, 'shape.rect.rect': RectShape, 'shape.rect.hollow': HollowRect, 'shape.cell.cell': RectShape, 'shape.cell.hollow': HollowRect, 'shape.line.line': LineShape, 'shape.line.hv': HV, 'shape.line.vh': VH, 'shape.line.hvh': HVH, 'shape.line.smooth': Smooth, 'shape.point.bowtie': Bowtie, 'shape.point.cross': Cross, 'shape.point.diamond': Diamond, 'shape.point.hexagon': Hexagon, 'shape.point.hollowBowtie': HollowBowtie, 'shape.point.hollowDiamond': HollowDiamond, 'shape.point.hollowHexagon': HollowHexagon, 'shape.point.hollow': HollowPoint, 'shape.point.hollowSquare': HollowSquare, 'shape.point.hollowTriangle': HollowTriangle, 'shape.point.hollowTriangleDown': HollowTriangleDown, 'shape.point.hyphen': Hyphen, 'shape.point.line': LinePoint, 'shape.point.plus': Plus, 'shape.point.point': PointShape, 'shape.point.square': Square, 'shape.point.tick': Tick, 'shape.point.triangle': Triangle, 'shape.point.triangleDown': TriangleDown, 'shape.text.text': Text, 'shape.area.area': Area, 'shape.area.smooth': SmoothArea, 'shape.area.
|
|
30
|
+
'transform.maybeZeroY1': MaybeZeroY1, 'transform.maybeZeroX': MaybeZeroX, 'transform.maybeStackY': MaybeStackY, 'transform.maybeTitle': MaybeTitle, 'transform.maybeSeries': MaybeSeries, 'transform.maybeZeroPadding': MaybeZeroPadding, 'transform.stackY': StackY, 'transform.binX': BinX, 'transform.bin': Bin, 'transform.dodgeX': DodgeX, 'transform.jitter': Jitter, 'transform.jitterX': JitterX, 'transform.symmetryY': SymmetryY, 'transform.diffY': DiffY, 'transform.stackEnter': StackEnter, 'transform.normalizeY': NormalizeY, 'transform.select': Select, 'transform.selectX': SelectX, 'transform.selectY': SelectY, 'transform.groupX': GroupX, 'transform.groupY': GroupY, 'transform.groupColor': GroupColor, 'transform.group': Group, 'transform.maybeSize': MaybeSize, 'transform.maybeZeroY': MaybeZeroY, 'transform.maybeKey': MaybeKey, 'transform.sortX': SortX, 'transform.sortY': SortY, 'transform.sortColor': SortColor, 'transform.flexX': FlexX, 'transform.maybeTupleY': MaybeTupleY, 'transform.maybeTupleX': MaybeTupleX, 'transform.maybeIdentityY': MaybeIdentityY, 'transform.maybeIdentityX': MaybeIdentityX, 'transform.maybeTuple': MaybeTuple, 'transform.maybeVisualPosition': MaybeVisualPosition, 'transform.maybeFunctionAttribute': MaybeFunctionAttribute, 'transform.maybeGradient': MaybeGradient, 'transform.maybeTooltip': MaybeTooltip, 'transform.pack': Pack, 'transform.sample': Sample, 'transform.filter': Filter, 'coordinate.cartesian': Cartesian, 'coordinate.polar': Polar, 'coordinate.helix': Helix, 'coordinate.transpose': Transpose, 'coordinate.theta': Theta, 'coordinate.reflect': Reflect, 'coordinate.reflectX': ReflectX, 'coordinate.reflectY': ReflectY, 'coordinate.parallel': Parallel, 'coordinate.fisheye': Fisheye, 'coordinate.fisheyeX': FisheyeX, 'coordinate.fisheyeY': FisheyeY, 'coordinate.radial': Radial, 'encode.constant': Constant, 'encode.field': Field, 'encode.transform': Transform, 'encode.column': Column, 'mark.interval': Interval, 'mark.rect': Rect, 'mark.line': Line, 'mark.point': PointGeometry, 'mark.text': TextGeometry, 'mark.cell': Cell, 'mark.area': AreaGeometry, 'mark.link': LinkGeometry, 'mark.image': ImageGeometry, 'mark.polygon': PolygonGeometry, 'mark.box': BoxGeometry, 'mark.vector': VectorGeometry, 'mark.lineX': LineX, 'mark.lineY': LineY, 'mark.connector': Connector, 'mark.range': Range, 'mark.rangeX': RangeX, 'mark.rangeY': RangeY, 'mark.sankey': Sankey, 'mark.path': Path, 'mark.treemap': Treemap, 'mark.pack': PackGeometry, 'mark.boxplot': Boxplot, 'mark.shape': Shape, 'mark.forceGraph': ForceGraph, 'mark.tree': TreeGeometry, 'mark.wordCloud': WordCloudGeometry, 'palette.category10': Category10, 'palette.category20': Category20, 'palette.sequentialBlue': SequentialBlue, 'palette.sequentialDarkBlue': SequentialDarkBlue, 'palette.sequentialGreen': SequentialGreen, 'palette.sequentialDarkGreen': SequentialDarkGreen, 'palette.sequentialGrey': SequentialGrey, 'palette.sequentialOrange': SequentialOrange, 'palette.sequentialPink': SequentialPink, 'palette.sequentialRed': SequentialRed, 'palette.sequentialYellow': SequentialYellow, 'palette.sequentialPurple': SequentialPurple, 'palette.sequentialYellowOrange': SequentialYellowOrange, 'palette.sequentialYellowGreen': SequentialYellowGreen, 'palette.sequentialPinkPurple': SequentialPinkPurple, 'palette.sequentialGreenBlue': SequentialGreenBlue, 'palette.divergingGreenYellow': DivergingGreenYellow, 'palette.divergingRedBlue': DivergingRedBlue, 'palette.divergingGreenRed': DivergingGreenRed, 'palette.divergingRedPurple': DivergingRedPurple, 'scale.linear': Linear, 'scale.ordinal': Ordinal, 'scale.band': Band, 'scale.identity': Identity, 'scale.point': Point, 'scale.time': Time, 'scale.log': Log, 'scale.pow': Pow, 'scale.sqrt': Sqrt, 'scale.threshold': Threshold, 'scale.quantile': Quantile, 'scale.quantize': Quantize, 'scale.sequential': Sequential, 'shape.interval.rect': RectShape, 'shape.interval.hollow': HollowRect, 'shape.interval.funnel': Funnel, 'shape.interval.pyramid': Pyramid, 'shape.rect.rect': RectShape, 'shape.rect.hollow': HollowRect, 'shape.cell.cell': RectShape, 'shape.cell.hollow': HollowRect, 'shape.line.line': LineShape, 'shape.line.hv': HV, 'shape.line.vh': VH, 'shape.line.hvh': HVH, 'shape.line.smooth': Smooth, 'shape.point.bowtie': Bowtie, 'shape.point.cross': Cross, 'shape.point.diamond': Diamond, 'shape.point.hexagon': Hexagon, 'shape.point.hollowBowtie': HollowBowtie, 'shape.point.hollowDiamond': HollowDiamond, 'shape.point.hollowHexagon': HollowHexagon, 'shape.point.hollow': HollowPoint, 'shape.point.hollowSquare': HollowSquare, 'shape.point.hollowTriangle': HollowTriangle, 'shape.point.hollowTriangleDown': HollowTriangleDown, 'shape.point.hyphen': Hyphen, 'shape.point.line': LinePoint, 'shape.point.plus': Plus, 'shape.point.point': PointShape, 'shape.point.square': Square, 'shape.point.tick': Tick, 'shape.point.triangle': Triangle, 'shape.point.triangleDown': TriangleDown, 'shape.text.text': Text, 'shape.area.area': Area, 'shape.area.smooth': SmoothArea, 'shape.area.hvh': HVHArea, 'shape.area.vh': VHArea, 'shape.area.hv': HVArea, 'shape.link.smooth': SmoothEdge, 'shape.link.vhv': VHVEdge, 'shape.link.arc': Arc, 'shape.link.link': Link, 'shape.image.image': Image, 'shape.polygon.polygon': Polygon, 'shape.polygon.ribbon': Ribbon, 'shape.box.box': Box, 'shape.vector.vector': Vector, 'shape.label.label': Label, 'shape.text.badge': Badge, 'shape.lineX.line': LineXY, 'shape.lineY.line': LineXY, 'shape.shape.shape': CustomShape, 'shape.connector.connector': ConnectorShape, 'shape.range.range': RectShape, 'shape.rangeX.range': RectShape, 'shape.rangeY.range': RectShape, 'shape.path.path': PathShape, 'shape.path.hollow': HollowPath, 'theme.light': Light, 'theme.dark': Dark, 'theme.academy': Academy, 'component.axisX': AxisX, 'component.axisY': AxisY, 'component.legendCategory': LegendCategory, 'component.legendContinuous': LegendContinuous, 'component.title': TitleComponent, 'component.sliderX': SliderX, 'component.sliderY': SliderY, 'component.scrollbarX': ScrollbarX, 'component.scrollbarY': ScrollbarY, 'animation.scaleInX': ScaleInX, 'animation.scaleOutX': ScaleOutX, 'animation.scaleInY': ScaleInY, 'animation.scaleOutY': ScaleOutY, 'animation.waveIn': WaveIn, 'animation.fadeIn': FadeIn, 'animation.fadeOut': FadeOut, 'animation.zoomIn': ZoomIn, 'animation.zoomOut': ZoomOut, 'animation.pathIn': PathIn, 'animation.morphing': Morphing, 'animation.growInX': GrowInX, 'animation.growInY': GrowInY, 'interaction.elementHighlight': ElementHighlight, 'interaction.elementHighlightByX': ElementHighlightByX, 'interaction.elementHighlightByColor': ElementHighlightByColor, 'interaction.elementSelect': ElementSelect, 'interaction.elementSelectByX': ElementSelectByX, 'interaction.elementSelectByColor': ElementSelectByColor, 'interaction.fisheye': ChartFisheye, 'interaction.chartIndex': ChartIndex, 'interaction.tooltip': Tooltip, 'interaction.legendFilter': LegendFilter, 'interaction.legendHighlight': LegendHighlight, 'interaction.brushHighlight': BrushHighlight, 'interaction.brushXHighlight': BrushXHighlight, 'interaction.brushYHighlight': BrushYHighlight, 'interaction.brushAxisHighlight': BrushAxisHighlight, 'interaction.brushFilter': BrushFilter, 'interaction.brushXFilter': BrushXFilter, 'interaction.brushYFilter': BrushYFilter, 'interaction.sliderFilter': SliderFilter,
|
|
36
31
|
// 'interaction.elementSelected': ElementSelected,
|
|
37
32
|
// 'interaction.elementHighlight': ElementHighlight,
|
|
38
33
|
// 'interaction.elementHighlightByX': ElementHighlightByX,
|
package/esm/stdlib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":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AAU,GACX,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,IAAI,IAAI,SAAS,EACjB,UAAU,EACV,IAAI,IAAI,SAAS,EACjB,EAAE,EACF,EAAE,EACF,GAAG,EACH,MAAM,EACN,MAAM,EACN,KAAK,EACL,OAAO,EACP,OAAO,EACP,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EACX,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,MAAM,EACN,SAAS,EACT,IAAI,EACJ,KAAK,IAAI,UAAU,EACnB,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,IAAI,EACJ,KAAK,EACL,MAAM,EACN,SAAS,IAAI,cAAc,EAC3B,IAAI,EACJ,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["stdlib/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,KAAK,EACL,KAAK,EACL,SAAS,EACT,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,KAAK,IAAI,aAAa,EACtB,IAAI,IAAI,YAAY,EACpB,IAAI,IAAI,YAAY,EACpB,KAAK,IAAI,aAAa,EACtB,OAAO,IAAI,eAAe,EAC1B,GAAG,IAAI,WAAW,EAClB,MAAM,IAAI,cAAc,EACxB,IAAI,IAAI,YAAY,EACpB,KAAK,EACL,KAAK,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,MAAM,EACN,MAAM,EACN,IAAI,EACJ,OAAO,EACP,IAAI,IAAI,YAAY,EACpB,KAAK,EACL,OAAO,EACP,UAAU,EACV,IAAI,IAAI,YAAY,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EAC5C,4BAA4B,EAAE,WAAW,EACzC,8BAA8B,EAAE,aAAa,EAC7C,6BAA6B,EAAE,YAAY,EAC3C,gCAAgC,EAAE,eAAe,IAC9C,UAAU,EACb;AACJ,CAAC"}
|
package/esm/transform/sample.js
CHANGED
|
@@ -1,16 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
1
|
+
// @ts-ignore medianIndex exist in d3-array@3.2.0, but @types/d3-array Expired.
|
|
2
|
+
import { maxIndex, minIndex, medianIndex } from 'd3-array';
|
|
12
3
|
import { createGroups } from './utils/order';
|
|
13
|
-
import {
|
|
4
|
+
import { columnOf } from './utils/helper';
|
|
5
|
+
import { lttb } from './utils/lttb';
|
|
6
|
+
function normalizeSample(strategy) {
|
|
7
|
+
if (typeof strategy === 'function')
|
|
8
|
+
return strategy;
|
|
9
|
+
if (strategy === 'lttb')
|
|
10
|
+
return lttb;
|
|
11
|
+
const strategies = {
|
|
12
|
+
first: (f) => [f[0]],
|
|
13
|
+
last: (f) => [f[f.length - 1]],
|
|
14
|
+
min: (f, X, Y) => [
|
|
15
|
+
f[minIndex(f, (i) => Y[i])],
|
|
16
|
+
],
|
|
17
|
+
max: (f, X, Y) => [
|
|
18
|
+
f[maxIndex(f, (i) => Y[i])],
|
|
19
|
+
],
|
|
20
|
+
median: (f, X, Y) => [
|
|
21
|
+
f[medianIndex(f, (i) => Y[i])],
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
const sampleFunction = strategies[strategy] || strategies.median;
|
|
25
|
+
return (I, X, Y, thresholds) => {
|
|
26
|
+
// Sepreate group to frames, then sample each frame.
|
|
27
|
+
// Keep more data as possible.
|
|
28
|
+
const frameSize = Math.max(1, Math.floor(I.length / thresholds));
|
|
29
|
+
const frames = getFrames(I, frameSize);
|
|
30
|
+
return frames.flatMap((frame) => sampleFunction(frame, X, Y));
|
|
31
|
+
};
|
|
32
|
+
}
|
|
14
33
|
/**
|
|
15
34
|
* Split the array into frame with each frameSize.
|
|
16
35
|
*/
|
|
@@ -28,21 +47,18 @@ function getFrames(I, frameSize) {
|
|
|
28
47
|
* sample data for each group when data.length >= threshold(default = 2000).
|
|
29
48
|
*/
|
|
30
49
|
export const Sample = (options = {}) => {
|
|
31
|
-
const {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return frames;
|
|
43
|
-
});
|
|
50
|
+
const { strategy = 'median', thresholds = 2000, groupBy = 'series', } = options;
|
|
51
|
+
const sampleFunction = normalizeSample(strategy);
|
|
52
|
+
return (I, mark) => {
|
|
53
|
+
const { encode } = mark;
|
|
54
|
+
const groups = createGroups(groupBy, I, mark);
|
|
55
|
+
const [X] = columnOf(encode, 'x');
|
|
56
|
+
const [Y] = columnOf(encode, 'y');
|
|
57
|
+
return [
|
|
58
|
+
groups.flatMap((g) => sampleFunction(g, X, Y, thresholds)),
|
|
59
|
+
mark,
|
|
60
|
+
];
|
|
44
61
|
};
|
|
45
|
-
return GroupN(Object.assign(Object.assign({}, rest), { groupBy }));
|
|
46
62
|
};
|
|
47
63
|
Sample.props = {};
|
|
48
64
|
//# sourceMappingURL=sample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sample.js","sourceRoot":"src/","sources":["transform/sample.ts"],"names":[],"mappings":"
|
|
1
|
+
{"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