@antv/g2 5.0.0-beta.3 → 5.0.0-beta.5
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 +5 -2
- package/dist/g2.min.js +5 -2
- package/esm/api/mark/mark.js +1 -2
- package/esm/api/mark/mark.js.map +1 -1
- package/esm/api/mark/types.d.ts +1 -2
- package/esm/component/axis.js +46 -24
- package/esm/component/axis.js.map +1 -1
- package/esm/component/index.d.ts +4 -0
- package/esm/component/index.js +2 -0
- package/esm/component/index.js.map +1 -1
- package/esm/component/legendCategory.js +1 -0
- package/esm/component/legendCategory.js.map +1 -1
- package/esm/component/slider.d.ts +9 -0
- package/esm/component/slider.js +57 -0
- package/esm/component/slider.js.map +1 -0
- package/esm/component/sliderX.d.ts +7 -0
- package/esm/component/sliderX.js +9 -0
- package/esm/component/sliderX.js.map +1 -0
- package/esm/component/sliderY.d.ts +7 -0
- package/esm/component/sliderY.js +9 -0
- package/esm/component/sliderY.js.map +1 -0
- package/esm/composition/facetRect.js +4 -4
- package/esm/composition/facetRect.js.map +1 -1
- package/esm/composition/mark.js +3 -1
- package/esm/composition/mark.js.map +1 -1
- package/esm/composition/repeatMatrix.js +2 -2
- package/esm/composition/repeatMatrix.js.map +1 -1
- package/esm/data/filter.d.ts +3 -3
- package/esm/data/filter.js.map +1 -1
- package/esm/data/index.d.ts +3 -1
- package/esm/data/index.js +1 -0
- package/esm/data/index.js.map +1 -1
- package/esm/data/sort.d.ts +8 -0
- package/esm/data/sort.js +12 -0
- package/esm/data/sort.js.map +1 -0
- package/esm/interaction/builtin/brushHighlight.d.ts +1 -1
- package/esm/interaction/builtin/tooltip.d.ts +6 -4
- package/esm/interaction/index.d.ts +5 -0
- package/esm/interaction/index.js +5 -0
- package/esm/interaction/index.js.map +1 -1
- package/esm/interaction/native/brushHighlight.d.ts +15 -0
- package/esm/interaction/native/brushHighlight.js +283 -0
- package/esm/interaction/native/brushHighlight.js.map +1 -0
- package/esm/interaction/native/brushXHighlight.d.ts +1 -0
- package/esm/interaction/native/brushXHighlight.js +8 -0
- package/esm/interaction/native/brushXHighlight.js.map +1 -0
- package/esm/interaction/native/brushYHighlight.d.ts +1 -0
- package/esm/interaction/native/brushYHighlight.js +8 -0
- package/esm/interaction/native/brushYHighlight.js.map +1 -0
- package/esm/interaction/native/legendFilter.d.ts +8 -0
- package/esm/interaction/native/legendFilter.js +180 -0
- package/esm/interaction/native/legendFilter.js.map +1 -0
- package/esm/interaction/native/tooltip.d.ts +2 -2
- package/esm/interaction/native/tooltip.js +134 -44
- package/esm/interaction/native/tooltip.js.map +1 -1
- package/esm/interaction/native/utils.d.ts +5 -1
- package/esm/interaction/native/utils.js +25 -2
- package/esm/interaction/native/utils.js.map +1 -1
- package/esm/label-transform/contrastReverse.d.ts +9 -0
- package/esm/label-transform/contrastReverse.js +48 -0
- package/esm/label-transform/contrastReverse.js.map +1 -0
- package/esm/label-transform/index.d.ts +8 -8
- package/esm/label-transform/index.js +4 -4
- package/esm/label-transform/index.js.map +1 -1
- package/esm/label-transform/overflowHide.d.ts +7 -0
- package/esm/label-transform/overflowHide.js +18 -0
- package/esm/label-transform/overflowHide.js.map +1 -0
- package/esm/label-transform/overlapDodgeY.d.ts +7 -0
- package/esm/label-transform/{dodgeY.js → overlapDodgeY.js} +4 -4
- package/esm/label-transform/overlapDodgeY.js.map +1 -0
- package/esm/label-transform/overlapHide.d.ts +7 -0
- package/esm/label-transform/overlapHide.js +24 -0
- package/esm/label-transform/overlapHide.js.map +1 -0
- package/esm/mark/area.js +1 -1
- package/esm/mark/area.js.map +1 -1
- package/esm/mark/line.js +1 -1
- package/esm/mark/line.js.map +1 -1
- package/esm/runtime/component.js +29 -1
- package/esm/runtime/component.js.map +1 -1
- package/esm/runtime/plot.js +38 -13
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/scale.js +17 -5
- package/esm/runtime/scale.js.map +1 -1
- package/esm/runtime/transform.js +10 -4
- package/esm/runtime/transform.js.map +1 -1
- package/esm/runtime/types/common.d.ts +1 -0
- package/esm/runtime/types/mark.d.ts +1 -1
- package/esm/runtime/types/options.d.ts +2 -0
- package/esm/runtime/types/theme.d.ts +5 -0
- package/esm/shape/label/label.js +3 -3
- package/esm/shape/label/label.js.map +1 -1
- package/esm/shape/label/position/area.d.ts +13 -0
- package/esm/shape/label/position/area.js +28 -0
- package/esm/shape/label/position/area.js.map +1 -0
- package/esm/shape/label/position/bottom.d.ts +1 -0
- package/esm/shape/label/position/bottom.js +2 -0
- package/esm/shape/label/position/bottom.js.map +1 -0
- package/esm/shape/label/position/bottomLeft.d.ts +1 -0
- package/esm/shape/label/position/bottomLeft.js +2 -0
- package/esm/shape/label/position/bottomLeft.js.map +1 -0
- package/esm/shape/label/position/bottomRight.d.ts +1 -0
- package/esm/shape/label/position/bottomRight.js +2 -0
- package/esm/shape/label/position/bottomRight.js.map +1 -0
- package/esm/shape/label/position/default.d.ts +20 -0
- package/esm/shape/label/{position.js → position/default.js} +9 -45
- package/esm/shape/label/position/default.js.map +1 -0
- package/esm/shape/label/position/index.d.ts +13 -0
- package/esm/shape/label/position/index.js +14 -0
- package/esm/shape/label/position/index.js.map +1 -0
- package/esm/shape/label/position/inside.d.ts +1 -0
- package/esm/shape/label/position/inside.js +2 -0
- package/esm/shape/label/position/inside.js.map +1 -0
- package/esm/shape/label/position/left.d.ts +1 -0
- package/esm/shape/label/position/left.js +2 -0
- package/esm/shape/label/position/left.js.map +1 -0
- package/esm/shape/label/position/outside.d.ts +1 -0
- package/esm/shape/label/position/outside.js +2 -0
- package/esm/shape/label/position/outside.js.map +1 -0
- package/esm/shape/label/position/right.d.ts +1 -0
- package/esm/shape/label/position/right.js +2 -0
- package/esm/shape/label/position/right.js.map +1 -0
- package/esm/shape/label/position/spider.d.ts +7 -0
- package/esm/shape/label/position/spider.js +40 -0
- package/esm/shape/label/position/spider.js.map +1 -0
- package/esm/shape/label/position/surround.d.ts +7 -0
- package/esm/shape/label/position/surround.js +37 -0
- package/esm/shape/label/position/surround.js.map +1 -0
- package/esm/shape/label/position/top.d.ts +1 -0
- package/esm/shape/label/position/top.js +2 -0
- package/esm/shape/label/position/top.js.map +1 -0
- package/esm/shape/label/position/topLeft.d.ts +1 -0
- package/esm/shape/label/position/topLeft.js +2 -0
- package/esm/shape/label/position/topLeft.js.map +1 -0
- package/esm/shape/label/position/topRight.d.ts +1 -0
- package/esm/shape/label/position/topRight.js +2 -0
- package/esm/shape/label/position/topRight.js.map +1 -0
- package/esm/spec/composition.d.ts +2 -0
- package/esm/spec/data.d.ts +10 -3
- package/esm/spec/geometry.d.ts +2 -1
- package/esm/spec/interaction.d.ts +28 -5
- package/esm/spec/labelTransform.d.ts +24 -11
- package/esm/spec/theme.d.ts +5 -2
- package/esm/spec/transform.d.ts +7 -2
- package/esm/stdlib/index.js +9 -10
- package/esm/stdlib/index.js.map +1 -1
- package/esm/theme/academy.d.ts +3 -0
- package/esm/theme/academy.js +402 -0
- package/esm/theme/academy.js.map +1 -0
- package/esm/theme/dark.js +80 -29
- package/esm/theme/dark.js.map +1 -1
- package/esm/theme/index.d.ts +1 -0
- package/esm/theme/index.js +1 -0
- package/esm/theme/index.js.map +1 -1
- package/esm/theme/light.js +71 -19
- package/esm/theme/light.js.map +1 -1
- package/esm/transform/filter.d.ts +7 -0
- package/esm/transform/filter.js +42 -0
- package/esm/transform/filter.js.map +1 -0
- package/esm/transform/index.d.ts +2 -0
- package/esm/transform/index.js +1 -0
- package/esm/transform/index.js.map +1 -1
- package/esm/transform/maybeTooltip.js +3 -1
- package/esm/transform/maybeTooltip.js.map +1 -1
- package/esm/utils/bounds.d.ts +26 -0
- package/esm/utils/bounds.js +41 -0
- package/esm/utils/bounds.js.map +1 -0
- package/esm/utils/color.d.ts +6 -0
- package/esm/utils/color.js +7 -0
- package/esm/utils/color.js.map +1 -0
- package/esm/utils/coordinate.d.ts +1 -0
- package/esm/utils/coordinate.js +12 -0
- package/esm/utils/coordinate.js.map +1 -1
- package/esm/utils/helper.d.ts +1 -0
- package/esm/utils/helper.js +3 -0
- package/esm/utils/helper.js.map +1 -1
- package/esm/utils/selection.d.ts +1 -0
- package/esm/utils/selection.js.map +1 -1
- package/esm/utils/size.js +1 -1
- package/esm/utils/size.js.map +1 -1
- package/lib/api/mark/mark.js +1 -2
- package/lib/api/mark/mark.js.map +1 -1
- package/lib/api/mark/types.d.ts +1 -2
- package/lib/component/axis.js +46 -24
- package/lib/component/axis.js.map +1 -1
- package/lib/component/index.d.ts +4 -0
- package/lib/component/index.js +5 -1
- package/lib/component/index.js.map +1 -1
- package/lib/component/legendCategory.js +1 -0
- package/lib/component/legendCategory.js.map +1 -1
- package/lib/component/slider.d.ts +9 -0
- package/lib/component/slider.js +61 -0
- package/lib/component/slider.js.map +1 -0
- package/lib/component/sliderX.d.ts +7 -0
- package/lib/component/sliderX.js +13 -0
- package/lib/component/sliderX.js.map +1 -0
- package/lib/component/sliderY.d.ts +7 -0
- package/lib/component/sliderY.js +13 -0
- package/lib/component/sliderY.js.map +1 -0
- package/lib/composition/facetRect.js +4 -4
- package/lib/composition/facetRect.js.map +1 -1
- package/lib/composition/mark.js +3 -1
- package/lib/composition/mark.js.map +1 -1
- package/lib/composition/repeatMatrix.js +2 -2
- package/lib/composition/repeatMatrix.js.map +1 -1
- package/lib/data/filter.d.ts +3 -3
- package/lib/data/filter.js.map +1 -1
- package/lib/data/index.d.ts +3 -1
- package/lib/data/index.js +3 -1
- package/lib/data/index.js.map +1 -1
- package/lib/data/sort.d.ts +8 -0
- package/lib/data/sort.js +17 -0
- package/lib/data/sort.js.map +1 -0
- package/lib/interaction/builtin/brushHighlight.d.ts +1 -1
- package/lib/interaction/builtin/tooltip.d.ts +6 -4
- package/lib/interaction/index.d.ts +5 -0
- package/lib/interaction/index.js +11 -1
- package/lib/interaction/index.js.map +1 -1
- package/lib/interaction/native/brushHighlight.d.ts +15 -0
- package/lib/interaction/native/brushHighlight.js +289 -0
- package/lib/interaction/native/brushHighlight.js.map +1 -0
- package/lib/interaction/native/brushXHighlight.d.ts +1 -0
- package/lib/interaction/native/brushXHighlight.js +12 -0
- package/lib/interaction/native/brushXHighlight.js.map +1 -0
- package/lib/interaction/native/brushYHighlight.d.ts +1 -0
- package/lib/interaction/native/brushYHighlight.js +12 -0
- package/lib/interaction/native/brushYHighlight.js.map +1 -0
- package/lib/interaction/native/legendFilter.d.ts +8 -0
- package/lib/interaction/native/legendFilter.js +184 -0
- package/lib/interaction/native/legendFilter.js.map +1 -0
- package/lib/interaction/native/tooltip.d.ts +2 -2
- package/lib/interaction/native/tooltip.js +131 -41
- package/lib/interaction/native/tooltip.js.map +1 -1
- package/lib/interaction/native/utils.d.ts +5 -1
- package/lib/interaction/native/utils.js +30 -3
- package/lib/interaction/native/utils.js.map +1 -1
- package/lib/label-transform/contrastReverse.d.ts +9 -0
- package/lib/label-transform/contrastReverse.js +52 -0
- package/lib/label-transform/contrastReverse.js.map +1 -0
- package/lib/label-transform/index.d.ts +8 -8
- package/lib/label-transform/index.js +9 -9
- package/lib/label-transform/index.js.map +1 -1
- package/lib/label-transform/overflowHide.d.ts +7 -0
- package/lib/label-transform/overflowHide.js +22 -0
- package/lib/label-transform/overflowHide.js.map +1 -0
- package/lib/label-transform/overlapDodgeY.d.ts +7 -0
- package/lib/label-transform/{dodgeY.js → overlapDodgeY.js} +6 -6
- package/lib/label-transform/overlapDodgeY.js.map +1 -0
- package/lib/label-transform/overlapHide.d.ts +7 -0
- package/lib/label-transform/overlapHide.js +28 -0
- package/lib/label-transform/overlapHide.js.map +1 -0
- package/lib/mark/area.js +1 -1
- package/lib/mark/area.js.map +1 -1
- package/lib/mark/line.js +1 -1
- package/lib/mark/line.js.map +1 -1
- package/lib/runtime/component.js +29 -1
- package/lib/runtime/component.js.map +1 -1
- package/lib/runtime/plot.js +38 -13
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/scale.js +16 -4
- package/lib/runtime/scale.js.map +1 -1
- package/lib/runtime/transform.js +10 -4
- package/lib/runtime/transform.js.map +1 -1
- package/lib/runtime/types/common.d.ts +1 -0
- package/lib/runtime/types/mark.d.ts +1 -1
- package/lib/runtime/types/options.d.ts +2 -0
- package/lib/runtime/types/theme.d.ts +5 -0
- package/lib/shape/label/label.js +3 -3
- package/lib/shape/label/label.js.map +1 -1
- package/lib/shape/label/position/area.d.ts +13 -0
- package/lib/shape/label/position/area.js +32 -0
- package/lib/shape/label/position/area.js.map +1 -0
- package/lib/shape/label/position/bottom.d.ts +1 -0
- package/lib/shape/label/position/bottom.js +6 -0
- package/lib/shape/label/position/bottom.js.map +1 -0
- package/lib/shape/label/position/bottomLeft.d.ts +1 -0
- package/lib/shape/label/position/bottomLeft.js +6 -0
- package/lib/shape/label/position/bottomLeft.js.map +1 -0
- package/lib/shape/label/position/bottomRight.d.ts +1 -0
- package/lib/shape/label/position/bottomRight.js +6 -0
- package/lib/shape/label/position/bottomRight.js.map +1 -0
- package/lib/shape/label/position/default.d.ts +20 -0
- package/lib/shape/label/{position.js → position/default.js} +10 -43
- package/lib/shape/label/position/default.js.map +1 -0
- package/lib/shape/label/position/index.d.ts +13 -0
- package/lib/shape/label/position/index.js +30 -0
- package/lib/shape/label/position/index.js.map +1 -0
- package/lib/shape/label/position/inside.d.ts +1 -0
- package/lib/shape/label/position/inside.js +6 -0
- package/lib/shape/label/position/inside.js.map +1 -0
- package/lib/shape/label/position/left.d.ts +1 -0
- package/lib/shape/label/position/left.js +6 -0
- package/lib/shape/label/position/left.js.map +1 -0
- package/lib/shape/label/position/outside.d.ts +1 -0
- package/lib/shape/label/position/outside.js +6 -0
- package/lib/shape/label/position/outside.js.map +1 -0
- package/lib/shape/label/position/right.d.ts +1 -0
- package/lib/shape/label/position/right.js +6 -0
- package/lib/shape/label/position/right.js.map +1 -0
- package/lib/shape/label/position/spider.d.ts +7 -0
- package/lib/shape/label/position/spider.js +44 -0
- package/lib/shape/label/position/spider.js.map +1 -0
- package/lib/shape/label/position/surround.d.ts +7 -0
- package/lib/shape/label/position/surround.js +41 -0
- package/lib/shape/label/position/surround.js.map +1 -0
- package/lib/shape/label/position/top.d.ts +1 -0
- package/lib/shape/label/position/top.js +6 -0
- package/lib/shape/label/position/top.js.map +1 -0
- package/lib/shape/label/position/topLeft.d.ts +1 -0
- package/lib/shape/label/position/topLeft.js +6 -0
- package/lib/shape/label/position/topLeft.js.map +1 -0
- package/lib/shape/label/position/topRight.d.ts +1 -0
- package/lib/shape/label/position/topRight.js +6 -0
- package/lib/shape/label/position/topRight.js.map +1 -0
- package/lib/spec/composition.d.ts +2 -0
- package/lib/spec/data.d.ts +10 -3
- package/lib/spec/geometry.d.ts +2 -1
- package/lib/spec/interaction.d.ts +28 -5
- package/lib/spec/labelTransform.d.ts +24 -11
- package/lib/spec/theme.d.ts +5 -2
- package/lib/spec/transform.d.ts +7 -2
- package/lib/stdlib/index.js +3 -4
- package/lib/stdlib/index.js.map +1 -1
- package/lib/theme/academy.d.ts +3 -0
- package/lib/theme/academy.js +406 -0
- package/lib/theme/academy.js.map +1 -0
- package/lib/theme/dark.js +80 -29
- package/lib/theme/dark.js.map +1 -1
- package/lib/theme/index.d.ts +1 -0
- package/lib/theme/index.js +3 -1
- package/lib/theme/index.js.map +1 -1
- package/lib/theme/light.js +71 -19
- package/lib/theme/light.js.map +1 -1
- package/lib/transform/filter.d.ts +7 -0
- package/lib/transform/filter.js +46 -0
- package/lib/transform/filter.js.map +1 -0
- package/lib/transform/index.d.ts +2 -0
- package/lib/transform/index.js +3 -1
- package/lib/transform/index.js.map +1 -1
- package/lib/transform/maybeTooltip.js +3 -1
- package/lib/transform/maybeTooltip.js.map +1 -1
- package/lib/utils/bounds.d.ts +26 -0
- package/lib/utils/bounds.js +48 -0
- package/lib/utils/bounds.js.map +1 -0
- package/lib/utils/color.d.ts +6 -0
- package/lib/utils/color.js +11 -0
- package/lib/utils/color.js.map +1 -0
- package/lib/utils/coordinate.d.ts +1 -0
- package/lib/utils/coordinate.js +14 -1
- package/lib/utils/coordinate.js.map +1 -1
- package/lib/utils/helper.d.ts +1 -0
- package/lib/utils/helper.js +5 -1
- package/lib/utils/helper.js.map +1 -1
- package/lib/utils/selection.d.ts +1 -0
- package/lib/utils/selection.js.map +1 -1
- package/lib/utils/size.js +1 -1
- package/lib/utils/size.js.map +1 -1
- package/package.json +4 -3
- package/src/api/mark/mark.ts +1 -2
- package/src/api/mark/types.ts +1 -2
- package/src/component/axis.ts +56 -96
- package/src/component/index.ts +4 -0
- package/src/component/legendCategory.ts +1 -0
- package/src/component/slider.ts +61 -0
- package/src/component/sliderX.ts +16 -0
- package/src/component/sliderY.ts +16 -0
- package/src/composition/facetRect.ts +4 -2
- package/src/composition/mark.ts +4 -0
- package/src/composition/repeatMatrix.ts +8 -1
- package/src/data/filter.ts +3 -3
- package/src/data/index.ts +3 -1
- package/src/data/sort.ts +18 -0
- package/src/interaction/index.ts +6 -0
- package/src/interaction/native/brushHighlight.ts +346 -0
- package/src/interaction/native/brushXHighlight.ts +11 -0
- package/src/interaction/native/brushYHighlight.ts +11 -0
- package/src/interaction/native/legendFilter.ts +195 -0
- package/src/interaction/native/tooltip.ts +173 -45
- package/src/interaction/native/utils.ts +33 -1
- package/src/label-transform/contrastReverse.ts +56 -0
- package/src/label-transform/index.ts +8 -8
- package/src/label-transform/overflowHide.ts +23 -0
- package/src/label-transform/{dodgeY.ts → overlapDodgeY.ts} +6 -6
- package/src/label-transform/overlapHide.ts +32 -0
- package/src/mark/area.ts +1 -1
- package/src/mark/line.ts +1 -1
- package/src/runtime/component.ts +49 -2
- package/src/runtime/plot.ts +46 -11
- package/src/runtime/scale.ts +15 -7
- package/src/runtime/transform.ts +13 -4
- package/src/runtime/types/common.ts +1 -0
- package/src/runtime/types/mark.ts +1 -1
- package/src/runtime/types/options.ts +2 -0
- package/src/runtime/types/theme.ts +5 -0
- package/src/shape/label/label.ts +4 -3
- package/src/shape/label/position/area.ts +39 -0
- package/src/shape/label/position/bottom.ts +1 -0
- package/src/shape/label/position/bottomLeft.ts +1 -0
- package/src/shape/label/position/bottomRight.ts +1 -0
- package/src/shape/label/{position.ts → position/default.ts} +12 -56
- package/src/shape/label/position/index.ts +13 -0
- package/src/shape/label/position/inside.ts +1 -0
- package/src/shape/label/position/left.ts +1 -0
- package/src/shape/label/position/outside.ts +1 -0
- package/src/shape/label/position/right.ts +1 -0
- package/src/shape/label/position/spider.ts +46 -0
- package/src/shape/label/position/surround.ts +42 -0
- package/src/shape/label/position/top.ts +1 -0
- package/src/shape/label/position/topLeft.ts +1 -0
- package/src/shape/label/position/topRight.ts +1 -0
- package/src/spec/composition.ts +2 -0
- package/src/spec/data.ts +12 -2
- package/src/spec/geometry.ts +3 -1
- package/src/spec/interaction.ts +38 -4
- package/src/spec/labelTransform.ts +29 -11
- package/src/spec/theme.ts +6 -2
- package/src/spec/transform.ts +9 -1
- package/src/stdlib/index.ts +31 -9
- package/src/theme/academy.ts +408 -0
- package/src/theme/dark.ts +81 -29
- package/src/theme/index.ts +1 -0
- package/src/theme/light.ts +71 -19
- package/src/transform/filter.ts +48 -0
- package/src/transform/index.ts +2 -0
- package/src/transform/maybeTooltip.ts +3 -1
- package/src/utils/bounds.ts +52 -0
- package/src/utils/color.ts +12 -0
- package/src/utils/coordinate.ts +12 -0
- package/src/utils/helper.ts +4 -0
- package/src/utils/selection.ts +2 -0
- package/src/utils/size.ts +1 -1
- package/esm/label-transform/dodgeY.d.ts +0 -7
- package/esm/label-transform/dodgeY.js.map +0 -1
- package/esm/label-transform/hideOverlap.d.ts +0 -4
- package/esm/label-transform/hideOverlap.js +0 -48
- package/esm/label-transform/hideOverlap.js.map +0 -1
- package/esm/label-transform/spider.d.ts +0 -7
- package/esm/label-transform/spider.js +0 -30
- package/esm/label-transform/spider.js.map +0 -1
- package/esm/label-transform/surround.d.ts +0 -7
- package/esm/label-transform/surround.js +0 -30
- package/esm/label-transform/surround.js.map +0 -1
- package/esm/shape/label/position.d.ts +0 -25
- package/esm/shape/label/position.js.map +0 -1
- package/lib/label-transform/dodgeY.d.ts +0 -7
- package/lib/label-transform/dodgeY.js.map +0 -1
- package/lib/label-transform/hideOverlap.d.ts +0 -4
- package/lib/label-transform/hideOverlap.js +0 -52
- package/lib/label-transform/hideOverlap.js.map +0 -1
- package/lib/label-transform/spider.d.ts +0 -7
- package/lib/label-transform/spider.js +0 -34
- package/lib/label-transform/spider.js.map +0 -1
- package/lib/label-transform/surround.d.ts +0 -7
- package/lib/label-transform/surround.js +0 -34
- package/lib/label-transform/surround.js.map +0 -1
- package/lib/shape/label/position.d.ts +0 -25
- package/lib/shape/label/position.js.map +0 -1
- package/src/label-transform/hideOverlap.ts +0 -62
- package/src/label-transform/spider.ts +0 -37
- package/src/label-transform/surround.ts +0 -37
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
import { ThemeComponent as TC, Theme } from '../runtime';
|
|
2
|
+
|
|
3
|
+
export type AcademyOptions = Theme;
|
|
4
|
+
|
|
5
|
+
const COLORS = {
|
|
6
|
+
BLACK: '#000',
|
|
7
|
+
WHITE: '#fff',
|
|
8
|
+
STROKE: '#888',
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const BACKGROUND_COLOR = 'transparent';
|
|
12
|
+
|
|
13
|
+
export const Academy: TC<AcademyOptions> = (options) => {
|
|
14
|
+
const DEFAULT_COLOR = '#4e79a7';
|
|
15
|
+
const defaultOptions: Theme = {
|
|
16
|
+
defaultColor: DEFAULT_COLOR,
|
|
17
|
+
defaultCategory10: 'tableau10',
|
|
18
|
+
defaultCategory20: 'tableau10',
|
|
19
|
+
defaultSize: 1,
|
|
20
|
+
elementActiveStroke: COLORS.BLACK,
|
|
21
|
+
enter: {
|
|
22
|
+
duration: 300,
|
|
23
|
+
fill: 'both',
|
|
24
|
+
delay: 0,
|
|
25
|
+
},
|
|
26
|
+
update: {
|
|
27
|
+
duration: 300,
|
|
28
|
+
fill: 'both',
|
|
29
|
+
delay: 0,
|
|
30
|
+
},
|
|
31
|
+
exit: {
|
|
32
|
+
duration: 300,
|
|
33
|
+
fill: 'both',
|
|
34
|
+
delay: 0,
|
|
35
|
+
},
|
|
36
|
+
// --- Theme of area style
|
|
37
|
+
viewFill: BACKGROUND_COLOR,
|
|
38
|
+
plotFill: 'transparent',
|
|
39
|
+
mainFill: 'transparent',
|
|
40
|
+
contentFill: 'transparent',
|
|
41
|
+
// --- Theme of mark shape
|
|
42
|
+
line: {
|
|
43
|
+
line: {
|
|
44
|
+
fill: '',
|
|
45
|
+
strokeOpacity: 1,
|
|
46
|
+
lineWidth: 1,
|
|
47
|
+
connectStroke: '#aaa',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
point: {
|
|
51
|
+
point: {
|
|
52
|
+
r: 3,
|
|
53
|
+
fillOpacity: 0.95,
|
|
54
|
+
lineWidth: 0,
|
|
55
|
+
},
|
|
56
|
+
hollow: {
|
|
57
|
+
r: 3,
|
|
58
|
+
fill: '',
|
|
59
|
+
strokeOpacity: 0.95,
|
|
60
|
+
lineWidth: 1,
|
|
61
|
+
},
|
|
62
|
+
plus: {
|
|
63
|
+
r: 3,
|
|
64
|
+
fill: '',
|
|
65
|
+
strokeOpacity: 0.95,
|
|
66
|
+
lineWidth: 3,
|
|
67
|
+
},
|
|
68
|
+
diamond: {
|
|
69
|
+
r: 3,
|
|
70
|
+
fill: '',
|
|
71
|
+
strokeOpacity: 0.95,
|
|
72
|
+
lineWidth: 1,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
interval: {
|
|
76
|
+
rect: {
|
|
77
|
+
fillOpacity: 0.95,
|
|
78
|
+
},
|
|
79
|
+
hollow: {
|
|
80
|
+
fill: '',
|
|
81
|
+
strokeOpacity: 1,
|
|
82
|
+
lineWidth: 2,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
area: {
|
|
86
|
+
area: {
|
|
87
|
+
fillOpacity: 0.85,
|
|
88
|
+
lineWidth: 0,
|
|
89
|
+
connectFill: COLORS.BLACK,
|
|
90
|
+
connectFillOpacity: 0.1,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
polygon: {
|
|
94
|
+
polygon: {
|
|
95
|
+
fillOpacity: 0.95,
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
cell: {
|
|
99
|
+
cell: {
|
|
100
|
+
fillOpacity: 0.95,
|
|
101
|
+
},
|
|
102
|
+
hollow: {
|
|
103
|
+
fill: '',
|
|
104
|
+
strokeOpacity: 1,
|
|
105
|
+
lineWidth: 2,
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
rect: {
|
|
109
|
+
rect: {
|
|
110
|
+
fillOpacity: 0.95,
|
|
111
|
+
},
|
|
112
|
+
hollow: {
|
|
113
|
+
fill: '',
|
|
114
|
+
strokeOpacity: 1,
|
|
115
|
+
lineWidth: 2,
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
link: {
|
|
119
|
+
link: {
|
|
120
|
+
fill: '',
|
|
121
|
+
strokeOpacity: 1,
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
vector: {
|
|
125
|
+
vector: {
|
|
126
|
+
fillOpacity: 1,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
box: {
|
|
130
|
+
box: {
|
|
131
|
+
fillOpacity: 0.95,
|
|
132
|
+
stroke: '#1D2129',
|
|
133
|
+
lineWidth: 1,
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
text: {
|
|
137
|
+
text: {
|
|
138
|
+
fill: '#1D2129',
|
|
139
|
+
fontSize: 10,
|
|
140
|
+
strokeWidth: 0,
|
|
141
|
+
connectorStroke: COLORS.STROKE,
|
|
142
|
+
connectorStrokeOpacity: 0.45,
|
|
143
|
+
connectorLineWidth: 1,
|
|
144
|
+
backgroundFill: COLORS.STROKE,
|
|
145
|
+
backgroundFillOpacity: 0.15,
|
|
146
|
+
backgroundPadding: [2, 4],
|
|
147
|
+
startMarkerSymbol: 'circle',
|
|
148
|
+
startMarkerSize: 4,
|
|
149
|
+
endMarkerSymbol: 'circle',
|
|
150
|
+
endMarkerSize: 4,
|
|
151
|
+
},
|
|
152
|
+
badge: {
|
|
153
|
+
fill: '#1D2129',
|
|
154
|
+
fillOpacity: 0.65,
|
|
155
|
+
strokeWidth: 0,
|
|
156
|
+
fontSize: 10,
|
|
157
|
+
textAlign: 'center',
|
|
158
|
+
textBaseline: 'middle',
|
|
159
|
+
markerFill: COLORS.STROKE,
|
|
160
|
+
markerFillOpacity: 0.25,
|
|
161
|
+
markerStrokeOpacity: 0,
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
lineX: {
|
|
165
|
+
line: {
|
|
166
|
+
stroke: COLORS.STROKE,
|
|
167
|
+
strokeOpacity: 0.45,
|
|
168
|
+
lineWidth: 1,
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
lineY: {
|
|
172
|
+
line: {
|
|
173
|
+
stroke: COLORS.STROKE,
|
|
174
|
+
strokeOpacity: 0.45,
|
|
175
|
+
lineWidth: 1,
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
rangeX: {
|
|
179
|
+
range: {
|
|
180
|
+
fill: COLORS.STROKE,
|
|
181
|
+
fillOpacity: 0.15,
|
|
182
|
+
lineWidth: 0,
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
rangeY: {
|
|
186
|
+
range: {
|
|
187
|
+
fill: COLORS.STROKE,
|
|
188
|
+
fillOpacity: 0.15,
|
|
189
|
+
lineWidth: 0,
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
connector: {
|
|
193
|
+
connector: {
|
|
194
|
+
stroke: COLORS.STROKE,
|
|
195
|
+
strokeOpacity: 0.45,
|
|
196
|
+
lineWidth: 1,
|
|
197
|
+
connectLength1: 12,
|
|
198
|
+
endMarker: true,
|
|
199
|
+
endMarkerSize: 6,
|
|
200
|
+
endMarkerFill: COLORS.STROKE,
|
|
201
|
+
endMarkerFillOpacity: 0.95,
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
interaction: {
|
|
205
|
+
active: {
|
|
206
|
+
line: {
|
|
207
|
+
line: { lineWidth: 3 },
|
|
208
|
+
},
|
|
209
|
+
interval: {
|
|
210
|
+
rect: { stroke: COLORS.BLACK },
|
|
211
|
+
},
|
|
212
|
+
area: {
|
|
213
|
+
area: { fillOpacity: 0.5 },
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
inactive: {
|
|
217
|
+
area: {
|
|
218
|
+
area: { fillOpacity: 0.3 },
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
selected: {},
|
|
222
|
+
disabled: {},
|
|
223
|
+
},
|
|
224
|
+
axis: {
|
|
225
|
+
titleFill: COLORS.BLACK,
|
|
226
|
+
titleFillOpacity: 1,
|
|
227
|
+
titleFontSize: 11,
|
|
228
|
+
titleFontWeight: 'bold',
|
|
229
|
+
titleSpacing: 12,
|
|
230
|
+
line: true,
|
|
231
|
+
lineStroke: '#888',
|
|
232
|
+
lineStrokeOpacity: 1,
|
|
233
|
+
lineLineWidth: 1,
|
|
234
|
+
lineArrow: null,
|
|
235
|
+
tickStroke: COLORS.STROKE,
|
|
236
|
+
tickStrokeOpacity: 1,
|
|
237
|
+
tickLineWidth: 1,
|
|
238
|
+
tickLength: 5,
|
|
239
|
+
labelFill: COLORS.BLACK,
|
|
240
|
+
labelFillOpacity: 1,
|
|
241
|
+
labelFontSize: 10,
|
|
242
|
+
labelAutoRotate: false,
|
|
243
|
+
labelFontWeight: 'normal',
|
|
244
|
+
labelSpacing: 4,
|
|
245
|
+
labelAlign: 'horizontal',
|
|
246
|
+
gridStroke: '#ddd',
|
|
247
|
+
gridStrokeOpacity: 1,
|
|
248
|
+
gridLineWidth: 1,
|
|
249
|
+
gridLineDash: [0, 0],
|
|
250
|
+
titleTransformOrigin: 'center',
|
|
251
|
+
},
|
|
252
|
+
axisTop: {
|
|
253
|
+
titlePosition: 'top',
|
|
254
|
+
titleSpacing: 0,
|
|
255
|
+
titleTextBaseline: 'middle',
|
|
256
|
+
labelDirection: 'negative',
|
|
257
|
+
tickDirection: 'negative',
|
|
258
|
+
gridDirection: 'positive',
|
|
259
|
+
},
|
|
260
|
+
axisBottom: {
|
|
261
|
+
titleSpacing: 4,
|
|
262
|
+
titleTextBaseline: 'bottom',
|
|
263
|
+
labelSpacing: 8,
|
|
264
|
+
labelDirection: 'positive',
|
|
265
|
+
tickDirection: 'positive',
|
|
266
|
+
gridDirection: 'negative',
|
|
267
|
+
},
|
|
268
|
+
axisLeft: {
|
|
269
|
+
titleTextBaseline: 'middle',
|
|
270
|
+
titleSpacing: 4,
|
|
271
|
+
titlePosition: 'left',
|
|
272
|
+
titleTransformOrigin: 'center',
|
|
273
|
+
titleTransform: `translate(50%, 0) rotate(-90) translate(0, -50%)`,
|
|
274
|
+
labelSpacing: 4,
|
|
275
|
+
labelDirection: 'positive',
|
|
276
|
+
tickDirection: 'positive',
|
|
277
|
+
gridDirection: 'negative',
|
|
278
|
+
},
|
|
279
|
+
axisRight: {
|
|
280
|
+
titleTextBaseline: 'top',
|
|
281
|
+
titleSpacing: 0,
|
|
282
|
+
titlePosition: 'right',
|
|
283
|
+
titleTransformOrigin: 'center',
|
|
284
|
+
titleTransform: `translate(-50%, 0) rotate(-90)`,
|
|
285
|
+
labelSpacing: 4,
|
|
286
|
+
labelDirection: 'negative',
|
|
287
|
+
tickDirection: 'negative',
|
|
288
|
+
gridDirection: 'positive',
|
|
289
|
+
},
|
|
290
|
+
axisArcY: {
|
|
291
|
+
titlePosition: 'top',
|
|
292
|
+
titleSpacing: 0,
|
|
293
|
+
titleTextBaseline: 'bottom',
|
|
294
|
+
gridDirection: 'negative',
|
|
295
|
+
gridConnect: 'arc',
|
|
296
|
+
gridControlAngles: [90, 180, 360],
|
|
297
|
+
gridType: 'surround',
|
|
298
|
+
girdClosed: true,
|
|
299
|
+
},
|
|
300
|
+
legend: {
|
|
301
|
+
padding: 8,
|
|
302
|
+
showTitle: false,
|
|
303
|
+
titleFill: COLORS.BLACK,
|
|
304
|
+
titleFillOpacity: 1,
|
|
305
|
+
titleFontSize: 11,
|
|
306
|
+
titleFontWeight: 'bold',
|
|
307
|
+
titleSpacing: 4,
|
|
308
|
+
// legend marker
|
|
309
|
+
itemMarkerFill: DEFAULT_COLOR,
|
|
310
|
+
itemMarkerFillOpacity: 1,
|
|
311
|
+
itemMarkerSize: 8,
|
|
312
|
+
itemSpacing: [5, 4],
|
|
313
|
+
itemLabelFill: COLORS.BLACK,
|
|
314
|
+
itemLabelFillOpacity: 1,
|
|
315
|
+
itemLabelFontSize: 10,
|
|
316
|
+
itemLabelFontWeight: 'normal',
|
|
317
|
+
itemValueFill: COLORS.BLACK,
|
|
318
|
+
itemValueFillOpacity: 1,
|
|
319
|
+
itemValueFontSize: 10,
|
|
320
|
+
itemValueFontWeight: 'normal',
|
|
321
|
+
itemBackgroundFill: 'transparent',
|
|
322
|
+
// [todo] rename legend navigator
|
|
323
|
+
navButtonFill: COLORS.BLACK,
|
|
324
|
+
navButtonFillOpacity: 0.45,
|
|
325
|
+
navButtonSize: 6,
|
|
326
|
+
navPageNumFill: COLORS.BLACK,
|
|
327
|
+
navPageNumFillOpacity: 0.45,
|
|
328
|
+
navPageNumFontSize: 10,
|
|
329
|
+
// others
|
|
330
|
+
backgroundFill: 'transparent',
|
|
331
|
+
},
|
|
332
|
+
continuousLegend: {
|
|
333
|
+
showTitle: false,
|
|
334
|
+
labelFill: COLORS.BLACK,
|
|
335
|
+
labelFillOpacity: 0.45,
|
|
336
|
+
labelFontSize: 10,
|
|
337
|
+
labelFontWeight: 'normal',
|
|
338
|
+
handleWidth: 10,
|
|
339
|
+
handleHeight: 12,
|
|
340
|
+
handleMarkerFill: COLORS.BLACK,
|
|
341
|
+
handleMarkerFillOpacity: 0.6,
|
|
342
|
+
handleMarkerStroke: COLORS.BLACK,
|
|
343
|
+
handleMarkerStrokeOpacity: 0.25,
|
|
344
|
+
handleMarkerLineWidth: 1,
|
|
345
|
+
handleLabelFill: COLORS.BLACK,
|
|
346
|
+
handleLabelFillOpacity: 0.45,
|
|
347
|
+
handleLabelFontSize: 10,
|
|
348
|
+
handleLabelFontWeight: 'normal',
|
|
349
|
+
},
|
|
350
|
+
label: {
|
|
351
|
+
fill: COLORS.BLACK,
|
|
352
|
+
fillOpacity: 0.65,
|
|
353
|
+
fontSize: 10,
|
|
354
|
+
fontWeight: 'normal',
|
|
355
|
+
stroke: null,
|
|
356
|
+
offset: 12,
|
|
357
|
+
connectorStroke: COLORS.BLACK,
|
|
358
|
+
connectorStrokeOpacity: 0.45,
|
|
359
|
+
connectorLineWidth: 1,
|
|
360
|
+
connectorLength2: 8,
|
|
361
|
+
connectorDistance: 4,
|
|
362
|
+
},
|
|
363
|
+
innerLabel: {
|
|
364
|
+
fill: COLORS.WHITE,
|
|
365
|
+
fontSize: 10,
|
|
366
|
+
fillOpacity: 0.85,
|
|
367
|
+
fontWeight: 'normal',
|
|
368
|
+
stroke: null,
|
|
369
|
+
offset: 0,
|
|
370
|
+
},
|
|
371
|
+
slider: {
|
|
372
|
+
trackSize: 16,
|
|
373
|
+
backgroundFill: COLORS.STROKE,
|
|
374
|
+
backgroundFillOpacity: 0.05,
|
|
375
|
+
selectionFill: DEFAULT_COLOR,
|
|
376
|
+
selectionFillOpacity: 0.15,
|
|
377
|
+
handleIconSize: 10,
|
|
378
|
+
handleIconFill: '#f7f7f7',
|
|
379
|
+
handleIconFillOpacity: 1,
|
|
380
|
+
handleIconStroke: COLORS.BLACK,
|
|
381
|
+
handleIconStrokeOpacity: 0.25,
|
|
382
|
+
handleIconLineWidth: 1,
|
|
383
|
+
handleIconRadius: 2,
|
|
384
|
+
handleLabelFill: COLORS.BLACK,
|
|
385
|
+
handleLabelFillOpacity: 0.45,
|
|
386
|
+
handleLabelFontSize: 10,
|
|
387
|
+
handleLabelFontWeight: 'normal',
|
|
388
|
+
},
|
|
389
|
+
scrollbar: {},
|
|
390
|
+
title: {
|
|
391
|
+
fill: COLORS.BLACK,
|
|
392
|
+
fillOpacity: 0.85,
|
|
393
|
+
fontSize: 24,
|
|
394
|
+
fontWeight: 'bold',
|
|
395
|
+
textBaseline: 'top',
|
|
396
|
+
},
|
|
397
|
+
subtitle: {
|
|
398
|
+
fill: COLORS.BLACK,
|
|
399
|
+
fillOpacity: 0.65,
|
|
400
|
+
fontSize: 10,
|
|
401
|
+
fontWeight: 'normal',
|
|
402
|
+
textBaseline: 'top',
|
|
403
|
+
},
|
|
404
|
+
};
|
|
405
|
+
return Object.assign({}, defaultOptions, options);
|
|
406
|
+
};
|
|
407
|
+
|
|
408
|
+
Academy.props = {};
|
package/src/theme/dark.ts
CHANGED
|
@@ -9,7 +9,6 @@ const COLORS = {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
const BACKGROUND_COLOR = '#141414';
|
|
12
|
-
const STROKE_COLOR = '#416180';
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
14
|
* Dark theme.
|
|
@@ -133,7 +132,7 @@ export const Dark: TC<DarkOptions> = (options) => {
|
|
|
133
132
|
box: {
|
|
134
133
|
box: {
|
|
135
134
|
fillOpacity: 0.95,
|
|
136
|
-
stroke:
|
|
135
|
+
stroke: COLORS.BLACK,
|
|
137
136
|
lineWidth: 1,
|
|
138
137
|
},
|
|
139
138
|
},
|
|
@@ -143,10 +142,10 @@ export const Dark: TC<DarkOptions> = (options) => {
|
|
|
143
142
|
fillOpacity: 0.65,
|
|
144
143
|
fontSize: 12,
|
|
145
144
|
strokeWidth: 0,
|
|
146
|
-
connectorStroke:
|
|
145
|
+
connectorStroke: COLORS.STROKE,
|
|
147
146
|
connectorStrokeOpacity: 0.45,
|
|
148
147
|
connectorLineWidth: 1,
|
|
149
|
-
backgroundFill:
|
|
148
|
+
backgroundFill: COLORS.STROKE,
|
|
150
149
|
backgroundFillOpacity: 0.15,
|
|
151
150
|
backgroundPadding: [2, 4],
|
|
152
151
|
startMarkerSymbol: 'circle',
|
|
@@ -161,48 +160,48 @@ export const Dark: TC<DarkOptions> = (options) => {
|
|
|
161
160
|
fontSize: 10,
|
|
162
161
|
textAlign: 'center',
|
|
163
162
|
textBaseline: 'middle',
|
|
164
|
-
markerFill:
|
|
163
|
+
markerFill: COLORS.STROKE,
|
|
165
164
|
markerFillOpacity: 0.25,
|
|
166
165
|
markerStrokeOpacity: 0,
|
|
167
166
|
},
|
|
168
167
|
},
|
|
169
168
|
lineX: {
|
|
170
169
|
line: {
|
|
171
|
-
stroke:
|
|
170
|
+
stroke: COLORS.STROKE,
|
|
172
171
|
strokeOpacity: 0.45,
|
|
173
172
|
lineWidth: 1,
|
|
174
173
|
},
|
|
175
174
|
},
|
|
176
175
|
lineY: {
|
|
177
176
|
line: {
|
|
178
|
-
stroke:
|
|
177
|
+
stroke: COLORS.STROKE,
|
|
179
178
|
strokeOpacity: 0.45,
|
|
180
179
|
lineWidth: 1,
|
|
181
180
|
},
|
|
182
181
|
},
|
|
183
182
|
rangeX: {
|
|
184
183
|
range: {
|
|
185
|
-
fill:
|
|
184
|
+
fill: COLORS.STROKE,
|
|
186
185
|
fillOpacity: 0.15,
|
|
187
186
|
lineWidth: 0,
|
|
188
187
|
},
|
|
189
188
|
},
|
|
190
189
|
rangeY: {
|
|
191
190
|
range: {
|
|
192
|
-
fill:
|
|
191
|
+
fill: COLORS.STROKE,
|
|
193
192
|
fillOpacity: 0.15,
|
|
194
193
|
lineWidth: 0,
|
|
195
194
|
},
|
|
196
195
|
},
|
|
197
196
|
connector: {
|
|
198
197
|
connector: {
|
|
199
|
-
stroke:
|
|
198
|
+
stroke: COLORS.STROKE,
|
|
200
199
|
strokeOpacity: 0.45,
|
|
201
200
|
lineWidth: 1,
|
|
202
201
|
connectLength1: 12,
|
|
203
202
|
endMarker: true,
|
|
204
203
|
endMarkerSize: 6,
|
|
205
|
-
endMarkerFill:
|
|
204
|
+
endMarkerFill: COLORS.STROKE,
|
|
206
205
|
endMarkerFillOpacity: 0.95,
|
|
207
206
|
},
|
|
208
207
|
},
|
|
@@ -237,6 +236,7 @@ export const Dark: TC<DarkOptions> = (options) => {
|
|
|
237
236
|
lineStroke: COLORS.BLACK,
|
|
238
237
|
lineStrokeOpacity: 0.45,
|
|
239
238
|
lineLineWidth: 0.5,
|
|
239
|
+
lineArrow: null,
|
|
240
240
|
// axis tick line
|
|
241
241
|
tickStroke: COLORS.BLACK,
|
|
242
242
|
tickStrokeOpacity: 0.25,
|
|
@@ -248,11 +248,63 @@ export const Dark: TC<DarkOptions> = (options) => {
|
|
|
248
248
|
labelFontSize: 12,
|
|
249
249
|
labelFontWeight: 'lighter',
|
|
250
250
|
labelSpacing: 8, // spacing between label and it's tick
|
|
251
|
+
labelAlign: 'horizontal',
|
|
251
252
|
// axis grid
|
|
252
253
|
gridStroke: COLORS.BLACK,
|
|
253
254
|
gridStrokeOpacity: 0.05,
|
|
254
255
|
gridLineWidth: 0.5,
|
|
255
256
|
gridLineDash: [0, 0],
|
|
257
|
+
titleTransformOrigin: 'center',
|
|
258
|
+
},
|
|
259
|
+
axisTop: {
|
|
260
|
+
titlePosition: 'top',
|
|
261
|
+
titleSpacing: 0,
|
|
262
|
+
titleTextBaseline: 'middle',
|
|
263
|
+
labelSpacing: 8,
|
|
264
|
+
labelDirection: 'negative',
|
|
265
|
+
tickDirection: 'negative',
|
|
266
|
+
gridDirection: 'positive',
|
|
267
|
+
},
|
|
268
|
+
axisBottom: {
|
|
269
|
+
titleSpacing: 10,
|
|
270
|
+
titleTextBaseline: 'bottom',
|
|
271
|
+
labelSpacing: 12,
|
|
272
|
+
labelDirection: 'positive',
|
|
273
|
+
tickDirection: 'positive',
|
|
274
|
+
gridDirection: 'negative',
|
|
275
|
+
},
|
|
276
|
+
axisLeft: {
|
|
277
|
+
titleTextBaseline: 'middle',
|
|
278
|
+
titleSpacing: 10,
|
|
279
|
+
titlePosition: 'left',
|
|
280
|
+
titleTransformOrigin: 'center',
|
|
281
|
+
titleTransform: `translate(50%, 0) rotate(-90)`,
|
|
282
|
+
labelSpacing: 4,
|
|
283
|
+
labelDirection: 'positive',
|
|
284
|
+
labelAutoRotate: false,
|
|
285
|
+
tickDirection: 'positive',
|
|
286
|
+
gridDirection: 'negative',
|
|
287
|
+
},
|
|
288
|
+
axisRight: {
|
|
289
|
+
titleTextBaseline: 'top',
|
|
290
|
+
titleSpacing: 0,
|
|
291
|
+
titlePosition: 'right',
|
|
292
|
+
titleTransformOrigin: 'center',
|
|
293
|
+
titleTransform: `translate(-50%, 0) rotate(-90)`,
|
|
294
|
+
labelSpacing: 4,
|
|
295
|
+
labelDirection: 'negative',
|
|
296
|
+
tickDirection: 'negative',
|
|
297
|
+
gridDirection: 'positive',
|
|
298
|
+
},
|
|
299
|
+
axisArcY: {
|
|
300
|
+
titlePosition: 'top',
|
|
301
|
+
titleSpacing: 0,
|
|
302
|
+
titleTextBaseline: 'bottom',
|
|
303
|
+
gridDirection: 'negative',
|
|
304
|
+
gridConnect: 'arc',
|
|
305
|
+
gridControlAngles: [90, 180, 360],
|
|
306
|
+
gridType: 'surround',
|
|
307
|
+
girdClosed: true,
|
|
256
308
|
},
|
|
257
309
|
legend: {
|
|
258
310
|
padding: 8,
|
|
@@ -276,7 +328,6 @@ export const Dark: TC<DarkOptions> = (options) => {
|
|
|
276
328
|
itemValueFontSize: 12,
|
|
277
329
|
itemValueFontWeight: 'normal',
|
|
278
330
|
itemBackgroundFill: 'transparent',
|
|
279
|
-
// [todo] support navButtonSize
|
|
280
331
|
navButtonFill: COLORS.BLACK,
|
|
281
332
|
navButtonFillOpacity: 0.45,
|
|
282
333
|
navPageNumFill: COLORS.BLACK,
|
|
@@ -325,23 +376,22 @@ export const Dark: TC<DarkOptions> = (options) => {
|
|
|
325
376
|
offset: 0,
|
|
326
377
|
},
|
|
327
378
|
slider: {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
textFontWeight: 'normal',
|
|
379
|
+
trackSize: 16,
|
|
380
|
+
backgroundFill: COLORS.STROKE,
|
|
381
|
+
backgroundFillOpacity: 1,
|
|
382
|
+
selectionFill: DEFAULT_COLOR,
|
|
383
|
+
selectionFillOpacity: 0.15,
|
|
384
|
+
handleIconSize: 10,
|
|
385
|
+
handleIconFill: '#f7f7f7',
|
|
386
|
+
handleIconFillOpacity: 1,
|
|
387
|
+
handleIconStroke: COLORS.BLACK,
|
|
388
|
+
handleIconStrokeOpacity: 0.25,
|
|
389
|
+
handleIconLineWidth: 1,
|
|
390
|
+
handleIconRadius: 2,
|
|
391
|
+
handleLabelFill: COLORS.BLACK,
|
|
392
|
+
handleLabelFillOpacity: 0.45,
|
|
393
|
+
handleLabelFontSize: 12,
|
|
394
|
+
handleLabelFontWeight: 'normal',
|
|
345
395
|
},
|
|
346
396
|
scrollbar: {},
|
|
347
397
|
title: {
|
|
@@ -363,3 +413,5 @@ export const Dark: TC<DarkOptions> = (options) => {
|
|
|
363
413
|
};
|
|
364
414
|
|
|
365
415
|
Dark.props = {};
|
|
416
|
+
|
|
417
|
+
Dark.props = {};
|
package/src/theme/index.ts
CHANGED