@mathstack/viz 0.0.1-beta.1 → 0.0.1-beta.10
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/README.md +11 -0
- package/fesm2022/mathstack-viz.mjs +1456 -1481
- package/fesm2022/mathstack-viz.mjs.map +1 -1
- package/package.json +8 -8
- package/types/mathstack-viz.d.ts +5830 -0
- package/index.d.ts +0 -5
- package/lib/axes/base/config/xy-axis-builder.d.ts +0 -38
- package/lib/axes/base/config/xy-axis-config.d.ts +0 -18
- package/lib/axes/base/config/xy-axis-options.d.ts +0 -10
- package/lib/axes/base/xy-axis-base.d.ts +0 -49
- package/lib/axes/baseline/axis-baseline-builder.d.ts +0 -31
- package/lib/axes/baseline/axis-baseline-options.d.ts +0 -7
- package/lib/axes/baseline/axis-baseline.d.ts +0 -9
- package/lib/axes/grid/grid-builder.d.ts +0 -29
- package/lib/axes/grid/grid-config.d.ts +0 -8
- package/lib/axes/grid/grid-options.d.ts +0 -6
- package/lib/axes/index.d.ts +0 -13
- package/lib/axes/label/axis-label-builder.d.ts +0 -63
- package/lib/axes/label/axis-label-options.d.ts +0 -11
- package/lib/axes/label/axis-label.d.ts +0 -13
- package/lib/axes/ordinal/ordinal-axis-config.d.ts +0 -38
- package/lib/axes/ordinal/ordinal-axis.d.ts +0 -43
- package/lib/axes/quantitative/quantitative-axis-config.d.ts +0 -38
- package/lib/axes/quantitative/quantitative-axis.d.ts +0 -51
- package/lib/axes/ticks/tick-wrap/tick-wrap-builder.d.ts +0 -64
- package/lib/axes/ticks/tick-wrap/tick-wrap-options.d.ts +0 -8
- package/lib/axes/ticks/tick-wrap/tick-wrap.d.ts +0 -13
- package/lib/axes/ticks/ticks-builder.d.ts +0 -172
- package/lib/axes/ticks/ticks-options.d.ts +0 -22
- package/lib/axes/ticks/ticks.d.ts +0 -24
- package/lib/axes/x/x-axis-config.d.ts +0 -42
- package/lib/axes/x/x-axis.d.ts +0 -47
- package/lib/axes/x-ordinal/x-ordinal-axis-builder.d.ts +0 -29
- package/lib/axes/x-ordinal/x-ordinal-axis-config.d.ts +0 -25
- package/lib/axes/x-ordinal/x-ordinal-axis.component.d.ts +0 -88
- package/lib/axes/x-quantitative/x-quantitative-axis-builder.d.ts +0 -29
- package/lib/axes/x-quantitative/x-quantitative-axis-config.d.ts +0 -25
- package/lib/axes/x-quantitative/x-quantitative-axis.component.d.ts +0 -53
- package/lib/axes/xy-axis.module.d.ts +0 -10
- package/lib/axes/y/y-axis-config.d.ts +0 -42
- package/lib/axes/y/y-axis.d.ts +0 -53
- package/lib/axes/y-ordinal/y-ordinal-axis-builder.d.ts +0 -29
- package/lib/axes/y-ordinal/y-ordinal-axis-config.d.ts +0 -25
- package/lib/axes/y-ordinal/y-ordinal-axis.component.d.ts +0 -89
- package/lib/axes/y-quantitative-axis/y-quantitative-axis-builder.d.ts +0 -29
- package/lib/axes/y-quantitative-axis/y-quantitative-axis-config.d.ts +0 -25
- package/lib/axes/y-quantitative-axis/y-quantitative-axis.component.d.ts +0 -54
- package/lib/bars/bars.component.d.ts +0 -91
- package/lib/bars/bars.module.d.ts +0 -8
- package/lib/bars/config/backgrounds/bars-backgrounds-builder.d.ts +0 -27
- package/lib/bars/config/backgrounds/bars-backgrounds-options.d.ts +0 -4
- package/lib/bars/config/backgrounds/bars-backgrounds.d.ts +0 -6
- package/lib/bars/config/bars-builder.d.ts +0 -132
- package/lib/bars/config/bars-config.d.ts +0 -27
- package/lib/bars/config/bars-dimensions.d.ts +0 -11
- package/lib/bars/config/bars-options.d.ts +0 -16
- package/lib/bars/config/labels/bars-labels-builder.d.ts +0 -48
- package/lib/bars/config/labels/bars-labels-options.d.ts +0 -9
- package/lib/bars/config/labels/bars-labels.d.ts +0 -11
- package/lib/bars/events/actions/bars-click-actions.d.ts +0 -8
- package/lib/bars/events/actions/bars-hover-actions.d.ts +0 -12
- package/lib/bars/events/actions/bars-hover-move-actions.d.ts +0 -8
- package/lib/bars/events/bars-events.directive.d.ts +0 -38
- package/lib/bars/events/bars-interaction-output.d.ts +0 -16
- package/lib/bars/events/bars-tooltip-positioner.d.ts +0 -13
- package/lib/bars/index.d.ts +0 -12
- package/lib/charts/chart/chart.component.d.ts +0 -73
- package/lib/charts/chart/chart.d.ts +0 -4
- package/lib/charts/chart/chart.token.d.ts +0 -3
- package/lib/charts/chart/config/chart-builder.d.ts +0 -94
- package/lib/charts/chart/config/chart-config.d.ts +0 -16
- package/lib/charts/chart/config/chart-options.d.ts +0 -10
- package/lib/charts/chart.module.d.ts +0 -9
- package/lib/charts/index.d.ts +0 -8
- package/lib/charts/map-chart/map-chart.component.d.ts +0 -40
- package/lib/charts/xy-chart/xy-chart.component.d.ts +0 -40
- package/lib/core/common-behaviors/constructor.d.ts +0 -2
- package/lib/core/index.d.ts +0 -5
- package/lib/core/types/layout.d.ts +0 -24
- package/lib/core/types/scale.d.ts +0 -5
- package/lib/core/types/values.d.ts +0 -7
- package/lib/core/utilities/colors.d.ts +0 -13
- package/lib/core/utilities/fill-utilities.d.ts +0 -7
- package/lib/core/utilities/type-guards.d.ts +0 -6
- package/lib/core/utilities/value-format.d.ts +0 -11
- package/lib/core/utilities/values.d.ts +0 -16
- package/lib/data-dimensions/continuous-quantitative/date-chart-position/date-chart-position-builder.d.ts +0 -39
- package/lib/data-dimensions/continuous-quantitative/date-chart-position/date-chart-position-options.d.ts +0 -18
- package/lib/data-dimensions/continuous-quantitative/date-chart-position/date-chart-position.d.ts +0 -38
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/concrete-domain-padding.d.ts +0 -5
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/domain-padding.d.ts +0 -20
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/percent-over/percent-over-options.d.ts +0 -3
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/percent-over/percent-over.d.ts +0 -9
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/pixel/pixel-options.d.ts +0 -3
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/pixel/pixel.d.ts +0 -10
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-interval/round-to-interval-options.d.ts +0 -3
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-interval/round-to-interval.d.ts +0 -8
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-sig-fig/round-to-sig-fig-options.d.ts +0 -3
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-sig-fig/round-to-sig-fig.d.ts +0 -8
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/number-chart-position-builder.d.ts +0 -71
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/number-chart-position-options.d.ts +0 -5
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/number-chart-position.d.ts +0 -30
- package/lib/data-dimensions/continuous-quantitative/number-dimension/number-dimension-options.d.ts +0 -8
- package/lib/data-dimensions/continuous-quantitative/number-dimension/number-dimension.d.ts +0 -28
- package/lib/data-dimensions/continuous-quantitative/number-visual-value/number-visual-value-builder.d.ts +0 -69
- package/lib/data-dimensions/continuous-quantitative/number-visual-value/number-visual-value-options.d.ts +0 -6
- package/lib/data-dimensions/continuous-quantitative/number-visual-value/number-visual-value.d.ts +0 -29
- package/lib/data-dimensions/dimension-builder.d.ts +0 -21
- package/lib/data-dimensions/dimension-options.d.ts +0 -11
- package/lib/data-dimensions/dimension.d.ts +0 -16
- package/lib/data-dimensions/index.d.ts +0 -9
- package/lib/data-dimensions/ordinal/ordinal-chart-position/ordinal-chart-position-builder.d.ts +0 -53
- package/lib/data-dimensions/ordinal/ordinal-chart-position/ordinal-chart-position-options.d.ts +0 -8
- package/lib/data-dimensions/ordinal/ordinal-chart-position/ordinal-chart-position.d.ts +0 -44
- package/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value-builder.d.ts +0 -45
- package/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value-options.d.ts +0 -7
- package/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value.d.ts +0 -38
- package/lib/data-export/data-export-config.d.ts +0 -50
- package/lib/data-export/data-export.d.ts +0 -7
- package/lib/data-export/index.d.ts +0 -2
- package/lib/dots/config/dots-builder.d.ts +0 -110
- package/lib/dots/config/dots-config.d.ts +0 -26
- package/lib/dots/config/dots-options.d.ts +0 -17
- package/lib/dots/dots.component.d.ts +0 -55
- package/lib/dots/dots.module.d.ts +0 -8
- package/lib/dots/events/actions/dots-hover-actions.d.ts +0 -6
- package/lib/dots/events/actions/dots-hover-move-actions.d.ts +0 -10
- package/lib/dots/events/dots-events.directive.d.ts +0 -37
- package/lib/dots/events/dots-interaction-output.d.ts +0 -14
- package/lib/dots/events/dots-tooltip-positioner.d.ts +0 -13
- package/lib/dots/index.d.ts +0 -9
- package/lib/events/events.directive.d.ts +0 -43
- package/lib/events/events.types.d.ts +0 -34
- package/lib/events/index.d.ts +0 -4
- package/lib/events/interaction-output.d.ts +0 -33
- package/lib/events/tooltip-positioner.d.ts +0 -6
- package/lib/fill-definitions/fill-definitions.d.ts +0 -4
- package/lib/fill-definitions/index.d.ts +0 -1
- package/lib/geographies/config/geographies-builder.d.ts +0 -80
- package/lib/geographies/config/geographies-config.d.ts +0 -19
- package/lib/geographies/config/geographies-options.d.ts +0 -13
- package/lib/geographies/config/layers/attribute-data-layer/attribute-data-layer-builder.d.ts +0 -63
- package/lib/geographies/config/layers/attribute-data-layer/attribute-data-layer-options.d.ts +0 -16
- package/lib/geographies/config/layers/attribute-data-layer/attribute-data-layer.d.ts +0 -30
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data/attribute-data-dimension-builder.d.ts +0 -40
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data/attribute-data-dimension-options.d.ts +0 -8
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data/attribute-data-dimension.d.ts +0 -18
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data-bin-enums.d.ts +0 -10
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data-bin-types.d.ts +0 -8
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/calculated-bins/calculated-bins-builder.d.ts +0 -10
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/calculated-bins/calculated-bins-options.d.ts +0 -4
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/calculated-bins/calculated-bins.d.ts +0 -8
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins-builder.d.ts +0 -14
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins-options.d.ts +0 -4
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins.d.ts +0 -20
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks-bins-builder.d.ts +0 -29
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks-bins-options.d.ts +0 -5
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks-bins.d.ts +0 -23
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins-builder.d.ts +0 -16
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins-options.d.ts +0 -4
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins.d.ts +0 -18
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins-builder.d.ts +0 -21
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins-options.d.ts +0 -5
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins.d.ts +0 -24
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins-builder.d.ts +0 -26
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins-options.d.ts +0 -5
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins.d.ts +0 -12
- package/lib/geographies/config/layers/geographies-layer/geographies-layer-builder.d.ts +0 -52
- package/lib/geographies/config/layers/geographies-layer/geographies-layer-options.d.ts +0 -16
- package/lib/geographies/config/layers/geographies-layer/geographies-layer.d.ts +0 -29
- package/lib/geographies/config/layers/geojson-properties-layer/geojson-properties-layer-builder.d.ts +0 -25
- package/lib/geographies/config/layers/geojson-properties-layer/geojson-properties-layer-options.d.ts +0 -11
- package/lib/geographies/config/layers/geojson-properties-layer/geojson-properties-layer.d.ts +0 -16
- package/lib/geographies/config/layers/labels/geographies-labels-builder.d.ts +0 -97
- package/lib/geographies/config/layers/labels/geographies-labels-options.d.ts +0 -33
- package/lib/geographies/config/layers/labels/geographies-labels.d.ts +0 -20
- package/lib/geographies/events/actions/geographies-click-actions.d.ts +0 -7
- package/lib/geographies/events/actions/geographies-hover-actions.d.ts +0 -7
- package/lib/geographies/events/actions/geographies-hover-move-actions.d.ts +0 -7
- package/lib/geographies/events/geographies-events.directive.d.ts +0 -38
- package/lib/geographies/events/geographies-interaction-output.d.ts +0 -16
- package/lib/geographies/events/geographies-tooltip-positioner.d.ts +0 -13
- package/lib/geographies/geographies-feature.d.ts +0 -5
- package/lib/geographies/geographies.component.d.ts +0 -36
- package/lib/geographies/geographies.module.d.ts +0 -8
- package/lib/geographies/index.d.ts +0 -32
- package/lib/grouped-bars/config/grouped-bars-builder.d.ts +0 -29
- package/lib/grouped-bars/config/grouped-bars-config.d.ts +0 -10
- package/lib/grouped-bars/config/grouped-bars-options.d.ts +0 -5
- package/lib/grouped-bars/events/grouped-bars-events.directive.d.ts +0 -35
- package/lib/grouped-bars/grouped-bars.component.d.ts +0 -19
- package/lib/grouped-bars/grouped-bars.module.d.ts +0 -8
- package/lib/grouped-bars/index.d.ts +0 -7
- package/lib/image-download/image-download-config.d.ts +0 -31
- package/lib/image-download/image-download-enums.d.ts +0 -6
- package/lib/image-download/image-download-options.d.ts +0 -14
- package/lib/image-download/image-download.service.d.ts +0 -16
- package/lib/image-download/index.d.ts +0 -4
- package/lib/lines/config/area-fills/area-fills-builder.d.ts +0 -45
- package/lib/lines/config/area-fills/area-fills-options.d.ts +0 -7
- package/lib/lines/config/area-fills/area-fills.d.ts +0 -9
- package/lib/lines/config/lines-builder.d.ts +0 -101
- package/lib/lines/config/lines-config.d.ts +0 -37
- package/lib/lines/config/lines-options.d.ts +0 -18
- package/lib/lines/config/stroke/lines-stroke-builder.d.ts +0 -59
- package/lib/lines/config/stroke/lines-stroke-options.d.ts +0 -5
- package/lib/lines/config/stroke/lines-stroke.d.ts +0 -7
- package/lib/lines/events/actions/lines-click-actions.d.ts +0 -6
- package/lib/lines/events/actions/lines-hover-move-actions.d.ts +0 -41
- package/lib/lines/events/actions/lines-marker-click-actions.d.ts +0 -6
- package/lib/lines/events/lines-events.directive.d.ts +0 -49
- package/lib/lines/events/lines-interaction-output.d.ts +0 -16
- package/lib/lines/events/lines-tooltip-positioner.d.ts +0 -13
- package/lib/lines/index.d.ts +0 -11
- package/lib/lines/lines.component.d.ts +0 -53
- package/lib/lines/lines.module.d.ts +0 -8
- package/lib/map-legend/continuous-legend/continuous-legend.component.d.ts +0 -18
- package/lib/map-legend/discontinuous-legend/discontinuous-legend.component.d.ts +0 -12
- package/lib/map-legend/index.d.ts +0 -2
- package/lib/map-legend/map-legend-base.d.ts +0 -33
- package/lib/map-legend/map-legend.component.d.ts +0 -27
- package/lib/map-legend/map-legend.module.d.ts +0 -7
- package/lib/marks/aux-marks/aux-marks.d.ts +0 -10
- package/lib/marks/aux-marks/config/aux-marks-builder.d.ts +0 -11
- package/lib/marks/aux-marks/config/aux-marks-config.d.ts +0 -4
- package/lib/marks/config/marks-config.d.ts +0 -9
- package/lib/marks/config/marks-options.d.ts +0 -8
- package/lib/marks/index.d.ts +0 -15
- package/lib/marks/map-marks/map-aux-marks/map-aux-marks.d.ts +0 -17
- package/lib/marks/map-marks/map-primary-marks/map-primary-marks.d.ts +0 -20
- package/lib/marks/marks.d.ts +0 -31
- package/lib/marks/primary-marks/config/primary-marks-builder.d.ts +0 -32
- package/lib/marks/primary-marks/config/primary-marks-config.d.ts +0 -5
- package/lib/marks/primary-marks/primary-marks.d.ts +0 -23
- package/lib/marks/xy-marks/xy-aux-marks/xy-aux-marks.d.ts +0 -16
- package/lib/marks/xy-marks/xy-marks-config.d.ts +0 -4
- package/lib/marks/xy-marks/xy-marks.d.ts +0 -6
- package/lib/marks/xy-marks/xy-primary-marks/xy-primary-marks-config.d.ts +0 -4
- package/lib/marks/xy-marks/xy-primary-marks/xy-primary-marks.d.ts +0 -20
- package/lib/point-markers/index.d.ts +0 -2
- package/lib/point-markers/point-markers-builder.d.ts +0 -47
- package/lib/point-markers/point-markers-options.d.ts +0 -6
- package/lib/point-markers/point-markers.d.ts +0 -8
- package/lib/quantitative-rules/config/labels/quantitative-rules-labels-builder.d.ts +0 -60
- package/lib/quantitative-rules/config/labels/quantitative-rules-labels-options.d.ts +0 -9
- package/lib/quantitative-rules/config/labels/quantitative-rules-labels.d.ts +0 -11
- package/lib/quantitative-rules/config/quantitative-rules-builder.d.ts +0 -52
- package/lib/quantitative-rules/config/quantitative-rules-config.d.ts +0 -12
- package/lib/quantitative-rules/config/quantitative-rules-dimensions.d.ts +0 -8
- package/lib/quantitative-rules/config/quantitative-rules-options.d.ts +0 -10
- package/lib/quantitative-rules/index.d.ts +0 -6
- package/lib/quantitative-rules/quantitative-rules.component.d.ts +0 -27
- package/lib/quantitative-rules/quantitative-rules.module.d.ts +0 -7
- package/lib/stacked-area/config/stacked-area-builder.d.ts +0 -85
- package/lib/stacked-area/config/stacked-area-config.d.ts +0 -36
- package/lib/stacked-area/config/stacked-area-options.d.ts +0 -21
- package/lib/stacked-area/events/actions/stacked-area-hover-move-actions.d.ts +0 -7
- package/lib/stacked-area/events/stacked-area-events.directive.d.ts +0 -38
- package/lib/stacked-area/events/stacked-area-interaction-output.d.ts +0 -28
- package/lib/stacked-area/events/stacked-area-tooltip-positioner.d.ts +0 -16
- package/lib/stacked-area/index.d.ts +0 -7
- package/lib/stacked-area/stacked-area.component.d.ts +0 -51
- package/lib/stacked-area/stacked-area.module.d.ts +0 -8
- package/lib/stacked-bars/config/stacked-bars-builder.d.ts +0 -26
- package/lib/stacked-bars/config/stacked-bars-config.d.ts +0 -16
- package/lib/stacked-bars/config/stacked-bars-options.d.ts +0 -7
- package/lib/stacked-bars/events/actions/stacked-bars-click-actions.d.ts +0 -8
- package/lib/stacked-bars/events/actions/stacked-bars-hover-actions.d.ts +0 -8
- package/lib/stacked-bars/events/actions/stacked-bars-hover-move-actions.d.ts +0 -8
- package/lib/stacked-bars/events/stacked-bars-events.directive.d.ts +0 -39
- package/lib/stacked-bars/index.d.ts +0 -10
- package/lib/stacked-bars/stacked-bars.component.d.ts +0 -26
- package/lib/stacked-bars/stacked-bars.module.d.ts +0 -8
- package/lib/stroke/base/stroke-base-options.d.ts +0 -7
- package/lib/stroke/base/stroke-base.d.ts +0 -8
- package/lib/stroke/index.d.ts +0 -2
- package/lib/stroke/stroke-builder.d.ts +0 -56
- package/lib/stroke/stroke-options.d.ts +0 -4
- package/lib/stroke/stroke.d.ts +0 -6
- package/lib/svg-text-wrap/index.d.ts +0 -2
- package/lib/svg-text-wrap/svg-text-wrap-builder.d.ts +0 -58
- package/lib/svg-text-wrap/svg-text-wrap-options.d.ts +0 -8
- package/lib/svg-text-wrap/svg-text-wrap.d.ts +0 -13
- package/lib/tooltips/config/tooltip.d.ts +0 -5
- package/lib/tooltips/html-tooltip/config/html-tooltip-builder.d.ts +0 -57
- package/lib/tooltips/html-tooltip/config/html-tooltip-config.d.ts +0 -15
- package/lib/tooltips/html-tooltip/config/html-tooltip-options.d.ts +0 -11
- package/lib/tooltips/html-tooltip/config/position/tooltip-position-builder.d.ts +0 -34
- package/lib/tooltips/html-tooltip/config/position/tooltip-position.d.ts +0 -23
- package/lib/tooltips/html-tooltip/config/size/tooltip-size-builder.d.ts +0 -16
- package/lib/tooltips/html-tooltip/config/size/tooltip-size-options.d.ts +0 -8
- package/lib/tooltips/html-tooltip/config/size/tooltip-size.d.ts +0 -10
- package/lib/tooltips/html-tooltip/html-tooltip.directive.d.ts +0 -43
- package/lib/tooltips/html-tooltip/html-tooltip.module.d.ts +0 -10
- package/lib/tooltips/html-tooltip/tooltip-triangle/tooltip-triangle.component.d.ts +0 -7
- package/lib/tooltips/index.d.ts +0 -11
- package/lib/xy-background/index.d.ts +0 -2
- package/lib/xy-background/xy-background.component.d.ts +0 -9
- package/lib/xy-background/xy-background.module.d.ts +0 -7
- package/public-api.d.ts +0 -23
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Input, InjectionToken, Injectable, inject, DestroyRef, ViewChild, Component,
|
|
2
|
+
import { Directive, Input, InjectionToken, Injectable, inject, DestroyRef, NgZone, ViewChild, Component, ChangeDetectionStrategy, NgModule, ElementRef, ViewEncapsulation, Renderer2, EventEmitter, ViewContainerRef, Output, Pipe } from '@angular/core';
|
|
3
3
|
import { NgOnChangesUtilities, safeAssign } from '@mathstack/app-kit';
|
|
4
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
5
|
import { BehaviorSubject, filter, distinctUntilChanged, shareReplay, map, switchMap, defer, of, combineLatest, Observable, auditTime, Subject, takeUntil } from 'rxjs';
|
|
@@ -8,11 +8,10 @@ import { CommonModule, DOCUMENT, AsyncPipe } from '@angular/common';
|
|
|
8
8
|
import { isEqual, cloneDeep } from 'lodash-es';
|
|
9
9
|
import { select, utcFormat, format, axisTop, axisBottom, axisLeft, axisRight, pointer, map as map$1, min, max, scaleLinear, scaleBand, scalePoint, InternSet, scaleOrdinal, schemeTableau10, range, scaleUtc, maxIndex, polygonArea, InternMap, scaleThreshold, interpolateLab, extent, scaleQuantile, scaleQuantize, geoAlbersUsa, geoPath, group, curveLinear, line, area, least, rollup, stack, stackOffsetNone, stackOrderNone, stackOffsetDiverging } from 'd3';
|
|
10
10
|
import { color } from 'd3-color';
|
|
11
|
+
import { Overlay, OverlayPositionBuilder, OverlayModule } from '@angular/cdk/overlay';
|
|
11
12
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { saveAs } from 'file-saver';
|
|
15
|
-
import { unparse } from 'papaparse';
|
|
13
|
+
import saveAs from 'file-saver';
|
|
14
|
+
import unparse from 'papaparse';
|
|
16
15
|
import polylabel from 'polylabel';
|
|
17
16
|
import * as domToImage from 'html-to-image';
|
|
18
17
|
|
|
@@ -22,10 +21,10 @@ class Marks {
|
|
|
22
21
|
this.initFromConfig();
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
26
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: Marks, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
25
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: Marks, isStandalone: true, usesOnChanges: true, ngImport: i0 }); }
|
|
27
26
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: Marks, decorators: [{
|
|
29
28
|
type: Directive
|
|
30
29
|
}] });
|
|
31
30
|
|
|
@@ -33,10 +32,10 @@ class AuxMarks extends Marks {
|
|
|
33
32
|
initFromConfig() {
|
|
34
33
|
this.drawMarks();
|
|
35
34
|
}
|
|
36
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
37
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
35
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: AuxMarks, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
36
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: AuxMarks, isStandalone: true, inputs: { config: "config" }, usesInheritance: true, ngImport: i0 }); }
|
|
38
37
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: AuxMarks, decorators: [{
|
|
40
39
|
type: Directive
|
|
41
40
|
}], propDecorators: { config: [{
|
|
42
41
|
type: Input
|
|
@@ -230,10 +229,10 @@ class VicChartConfigBuilder {
|
|
|
230
229
|
this._aspectRatio = this._width / this._height;
|
|
231
230
|
}
|
|
232
231
|
}
|
|
233
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
234
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
232
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicChartConfigBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
233
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicChartConfigBuilder }); }
|
|
235
234
|
}
|
|
236
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
235
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicChartConfigBuilder, decorators: [{
|
|
237
236
|
type: Injectable
|
|
238
237
|
}], ctorParameters: () => [] });
|
|
239
238
|
|
|
@@ -255,8 +254,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
255
254
|
* and scaled svg element in the DOM. USeful for adding elements that require access to chart scales.
|
|
256
255
|
*/
|
|
257
256
|
class ChartComponent {
|
|
258
|
-
constructor(
|
|
259
|
-
this.ngZone = ngZone;
|
|
257
|
+
constructor() {
|
|
260
258
|
this.config = new VicChartConfigBuilder().getConfig();
|
|
261
259
|
this._config = new BehaviorSubject(null);
|
|
262
260
|
this.config$ = this._config.asObservable().pipe(filter((c) => !!c), distinctUntilChanged((a, b) => isEqual(a, b)), shareReplay(1));
|
|
@@ -294,6 +292,7 @@ class ChartComponent {
|
|
|
294
292
|
]).pipe(filter(([w, h]) => w > 0 && h > 0), map(([width, height]) => ({ width, height })), distinctUntilChanged((a, b) => isEqual(a, b)), shareReplay(1));
|
|
295
293
|
this.ranges$ = combineLatest([this.svgDimensions$, this.marginCfg$]).pipe(map(([dimensions, margin]) => this.getRangesFromSvgDimensions(dimensions, margin)), distinctUntilChanged((a, b) => isEqual(a, b)), shareReplay(1));
|
|
296
294
|
this.destroyRef = inject(DestroyRef);
|
|
295
|
+
this.ngZone = inject(NgZone);
|
|
297
296
|
}
|
|
298
297
|
ngOnChanges(changes) {
|
|
299
298
|
if (NgOnChangesUtilities.inputObjectChanged(changes, 'config')) {
|
|
@@ -342,15 +341,15 @@ class ChartComponent {
|
|
|
342
341
|
y: vb.height / rect.height,
|
|
343
342
|
};
|
|
344
343
|
}
|
|
345
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
346
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
344
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
345
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: ChartComponent, isStandalone: true, selector: "vic-chart", inputs: { config: "config" }, host: { classAttribute: "vic-chart" }, providers: [{ provide: CHART, useExisting: ChartComponent }], viewQueries: [{ propertyName: "divRef", first: true, predicate: ["div"], descendants: true, static: true }, { propertyName: "svgRef", first: true, predicate: ["svg"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Slot exists so that projected content can have access to scales -->\n<ng-container *ngTemplateOutlet=\"htmlElementsBefore\"></ng-container>\n<div\n #div\n class=\"vic-chart-container\"\n [ngClass]=\"(strategy$ | async)\"\n [style.maxWidth.px]=\"widthCfg$ | async\"\n [style.minWidth.px]=\"minWidthCfg$ | async\"\n [style.maxHeight.px]=\"heightCfg$ | async\"\n [style.aspectRatio]=\"(strategy$ | async) === 'viewbox' ? (config.viewBoxX / config.viewBoxY) : null\"\n [style.width.%]=\"(strategy$ | async) === 'viewbox' ? 100 : null\"\n>\n <svg\n #svg\n class=\"vic-chart-svg\"\n [ngClass]=\"(strategy$ | async)\"\n [style.width.px]=\"(strategy$ | async) !== 'viewbox' ? (svgDimensions$ | async)?.width : null\"\n [style.height.px]=\"(strategy$ | async) !== 'viewbox' ? (svgDimensions$ | async)?.height : null\"\n [attr.viewBox]=\"(strategy$ | async) === 'viewbox' ? '0 0 ' + config.viewBoxX + ' ' + config.viewBoxY : null\"\n >\n <defs>\n <ng-container *ngTemplateOutlet=\"svgDefs\"></ng-container>\n </defs>\n <ng-container *ngTemplateOutlet=\"svgElements\"></ng-container>\n </svg>\n</div>\n\n<!-- Slot exists so that projected content can have access to scales -->\n<ng-container *ngTemplateOutlet=\"htmlElementsAfter\"></ng-container>\n\n<ng-template #htmlElementsBefore>\n <ng-content select=\"[html-elements-before]\"></ng-content>\n</ng-template>\n\n<ng-template #svgDefs>\n <ng-content select=\"[svg-defs]\"></ng-content>\n</ng-template>\n\n<ng-template #svgElements>\n <ng-content select=\"[svg-elements]\"></ng-content>\n</ng-template>\n\n<ng-template #htmlElementsAfter>\n <ng-content select=\"[html-elements-after]\"></ng-content>\n</ng-template>\n", styles: [".vic-chart-container{display:flex;align-items:stretch;box-sizing:border-box;width:100%;min-width:0}.vic-chart-container.responsive-width{contain:inline-size}.vic-chart-container.viewbox{contain:inline-size;overflow:hidden}.vic-chart-container.fixed,.vic-chart-svg{display:block}.vic-chart-svg:not(.viewbox){overflow:visible}.vic-chart-svg.viewbox{width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
|
|
347
346
|
}
|
|
348
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
347
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ChartComponent, decorators: [{
|
|
349
348
|
type: Component,
|
|
350
349
|
args: [{ selector: 'vic-chart', providers: [{ provide: CHART, useExisting: ChartComponent }], host: {
|
|
351
350
|
class: 'vic-chart',
|
|
352
351
|
}, imports: [CommonModule], template: "<!-- Slot exists so that projected content can have access to scales -->\n<ng-container *ngTemplateOutlet=\"htmlElementsBefore\"></ng-container>\n<div\n #div\n class=\"vic-chart-container\"\n [ngClass]=\"(strategy$ | async)\"\n [style.maxWidth.px]=\"widthCfg$ | async\"\n [style.minWidth.px]=\"minWidthCfg$ | async\"\n [style.maxHeight.px]=\"heightCfg$ | async\"\n [style.aspectRatio]=\"(strategy$ | async) === 'viewbox' ? (config.viewBoxX / config.viewBoxY) : null\"\n [style.width.%]=\"(strategy$ | async) === 'viewbox' ? 100 : null\"\n>\n <svg\n #svg\n class=\"vic-chart-svg\"\n [ngClass]=\"(strategy$ | async)\"\n [style.width.px]=\"(strategy$ | async) !== 'viewbox' ? (svgDimensions$ | async)?.width : null\"\n [style.height.px]=\"(strategy$ | async) !== 'viewbox' ? (svgDimensions$ | async)?.height : null\"\n [attr.viewBox]=\"(strategy$ | async) === 'viewbox' ? '0 0 ' + config.viewBoxX + ' ' + config.viewBoxY : null\"\n >\n <defs>\n <ng-container *ngTemplateOutlet=\"svgDefs\"></ng-container>\n </defs>\n <ng-container *ngTemplateOutlet=\"svgElements\"></ng-container>\n </svg>\n</div>\n\n<!-- Slot exists so that projected content can have access to scales -->\n<ng-container *ngTemplateOutlet=\"htmlElementsAfter\"></ng-container>\n\n<ng-template #htmlElementsBefore>\n <ng-content select=\"[html-elements-before]\"></ng-content>\n</ng-template>\n\n<ng-template #svgDefs>\n <ng-content select=\"[svg-defs]\"></ng-content>\n</ng-template>\n\n<ng-template #svgElements>\n <ng-content select=\"[svg-elements]\"></ng-content>\n</ng-template>\n\n<ng-template #htmlElementsAfter>\n <ng-content select=\"[html-elements-after]\"></ng-content>\n</ng-template>\n", styles: [".vic-chart-container{display:flex;align-items:stretch;box-sizing:border-box;width:100%;min-width:0}.vic-chart-container.responsive-width{contain:inline-size}.vic-chart-container.viewbox{contain:inline-size;overflow:hidden}.vic-chart-container.fixed,.vic-chart-svg{display:block}.vic-chart-svg:not(.viewbox){overflow:visible}.vic-chart-svg.viewbox{width:100%;height:100%}\n"] }]
|
|
353
|
-
}],
|
|
352
|
+
}], propDecorators: { config: [{
|
|
354
353
|
type: Input
|
|
355
354
|
}], divRef: [{
|
|
356
355
|
type: ViewChild,
|
|
@@ -396,10 +395,10 @@ class MapChartComponent extends ChartComponent {
|
|
|
396
395
|
});
|
|
397
396
|
});
|
|
398
397
|
}
|
|
399
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
400
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
398
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MapChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
399
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: MapChartComponent, isStandalone: true, selector: "vic-map-chart", host: { classAttribute: "vic-map-chart" }, providers: [{ provide: CHART, useExisting: ChartComponent }], usesInheritance: true, ngImport: i0, template: "<!-- Slot exists so that projected content can have access to scales -->\n<ng-container *ngTemplateOutlet=\"htmlElementsBefore\"></ng-container>\n<div\n #div\n class=\"vic-chart-container\"\n [ngClass]=\"(strategy$ | async)\"\n [style.maxWidth.px]=\"widthCfg$ | async\"\n [style.minWidth.px]=\"minWidthCfg$ | async\"\n [style.maxHeight.px]=\"heightCfg$ | async\"\n [style.aspectRatio]=\"(strategy$ | async) === 'viewbox' ? (config.viewBoxX / config.viewBoxY) : null\"\n [style.width.%]=\"(strategy$ | async) === 'viewbox' ? 100 : null\"\n>\n <svg\n #svg\n class=\"vic-chart-svg\"\n [ngClass]=\"(strategy$ | async)\"\n [style.width.px]=\"(strategy$ | async) !== 'viewbox' ? (svgDimensions$ | async)?.width : null\"\n [style.height.px]=\"(strategy$ | async) !== 'viewbox' ? (svgDimensions$ | async)?.height : null\"\n [attr.viewBox]=\"(strategy$ | async) === 'viewbox' ? '0 0 ' + config.viewBoxX + ' ' + config.viewBoxY : null\"\n >\n <defs>\n <ng-container *ngTemplateOutlet=\"svgDefs\"></ng-container>\n </defs>\n <ng-container *ngTemplateOutlet=\"svgElements\"></ng-container>\n </svg>\n</div>\n\n<!-- Slot exists so that projected content can have access to scales -->\n<ng-container *ngTemplateOutlet=\"htmlElementsAfter\"></ng-container>\n\n<ng-template #htmlElementsBefore>\n <ng-content select=\"[html-elements-before]\"></ng-content>\n</ng-template>\n\n<ng-template #svgDefs>\n <ng-content select=\"[svg-defs]\"></ng-content>\n</ng-template>\n\n<ng-template #svgElements>\n <ng-content select=\"[svg-elements]\"></ng-content>\n</ng-template>\n\n<ng-template #htmlElementsAfter>\n <ng-content select=\"[html-elements-after]\"></ng-content>\n</ng-template>\n", styles: [".vic-chart-container{display:flex;align-items:stretch;box-sizing:border-box;width:100%;min-width:0}.vic-chart-container.responsive-width{contain:inline-size}.vic-chart-container.viewbox{contain:inline-size;overflow:hidden}.vic-chart-container.fixed,.vic-chart-svg{display:block}.vic-chart-svg:not(.viewbox){overflow:visible}.vic-chart-svg.viewbox{width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
|
|
401
400
|
}
|
|
402
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
401
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MapChartComponent, decorators: [{
|
|
403
402
|
type: Component,
|
|
404
403
|
args: [{ selector: 'vic-map-chart', providers: [{ provide: CHART, useExisting: ChartComponent }], host: {
|
|
405
404
|
class: 'vic-map-chart',
|
|
@@ -442,10 +441,10 @@ class XyChartComponent extends ChartComponent {
|
|
|
442
441
|
this.scales.next({ ...this.scales.value, ...scales });
|
|
443
442
|
});
|
|
444
443
|
}
|
|
445
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
446
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
444
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: XyChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
445
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: XyChartComponent, isStandalone: true, selector: "vic-xy-chart", host: { classAttribute: "vic-xy-chart" }, providers: [{ provide: CHART, useExisting: ChartComponent }], usesInheritance: true, ngImport: i0, template: "<!-- Slot exists so that projected content can have access to scales -->\n<ng-container *ngTemplateOutlet=\"htmlElementsBefore\"></ng-container>\n<div\n #div\n class=\"vic-chart-container\"\n [ngClass]=\"(strategy$ | async)\"\n [style.maxWidth.px]=\"widthCfg$ | async\"\n [style.minWidth.px]=\"minWidthCfg$ | async\"\n [style.maxHeight.px]=\"heightCfg$ | async\"\n [style.aspectRatio]=\"(strategy$ | async) === 'viewbox' ? (config.viewBoxX / config.viewBoxY) : null\"\n [style.width.%]=\"(strategy$ | async) === 'viewbox' ? 100 : null\"\n>\n <svg\n #svg\n class=\"vic-chart-svg\"\n [ngClass]=\"(strategy$ | async)\"\n [style.width.px]=\"(strategy$ | async) !== 'viewbox' ? (svgDimensions$ | async)?.width : null\"\n [style.height.px]=\"(strategy$ | async) !== 'viewbox' ? (svgDimensions$ | async)?.height : null\"\n [attr.viewBox]=\"(strategy$ | async) === 'viewbox' ? '0 0 ' + config.viewBoxX + ' ' + config.viewBoxY : null\"\n >\n <defs>\n <ng-container *ngTemplateOutlet=\"svgDefs\"></ng-container>\n </defs>\n <ng-container *ngTemplateOutlet=\"svgElements\"></ng-container>\n </svg>\n</div>\n\n<!-- Slot exists so that projected content can have access to scales -->\n<ng-container *ngTemplateOutlet=\"htmlElementsAfter\"></ng-container>\n\n<ng-template #htmlElementsBefore>\n <ng-content select=\"[html-elements-before]\"></ng-content>\n</ng-template>\n\n<ng-template #svgDefs>\n <ng-content select=\"[svg-defs]\"></ng-content>\n</ng-template>\n\n<ng-template #svgElements>\n <ng-content select=\"[svg-elements]\"></ng-content>\n</ng-template>\n\n<ng-template #htmlElementsAfter>\n <ng-content select=\"[html-elements-after]\"></ng-content>\n</ng-template>\n", styles: [".vic-chart-container{display:flex;align-items:stretch;box-sizing:border-box;width:100%;min-width:0}.vic-chart-container.responsive-width{contain:inline-size}.vic-chart-container.viewbox{contain:inline-size;overflow:hidden}.vic-chart-container.fixed,.vic-chart-svg{display:block}.vic-chart-svg:not(.viewbox){overflow:visible}.vic-chart-svg.viewbox{width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
447
446
|
}
|
|
448
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
447
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: XyChartComponent, decorators: [{
|
|
449
448
|
type: Component,
|
|
450
449
|
args: [{ selector: 'vic-xy-chart', changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: CHART, useExisting: ChartComponent }], host: {
|
|
451
450
|
class: 'vic-xy-chart',
|
|
@@ -453,11 +452,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
453
452
|
}] });
|
|
454
453
|
|
|
455
454
|
class VicChartModule {
|
|
456
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
457
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
458
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
455
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicChartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
456
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: VicChartModule, imports: [ChartComponent, XyChartComponent, MapChartComponent], exports: [ChartComponent, XyChartComponent, MapChartComponent] }); }
|
|
457
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicChartModule, imports: [ChartComponent, XyChartComponent, MapChartComponent] }); }
|
|
459
458
|
}
|
|
460
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicChartModule, decorators: [{
|
|
461
460
|
type: NgModule,
|
|
462
461
|
args: [{
|
|
463
462
|
imports: [ChartComponent, XyChartComponent, MapChartComponent],
|
|
@@ -489,10 +488,10 @@ class VicMapAuxMarks extends AuxMarks {
|
|
|
489
488
|
getTransitionDuration() {
|
|
490
489
|
return this.chart.config.transitionDuration;
|
|
491
490
|
}
|
|
492
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
493
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
491
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicMapAuxMarks, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
492
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: VicMapAuxMarks, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
494
493
|
}
|
|
495
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
494
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicMapAuxMarks, decorators: [{
|
|
496
495
|
type: Directive
|
|
497
496
|
}] });
|
|
498
497
|
|
|
@@ -505,10 +504,10 @@ class PrimaryMarks extends Marks {
|
|
|
505
504
|
initFromConfig() {
|
|
506
505
|
this.setChartScalesFromRanges(true);
|
|
507
506
|
}
|
|
508
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
509
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
507
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PrimaryMarks, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
508
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: PrimaryMarks, isStandalone: true, inputs: { config: "config" }, usesInheritance: true, ngImport: i0 }); }
|
|
510
509
|
}
|
|
511
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PrimaryMarks, decorators: [{
|
|
512
511
|
type: Directive
|
|
513
512
|
}], propDecorators: { config: [{
|
|
514
513
|
type: Input
|
|
@@ -552,10 +551,10 @@ class MapPrimaryMarks extends PrimaryMarks {
|
|
|
552
551
|
getTransitionDuration() {
|
|
553
552
|
return this.chart.config.transitionDuration;
|
|
554
553
|
}
|
|
555
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
556
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
554
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MapPrimaryMarks, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
555
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: MapPrimaryMarks, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
557
556
|
}
|
|
558
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
557
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MapPrimaryMarks, decorators: [{
|
|
559
558
|
type: Directive
|
|
560
559
|
}] });
|
|
561
560
|
|
|
@@ -628,10 +627,10 @@ class XyAuxMarks extends AuxMarks {
|
|
|
628
627
|
getTransitionDuration() {
|
|
629
628
|
return this.scales.useTransition ? this.chart.config.transitionDuration : 0;
|
|
630
629
|
}
|
|
631
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
632
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
630
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: XyAuxMarks, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
631
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: XyAuxMarks, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
633
632
|
}
|
|
634
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
633
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: XyAuxMarks, decorators: [{
|
|
635
634
|
type: Directive
|
|
636
635
|
}] });
|
|
637
636
|
|
|
@@ -681,10 +680,10 @@ class VicXyPrimaryMarks extends PrimaryMarks {
|
|
|
681
680
|
getTransitionDuration() {
|
|
682
681
|
return this.scales.useTransition ? this.chart.config.transitionDuration : 0;
|
|
683
682
|
}
|
|
684
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
685
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
683
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicXyPrimaryMarks, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
684
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: VicXyPrimaryMarks, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
686
685
|
}
|
|
687
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
686
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicXyPrimaryMarks, decorators: [{
|
|
688
687
|
type: Directive
|
|
689
688
|
}] });
|
|
690
689
|
|
|
@@ -1233,423 +1232,263 @@ class XyAxisBaseBuilder extends VicAuxMarksBuilder {
|
|
|
1233
1232
|
}
|
|
1234
1233
|
}
|
|
1235
1234
|
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1235
|
+
class XyAxisConfig extends AuxMarksConfig {
|
|
1236
|
+
getValidatedNumTicks(numTicks) {
|
|
1237
|
+
if (numTicks < 1) {
|
|
1238
|
+
return 1;
|
|
1239
|
+
}
|
|
1240
|
+
return Math.floor(numTicks);
|
|
1242
1241
|
}
|
|
1243
1242
|
}
|
|
1244
1243
|
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
class TickWrapBuilder {
|
|
1244
|
+
/**
|
|
1245
|
+
* A base directive for all axes.
|
|
1246
|
+
*/
|
|
1247
|
+
class XyAxis extends XyAuxMarks {
|
|
1250
1248
|
constructor() {
|
|
1251
|
-
|
|
1249
|
+
super(...arguments);
|
|
1250
|
+
this.elRef = inject(ElementRef);
|
|
1251
|
+
// used to ensure that a zero axis does not transition in position from baseline on first draw
|
|
1252
|
+
this.isFirstDraw = true;
|
|
1252
1253
|
}
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
this._breakOnChars = breakOnChars;
|
|
1261
|
-
return this;
|
|
1254
|
+
get class() {
|
|
1255
|
+
return {
|
|
1256
|
+
gridGroup: 'vic-grid-group',
|
|
1257
|
+
gridLine: 'vic-grid-line',
|
|
1258
|
+
axisGroup: 'vic-axis-group',
|
|
1259
|
+
label: 'vic-axis-label',
|
|
1260
|
+
};
|
|
1262
1261
|
}
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
*
|
|
1266
|
-
* @param value - The line-height of the tick labels, as a multiplier of the font size. For example, 1.1 is 110% of the font size, 1.5 is 150% of the font size, etc.
|
|
1267
|
-
*/
|
|
1268
|
-
lineHeight(value) {
|
|
1269
|
-
if (value === null) {
|
|
1270
|
-
this._lineHeight = undefined;
|
|
1271
|
-
return this;
|
|
1272
|
-
}
|
|
1273
|
-
this._lineHeight = value;
|
|
1274
|
-
return this;
|
|
1262
|
+
initFromConfig() {
|
|
1263
|
+
this.drawMarks();
|
|
1275
1264
|
}
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
*/
|
|
1283
|
-
maintainXPosition(maintainXPosition) {
|
|
1284
|
-
this._maintainXPosition = maintainXPosition;
|
|
1285
|
-
return this;
|
|
1265
|
+
setAxisFromScaleAndConfig() {
|
|
1266
|
+
this.axis = this.axisFunction(this.scale);
|
|
1267
|
+
this.setTickSize();
|
|
1268
|
+
if (this.config.ticks.format) {
|
|
1269
|
+
this.setTicks(this.config.ticks.format);
|
|
1270
|
+
}
|
|
1286
1271
|
}
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1272
|
+
setTickSize() {
|
|
1273
|
+
if (this.config.ticks.size !== undefined) {
|
|
1274
|
+
this.axis.tickSize(this.config.ticks.size);
|
|
1275
|
+
}
|
|
1276
|
+
else {
|
|
1277
|
+
if (this.config.ticks.sizeInner !== undefined) {
|
|
1278
|
+
this.axis.tickSizeInner(this.config.ticks.sizeInner);
|
|
1279
|
+
}
|
|
1280
|
+
if (this.config.ticks.sizeOuter !== undefined) {
|
|
1281
|
+
this.axis.tickSizeOuter(this.config.ticks.sizeOuter);
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
const baselineTranslate = this.getBaselineTranslate();
|
|
1285
|
+
if (baselineTranslate) {
|
|
1286
|
+
this.axis.tickSizeOuter(0);
|
|
1287
|
+
}
|
|
1297
1288
|
}
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
*/
|
|
1306
|
-
spaceAroundBreakChars(spaceAroundBreakChars) {
|
|
1307
|
-
this._spaceAroundBreakChars = spaceAroundBreakChars;
|
|
1308
|
-
return this;
|
|
1289
|
+
drawMarks() {
|
|
1290
|
+
this.setAxisFunction();
|
|
1291
|
+
this.setTranslate();
|
|
1292
|
+
this.setScale();
|
|
1293
|
+
this.setAxisFromScaleAndConfig();
|
|
1294
|
+
this.drawAxis();
|
|
1295
|
+
this.isFirstDraw = false;
|
|
1309
1296
|
}
|
|
1310
|
-
|
|
1311
|
-
if (
|
|
1312
|
-
this.
|
|
1313
|
-
|
|
1297
|
+
drawAxis() {
|
|
1298
|
+
if (!this.axisGroup) {
|
|
1299
|
+
this.axisGroup = select(this.elRef.nativeElement)
|
|
1300
|
+
.append('g')
|
|
1301
|
+
.attr('class', this.class.axisGroup);
|
|
1314
1302
|
}
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
maintainXPosition: this._maintainXPosition,
|
|
1326
|
-
maintainYPosition: this._maintainYPosition,
|
|
1327
|
-
lineHeight: this._lineHeight,
|
|
1328
|
-
breakOnChars: this._breakOnChars,
|
|
1329
|
-
spaceAroundBreakChars: this._spaceAroundBreakChars,
|
|
1303
|
+
// Remove domain to avoid odd baseline/zero-axis positioning during transitions
|
|
1304
|
+
this.axisGroup.select('.domain').remove();
|
|
1305
|
+
this.axisGroup
|
|
1306
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1307
|
+
.transition(this.getTransition(this.axisGroup))
|
|
1308
|
+
.call(this.axis)
|
|
1309
|
+
.on('end', () => {
|
|
1310
|
+
this.processTicks();
|
|
1311
|
+
this.processDomain();
|
|
1312
|
+
this.drawGrid();
|
|
1330
1313
|
});
|
|
1314
|
+
// Hide elements immediately based on config to prevent flash during transition
|
|
1315
|
+
this.hideElementsPerConfig();
|
|
1316
|
+
this.processTickLabels();
|
|
1317
|
+
if (this.config.label) {
|
|
1318
|
+
this.createLabel();
|
|
1319
|
+
}
|
|
1331
1320
|
}
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
? true
|
|
1337
|
-
: false
|
|
1338
|
-
: this._maintainXPosition;
|
|
1339
|
-
this._maintainYPosition =
|
|
1340
|
-
this._maintainYPosition === undefined
|
|
1341
|
-
? dimension === 'x'
|
|
1342
|
-
? false
|
|
1343
|
-
: true
|
|
1344
|
-
: this._maintainYPosition;
|
|
1345
|
-
}
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1348
|
-
class Ticks {
|
|
1349
|
-
constructor(options) {
|
|
1350
|
-
safeAssign(this, options);
|
|
1351
|
-
}
|
|
1352
|
-
}
|
|
1353
|
-
class QuantitativeTicks extends Ticks {
|
|
1354
|
-
constructor(options) {
|
|
1355
|
-
super(options);
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
const DEFAULT$z = {
|
|
1360
|
-
_class: () => '',
|
|
1361
|
-
_labelsDisplay: true,
|
|
1362
|
-
_marksDisplay: true,
|
|
1363
|
-
_remove: false,
|
|
1364
|
-
_stroke: 'none',
|
|
1365
|
-
_strokeOpacity: 1,
|
|
1366
|
-
_strokeWidth: 3,
|
|
1367
|
-
};
|
|
1368
|
-
const QUANT_DEFAULT = {
|
|
1369
|
-
_spacing: 40,
|
|
1370
|
-
};
|
|
1371
|
-
class TicksBuilder {
|
|
1372
|
-
constructor(options) {
|
|
1373
|
-
safeAssign(this, DEFAULT$z);
|
|
1374
|
-
safeAssign(this, options);
|
|
1375
|
-
}
|
|
1376
|
-
class(value) {
|
|
1377
|
-
if (value === null) {
|
|
1378
|
-
this._class = DEFAULT$z._class;
|
|
1379
|
-
return this;
|
|
1321
|
+
hideElementsPerConfig() {
|
|
1322
|
+
// Remove tick marks immediately if configured to be hidden
|
|
1323
|
+
if (this.config.ticks.marksDisplay === false) {
|
|
1324
|
+
this.axisGroup.selectAll('.tick line').interrupt().remove();
|
|
1380
1325
|
}
|
|
1381
|
-
if
|
|
1382
|
-
|
|
1383
|
-
|
|
1326
|
+
// Remove tick labels immediately if configured to be hidden
|
|
1327
|
+
if (this.config.ticks.labelsDisplay === false) {
|
|
1328
|
+
this.axisGroup.selectAll('.tick text').interrupt().remove();
|
|
1384
1329
|
}
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
* OPTIONAL. Sets the font size of the tick labels.
|
|
1390
|
-
*
|
|
1391
|
-
* @param value - The font size of the tick labels, in px.
|
|
1392
|
-
*
|
|
1393
|
-
* If not called, the default font size is D3's default, which is 10px.
|
|
1394
|
-
*/
|
|
1395
|
-
fontSize(value) {
|
|
1396
|
-
if (value === null) {
|
|
1397
|
-
this._fontSize = undefined;
|
|
1398
|
-
return this;
|
|
1330
|
+
// Remove baseline immediately if not displayed and no zero baseline exists
|
|
1331
|
+
const zeroAxisTranslate = this.getBaselineTranslate();
|
|
1332
|
+
if (!this.config.baseline.display && zeroAxisTranslate === null) {
|
|
1333
|
+
this.axisGroup.select('.domain').interrupt().remove();
|
|
1399
1334
|
}
|
|
1400
|
-
this._fontSize = value;
|
|
1401
|
-
return this;
|
|
1402
1335
|
}
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1336
|
+
processTicks() {
|
|
1337
|
+
const tickText = select(this.elRef.nativeElement).selectAll('.tick text');
|
|
1338
|
+
if (this.config.ticks.class) {
|
|
1339
|
+
select(this.elRef.nativeElement)
|
|
1340
|
+
.selectAll('.tick')
|
|
1341
|
+
.each((d, i, nodes) => {
|
|
1342
|
+
const labelClass = this.config.ticks.class(d);
|
|
1343
|
+
if (labelClass) {
|
|
1344
|
+
select(nodes[i]).classed(labelClass, true);
|
|
1345
|
+
}
|
|
1346
|
+
else {
|
|
1347
|
+
///remove any previous class
|
|
1348
|
+
select(nodes[i]).attr('class', 'tick');
|
|
1349
|
+
}
|
|
1350
|
+
});
|
|
1351
|
+
}
|
|
1352
|
+
if (this.config.ticks.fontSize) {
|
|
1353
|
+
this.setTickFontSize(tickText);
|
|
1354
|
+
}
|
|
1355
|
+
// TODO: Determine if this needs to be called from the on('end') of the axisGroup transition
|
|
1356
|
+
// or if if should be moved to processTickLabels. I think there is a reason it is here. (?)
|
|
1357
|
+
if (this.config.ticks.wrap && this.config.ticks.wrap.width !== undefined) {
|
|
1358
|
+
this.wrapAxisTickText(tickText);
|
|
1407
1359
|
}
|
|
1408
|
-
this._format = format;
|
|
1409
|
-
return this;
|
|
1410
1360
|
}
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
* @param value - `true` to retain all tick labels, `false` to remove all tick labels.
|
|
1415
|
-
*
|
|
1416
|
-
* If not called, the default value is `true`.
|
|
1417
|
-
*/
|
|
1418
|
-
labelsDisplay(value) {
|
|
1419
|
-
this._labelsDisplay = value;
|
|
1420
|
-
return this;
|
|
1361
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1362
|
+
setTickFontSize(tickTextSelection) {
|
|
1363
|
+
tickTextSelection.attr('font-size', this.config.ticks.fontSize);
|
|
1421
1364
|
}
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
labelsStroke(value) {
|
|
1430
|
-
if (value === null) {
|
|
1431
|
-
this._labelsStroke = DEFAULT$z._stroke;
|
|
1432
|
-
return this;
|
|
1365
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1366
|
+
wrapAxisTickText(tickTextSelection) {
|
|
1367
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1368
|
+
const { width, ...properties } = this.config.ticks.wrap;
|
|
1369
|
+
let wrapWidth;
|
|
1370
|
+
if (this.config.ticks.wrap.width === 'bandwidth') {
|
|
1371
|
+
wrapWidth = this.scale.bandwidth();
|
|
1433
1372
|
}
|
|
1434
|
-
this.
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
* @param value - The opacity of the stroke around the tick labels.
|
|
1441
|
-
*
|
|
1442
|
-
* If not called, the default value is 1.
|
|
1443
|
-
*/
|
|
1444
|
-
labelsStrokeOpacity(value) {
|
|
1445
|
-
if (value === null) {
|
|
1446
|
-
this._labelsStrokeOpacity = undefined;
|
|
1447
|
-
return this;
|
|
1373
|
+
else if (typeof this.config.ticks.wrap.width === 'function') {
|
|
1374
|
+
const chartWidth = this.scale.range()[1] - this.scale.range()[0];
|
|
1375
|
+
const numOfTicks = select(this.elRef.nativeElement)
|
|
1376
|
+
.selectAll('.tick')
|
|
1377
|
+
.size();
|
|
1378
|
+
wrapWidth = this.config.ticks.wrap.width(chartWidth, numOfTicks);
|
|
1448
1379
|
}
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
}
|
|
1452
|
-
/**
|
|
1453
|
-
* OPTIONAL. Sets the width of the stroke around the tick labels. Often used to improve the legibility of tick labels, for example, on dark backgrounds.
|
|
1454
|
-
*
|
|
1455
|
-
* @param value - The width of the stroke around the tick labels.
|
|
1456
|
-
*
|
|
1457
|
-
* If not called, the default value is 3.
|
|
1458
|
-
*/
|
|
1459
|
-
labelsStrokeWidth(value) {
|
|
1460
|
-
if (value === null) {
|
|
1461
|
-
this._labelsStrokeWidth = undefined;
|
|
1462
|
-
return this;
|
|
1380
|
+
else {
|
|
1381
|
+
wrapWidth = this.config.ticks.wrap.width;
|
|
1463
1382
|
}
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
}
|
|
1467
|
-
/**
|
|
1468
|
-
* OPTIONAL. If false, tick marks (lines) will be removed.
|
|
1469
|
-
*
|
|
1470
|
-
* @param value - `true` to retain all tick marks, `false` to remove all tick marks.
|
|
1471
|
-
*
|
|
1472
|
-
* If not called, the default value is `true`.
|
|
1473
|
-
*/
|
|
1474
|
-
marksDisplay(value) {
|
|
1475
|
-
this._marksDisplay = value;
|
|
1476
|
-
return this;
|
|
1383
|
+
const wrap = new SvgTextWrap({ ...properties, width: wrapWidth });
|
|
1384
|
+
wrap.wrap(tickTextSelection);
|
|
1477
1385
|
}
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
rotate(value) {
|
|
1488
|
-
if (value === null) {
|
|
1489
|
-
this._rotate = undefined;
|
|
1490
|
-
return this;
|
|
1386
|
+
processDomain() {
|
|
1387
|
+
const zeroAxisTranslate = this.getBaselineTranslate();
|
|
1388
|
+
if (this.config.baseline.zeroBaseline.display &&
|
|
1389
|
+
zeroAxisTranslate !== null) {
|
|
1390
|
+
this.axisGroup.call((g) => g
|
|
1391
|
+
.select('.domain')
|
|
1392
|
+
.attr('transform', zeroAxisTranslate)
|
|
1393
|
+
.attr('class', 'domain baseline zero-axis-baseline')
|
|
1394
|
+
.attr('stroke-dasharray', this.config.baseline.zeroBaseline.dasharray));
|
|
1491
1395
|
}
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
* @param value - The size of the ticks, in px.
|
|
1499
|
-
*
|
|
1500
|
-
* If not called or called with `null`, the default size is the D3 default size.
|
|
1501
|
-
*
|
|
1502
|
-
* If specified, this value will override any values set by `sizeInner` or `sizeOuter`.
|
|
1503
|
-
*/
|
|
1504
|
-
size(value) {
|
|
1505
|
-
if (value === null) {
|
|
1506
|
-
this._size = undefined;
|
|
1507
|
-
return this;
|
|
1396
|
+
if (zeroAxisTranslate === null) {
|
|
1397
|
+
this.axisGroup.call((g) => g
|
|
1398
|
+
.select('.domain')
|
|
1399
|
+
.attr('class', 'domain baseline')
|
|
1400
|
+
.attr('transform', null)
|
|
1401
|
+
.attr('stroke-dasharray', null));
|
|
1508
1402
|
}
|
|
1509
|
-
this._size = value;
|
|
1510
|
-
return this;
|
|
1511
1403
|
}
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
this.
|
|
1523
|
-
|
|
1404
|
+
processTickLabels() {
|
|
1405
|
+
if (this.config.ticks.rotate) {
|
|
1406
|
+
this.axisGroup.call((g) => g
|
|
1407
|
+
.selectAll('.tick text')
|
|
1408
|
+
.style('transform', `rotate(-${this.config.ticks.rotate}deg)`)
|
|
1409
|
+
.attr('text-anchor', 'end')
|
|
1410
|
+
.attr('alignment-baseline', 'start'));
|
|
1411
|
+
}
|
|
1412
|
+
if (this.config.ticks.labelsStroke ||
|
|
1413
|
+
this.config.ticks.labelsStrokeOpacity ||
|
|
1414
|
+
this.config.ticks.labelsStrokeWidth) {
|
|
1415
|
+
this.axisGroup.call((g) => g
|
|
1416
|
+
.selectAll('.tick text')
|
|
1417
|
+
.attr('stroke', this.config.ticks.labelsStroke)
|
|
1418
|
+
.attr('stroke-opacity', this.config.ticks.labelsStrokeOpacity)
|
|
1419
|
+
.attr('stroke-width', this.config.ticks.labelsStrokeWidth));
|
|
1524
1420
|
}
|
|
1525
|
-
this._sizeInner = value;
|
|
1526
|
-
return this;
|
|
1527
1421
|
}
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
* If not called on ordinal axes, the default value is 0. If not called on quantitative axes, no modification is made to D3's default value.
|
|
1534
|
-
*/
|
|
1535
|
-
sizeOuter(value) {
|
|
1536
|
-
if (value === null) {
|
|
1537
|
-
this._sizeOuter = undefined;
|
|
1538
|
-
return this;
|
|
1422
|
+
otherAxisHasPosAndNegValues(dimension) {
|
|
1423
|
+
const otherDimension = dimension === 'x' ? 'y' : 'x';
|
|
1424
|
+
const domain = this.scales[otherDimension].domain();
|
|
1425
|
+
if (domain.length > 2 || isNaN(domain[0]) || isNaN(domain[1])) {
|
|
1426
|
+
return false;
|
|
1539
1427
|
}
|
|
1540
|
-
|
|
1541
|
-
return this;
|
|
1428
|
+
return domain[0] < 0 && domain[1] > 0;
|
|
1542
1429
|
}
|
|
1543
|
-
|
|
1544
|
-
if (
|
|
1545
|
-
this.
|
|
1546
|
-
|
|
1430
|
+
drawGrid() {
|
|
1431
|
+
if (this.config.grid) {
|
|
1432
|
+
if (!this.gridGroup) {
|
|
1433
|
+
this.gridGroup = select(this.elRef.nativeElement)
|
|
1434
|
+
.append('g')
|
|
1435
|
+
.attr('class', this.class.gridGroup);
|
|
1436
|
+
}
|
|
1437
|
+
this.gridGroup
|
|
1438
|
+
.transition(this.getTransition(this.gridGroup))
|
|
1439
|
+
.call(this.axis.tickSizeInner(this.getGridLineLength()))
|
|
1440
|
+
.selectAll('.tick')
|
|
1441
|
+
.attr('class', `tick ${this.class.gridLine}`)
|
|
1442
|
+
.style('display', (_, i) => this.config.grid.filter(i) ? null : 'none')
|
|
1443
|
+
.select('line')
|
|
1444
|
+
.attr('stroke', this.config.grid.stroke.color)
|
|
1445
|
+
.attr('stroke-dasharray', this.config.grid.stroke.dasharray)
|
|
1446
|
+
.attr('stroke-width', this.config.grid.stroke.width)
|
|
1447
|
+
.attr('opacity', this.config.grid.stroke.opacity)
|
|
1448
|
+
.attr('stroke-linecap', this.config.grid.stroke.linecap)
|
|
1449
|
+
.attr('stroke-linejoin', this.config.grid.stroke.linejoin);
|
|
1450
|
+
this.gridGroup.call((g) => {
|
|
1451
|
+
g.selectAll('text').remove();
|
|
1452
|
+
g.selectAll('.domain').remove();
|
|
1453
|
+
});
|
|
1454
|
+
}
|
|
1455
|
+
else {
|
|
1456
|
+
select(this.elRef.nativeElement)
|
|
1457
|
+
.select(`.${this.class.gridGroup}`)
|
|
1458
|
+
.remove();
|
|
1459
|
+
this.gridGroup = undefined;
|
|
1547
1460
|
}
|
|
1548
|
-
this.wrapBuilder = new TickWrapBuilder();
|
|
1549
|
-
wrap(this.wrapBuilder);
|
|
1550
|
-
return this;
|
|
1551
1461
|
}
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
fontSize: this._fontSize,
|
|
1556
|
-
format: this._format,
|
|
1557
|
-
labelsDisplay: this._labelsDisplay,
|
|
1558
|
-
labelsStroke: this._labelsStroke,
|
|
1559
|
-
labelsStrokeOpacity: this._labelsStrokeOpacity,
|
|
1560
|
-
labelsStrokeWidth: this._labelsStrokeWidth,
|
|
1561
|
-
marksDisplay: this._marksDisplay,
|
|
1562
|
-
rotate: this._rotate,
|
|
1563
|
-
size: this._size,
|
|
1564
|
-
sizeInner: this._sizeInner,
|
|
1565
|
-
sizeOuter: this._sizeOuter,
|
|
1566
|
-
wrap: this.wrapBuilder?._build(dimension),
|
|
1567
|
-
});
|
|
1462
|
+
getGridLineLength() {
|
|
1463
|
+
const gridLineScale = this.config.grid.axis === 'x' ? this.scales.y : this.scales.x;
|
|
1464
|
+
return -1 * Math.abs(gridLineScale.range()[1] - gridLineScale.range()[0]);
|
|
1568
1465
|
}
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
}
|
|
1576
|
-
/**
|
|
1577
|
-
* OPTIONAL. Approximately specifies the number of ticks for the axis.
|
|
1578
|
-
*
|
|
1579
|
-
* @param value - The number of ticks to pass to D3's axis.ticks(), or null to unset the number of ticks.
|
|
1580
|
-
*
|
|
1581
|
-
* If not called, a reasonable and valid default will be used based on the size of the chart.
|
|
1582
|
-
*
|
|
1583
|
-
* Note that this number will be passed to D3's `ticks()` method and therefore it can be an approximate number of ticks.
|
|
1584
|
-
*
|
|
1585
|
-
* If this method is called, the passed in number of ticks will be validated against the data domain and the value formatter for the axis. If the number of ticks is not valid—for example, if the ticks are formatted with %Y and there are three years of values in the data, and this method is called with 10, a valid number will be used instead.
|
|
1586
|
-
*/
|
|
1587
|
-
count(value) {
|
|
1588
|
-
if (value === null) {
|
|
1589
|
-
this._count = undefined;
|
|
1590
|
-
return this;
|
|
1591
|
-
}
|
|
1592
|
-
this._count = value;
|
|
1593
|
-
return this;
|
|
1594
|
-
}
|
|
1595
|
-
/**
|
|
1596
|
-
* OPTIONAL. Specifies the an approximate spacing between ticks, in pixels.
|
|
1597
|
-
*
|
|
1598
|
-
* @param value - The spacing between ticks in pixels, or null to unset the spacing.
|
|
1599
|
-
*
|
|
1600
|
-
* If not called, the default value is 40. If `count` is set, this value will be ignored.
|
|
1601
|
-
*/
|
|
1602
|
-
spacing(value) {
|
|
1603
|
-
if (value === null) {
|
|
1604
|
-
this._spacing = undefined;
|
|
1605
|
-
return this;
|
|
1606
|
-
}
|
|
1607
|
-
this._spacing = value;
|
|
1608
|
-
return this;
|
|
1609
|
-
}
|
|
1610
|
-
/**
|
|
1611
|
-
* OPTIONAL. Determines the values that will show up as ticks on the axis.
|
|
1612
|
-
*
|
|
1613
|
-
* @param values - An array of quantitative values to pass to D3's axis.tickValues(), or null to unset the tick values.
|
|
1614
|
-
*
|
|
1615
|
-
*/
|
|
1616
|
-
values(values) {
|
|
1617
|
-
if (values === null) {
|
|
1618
|
-
this._values = undefined;
|
|
1619
|
-
return this;
|
|
1620
|
-
}
|
|
1621
|
-
this._values = values;
|
|
1622
|
-
return this;
|
|
1623
|
-
}
|
|
1624
|
-
_build(dimension) {
|
|
1625
|
-
return new QuantitativeTicks({
|
|
1626
|
-
class: this._class,
|
|
1627
|
-
count: this._count,
|
|
1628
|
-
fontSize: this._fontSize,
|
|
1629
|
-
format: this._format,
|
|
1630
|
-
labelsDisplay: this._labelsDisplay,
|
|
1631
|
-
labelsStroke: this._labelsStroke,
|
|
1632
|
-
labelsStrokeOpacity: this._labelsStrokeOpacity,
|
|
1633
|
-
labelsStrokeWidth: this._labelsStrokeWidth,
|
|
1634
|
-
marksDisplay: this._marksDisplay,
|
|
1635
|
-
rotate: this._rotate,
|
|
1636
|
-
size: this._size,
|
|
1637
|
-
sizeInner: this._sizeInner,
|
|
1638
|
-
sizeOuter: this._sizeOuter,
|
|
1639
|
-
spacing: this._spacing,
|
|
1640
|
-
values: this._values,
|
|
1641
|
-
wrap: this.wrapBuilder?._build(dimension),
|
|
1642
|
-
});
|
|
1466
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1467
|
+
getTransition(selection) {
|
|
1468
|
+
const transitionDuration = this.isFirstDraw
|
|
1469
|
+
? 0
|
|
1470
|
+
: this.getTransitionDuration();
|
|
1471
|
+
return selection.transition().duration(transitionDuration);
|
|
1643
1472
|
}
|
|
1473
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: XyAxis, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1474
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: XyAxis, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
1644
1475
|
}
|
|
1476
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: XyAxis, decorators: [{
|
|
1477
|
+
type: Directive
|
|
1478
|
+
}] });
|
|
1645
1479
|
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1480
|
+
function ordinalAxisMixin(Base) {
|
|
1481
|
+
class Mixin extends Base {
|
|
1482
|
+
setTicks(tickFormat) {
|
|
1483
|
+
this.axis.tickFormat((d) => {
|
|
1484
|
+
const formatter = d instanceof Date ? utcFormat : format;
|
|
1485
|
+
return typeof tickFormat === 'function'
|
|
1486
|
+
? tickFormat(d)
|
|
1487
|
+
: formatter(tickFormat)(d);
|
|
1488
|
+
});
|
|
1650
1489
|
}
|
|
1651
|
-
return Math.floor(numTicks);
|
|
1652
1490
|
}
|
|
1491
|
+
return Mixin;
|
|
1653
1492
|
}
|
|
1654
1493
|
|
|
1655
1494
|
function mixinOrdinalAxisConfig(Base) {
|
|
@@ -1659,18 +1498,157 @@ function mixinOrdinalAxisConfig(Base) {
|
|
|
1659
1498
|
super(...args);
|
|
1660
1499
|
safeAssign(this, args[0]);
|
|
1661
1500
|
}
|
|
1662
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: Mixin, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1663
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: Mixin, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
1664
1501
|
}
|
|
1665
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: Mixin, decorators: [{
|
|
1666
|
-
type: Directive
|
|
1667
|
-
}], ctorParameters: () => [{ type: undefined }] });
|
|
1668
1502
|
return Mixin;
|
|
1669
1503
|
}
|
|
1670
1504
|
class VicOrdinalAxisConfig extends mixinOrdinalAxisConfig(XyAxisConfig) {
|
|
1671
1505
|
}
|
|
1672
1506
|
|
|
1673
|
-
function
|
|
1507
|
+
function quantitativeAxisMixin(Base) {
|
|
1508
|
+
class Mixin extends Base {
|
|
1509
|
+
setTicks(tickFormat) {
|
|
1510
|
+
if (this.config.ticks.values) {
|
|
1511
|
+
this.setSpecifiedTickValues(tickFormat);
|
|
1512
|
+
}
|
|
1513
|
+
else {
|
|
1514
|
+
this.setUnspecifiedTickValues(tickFormat);
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
setSpecifiedTickValues(tickFormat) {
|
|
1518
|
+
const validTickValues = this.getValidTickValues();
|
|
1519
|
+
this.axis.tickValues(validTickValues);
|
|
1520
|
+
this.axis.tickFormat((d) => {
|
|
1521
|
+
const formatter = d instanceof Date ? utcFormat : format;
|
|
1522
|
+
return typeof tickFormat === 'function'
|
|
1523
|
+
? tickFormat(d)
|
|
1524
|
+
: formatter(tickFormat)(d);
|
|
1525
|
+
});
|
|
1526
|
+
}
|
|
1527
|
+
getValidTickValues() {
|
|
1528
|
+
const domain = this.scale.domain();
|
|
1529
|
+
const validValues = [];
|
|
1530
|
+
this.config.ticks.values.forEach((value) => {
|
|
1531
|
+
if (domain[0] <= value && value <= domain[1]) {
|
|
1532
|
+
validValues.push(value);
|
|
1533
|
+
}
|
|
1534
|
+
});
|
|
1535
|
+
return validValues;
|
|
1536
|
+
}
|
|
1537
|
+
setUnspecifiedTickValues(tickFormat) {
|
|
1538
|
+
const validNumTicks = this.getSuggestedNumTicks(tickFormat);
|
|
1539
|
+
this.axis.ticks(validNumTicks);
|
|
1540
|
+
this.axis.tickFormat((d) => {
|
|
1541
|
+
const formatter = d instanceof Date ? utcFormat : format;
|
|
1542
|
+
return typeof tickFormat === 'function'
|
|
1543
|
+
? tickFormat(d)
|
|
1544
|
+
: formatter(tickFormat)(d);
|
|
1545
|
+
});
|
|
1546
|
+
}
|
|
1547
|
+
getSuggestedNumTicks(tickFormat) {
|
|
1548
|
+
let numSuggestedTicks = this.getNumTicks();
|
|
1549
|
+
if (typeof tickFormat === 'string' &&
|
|
1550
|
+
typeof numSuggestedTicks === 'number') {
|
|
1551
|
+
numSuggestedTicks = Math.round(numSuggestedTicks);
|
|
1552
|
+
if (this.scale.domain()[0] instanceof Date) {
|
|
1553
|
+
const maxTicks = this.getMaxTicksForDateFormat(tickFormat);
|
|
1554
|
+
if (maxTicks !== null) {
|
|
1555
|
+
return Math.min(numSuggestedTicks, maxTicks);
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
if (tickFormat.includes('.')) {
|
|
1559
|
+
return this.getValidNumTicksForNumberFormatString(numSuggestedTicks, tickFormat);
|
|
1560
|
+
}
|
|
1561
|
+
return numSuggestedTicks;
|
|
1562
|
+
}
|
|
1563
|
+
else {
|
|
1564
|
+
return numSuggestedTicks;
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
getNumTicks() {
|
|
1568
|
+
return (this.config.ticks.count ||
|
|
1569
|
+
this.config.getNumTicksBySpacing(this.config.ticks.spacing, {
|
|
1570
|
+
height: this.chart.config.height,
|
|
1571
|
+
width: this.chart.config.width,
|
|
1572
|
+
}));
|
|
1573
|
+
}
|
|
1574
|
+
getValidNumTicksForNumberFormatString(numTicks, tickFormat) {
|
|
1575
|
+
let numDecimalPlaces = Number(tickFormat.split('.')[1][0]);
|
|
1576
|
+
if (tickFormat.includes('%')) {
|
|
1577
|
+
numDecimalPlaces = numDecimalPlaces + 2;
|
|
1578
|
+
}
|
|
1579
|
+
const [start, end] = this.scale.domain();
|
|
1580
|
+
const range = end - start;
|
|
1581
|
+
const minStep = Math.pow(10, -1 * numDecimalPlaces);
|
|
1582
|
+
const rawCount = range / minStep;
|
|
1583
|
+
const numValidTicks = Math.round(rawCount);
|
|
1584
|
+
if (numTicks < numValidTicks) {
|
|
1585
|
+
return numTicks;
|
|
1586
|
+
}
|
|
1587
|
+
else {
|
|
1588
|
+
return numValidTicks;
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
getMaxTicksForDateFormat(tickFormat) {
|
|
1592
|
+
const [startDate, endDate] = this.scale.domain();
|
|
1593
|
+
// Year-only formatters: %Y, %y
|
|
1594
|
+
if (tickFormat === '%Y' || tickFormat === '%y') {
|
|
1595
|
+
const startYear = startDate.getUTCFullYear();
|
|
1596
|
+
const endYear = endDate.getUTCFullYear();
|
|
1597
|
+
return endYear - startYear + 1;
|
|
1598
|
+
}
|
|
1599
|
+
// Quarter formatter: %Y Q%q
|
|
1600
|
+
if (tickFormat === '%Y Q%q') {
|
|
1601
|
+
const startYear = startDate.getUTCFullYear();
|
|
1602
|
+
const startQuarter = Math.floor(startDate.getUTCMonth() / 3);
|
|
1603
|
+
const endYear = endDate.getUTCFullYear();
|
|
1604
|
+
const endQuarter = Math.floor(endDate.getUTCMonth() / 3);
|
|
1605
|
+
return (endYear - startYear) * 4 + (endQuarter - startQuarter) + 1;
|
|
1606
|
+
}
|
|
1607
|
+
// Month-year formatters: %B %Y, %b %Y
|
|
1608
|
+
if (tickFormat === '%B %Y' || tickFormat === '%b %Y') {
|
|
1609
|
+
const startYear = startDate.getUTCFullYear();
|
|
1610
|
+
const startMonth = startDate.getUTCMonth();
|
|
1611
|
+
const endYear = endDate.getUTCFullYear();
|
|
1612
|
+
const endMonth = endDate.getUTCMonth();
|
|
1613
|
+
return (endYear - startYear) * 12 + (endMonth - startMonth) + 1;
|
|
1614
|
+
}
|
|
1615
|
+
// Full date formatters: %B %d, %Y
|
|
1616
|
+
if (tickFormat === '%B %d, %Y' ||
|
|
1617
|
+
tickFormat === '%m/%d/%Y' ||
|
|
1618
|
+
tickFormat === '%Y-%m-%d') {
|
|
1619
|
+
const timeDiff = endDate.getTime() - startDate.getTime();
|
|
1620
|
+
const daysDiff = Math.ceil(timeDiff / (1000 * 60 * 60 * 24));
|
|
1621
|
+
return daysDiff + 1;
|
|
1622
|
+
}
|
|
1623
|
+
// Additional common time formatters for completeness
|
|
1624
|
+
// Month formatters: %B (full month), %b (abbreviated), %m (numeric)
|
|
1625
|
+
if (tickFormat === '%B' || tickFormat === '%b' || tickFormat === '%m') {
|
|
1626
|
+
const startYear = startDate.getUTCFullYear();
|
|
1627
|
+
const startMonth = startDate.getUTCMonth();
|
|
1628
|
+
const endYear = endDate.getUTCFullYear();
|
|
1629
|
+
const endMonth = endDate.getUTCMonth();
|
|
1630
|
+
return (endYear - startYear) * 12 + (endMonth - startMonth) + 1;
|
|
1631
|
+
}
|
|
1632
|
+
// Day formatters: %d (day of month), %e (day of month with space), %j (day of year)
|
|
1633
|
+
if (tickFormat === '%d' || tickFormat === '%e' || tickFormat === '%j') {
|
|
1634
|
+
const timeDiff = endDate.getTime() - startDate.getTime();
|
|
1635
|
+
const daysDiff = Math.ceil(timeDiff / (1000 * 60 * 60 * 24));
|
|
1636
|
+
return daysDiff + 1;
|
|
1637
|
+
}
|
|
1638
|
+
// Week formatters: %U, %W (week of year)
|
|
1639
|
+
if (tickFormat === '%U' || tickFormat === '%W') {
|
|
1640
|
+
const timeDiff = endDate.getTime() - startDate.getTime();
|
|
1641
|
+
const weeksDiff = Math.ceil(timeDiff / (1000 * 60 * 60 * 24 * 7));
|
|
1642
|
+
return weeksDiff + 1;
|
|
1643
|
+
}
|
|
1644
|
+
// For composite formats or unrecognized formats, return null to use default logic
|
|
1645
|
+
return null;
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
return Mixin;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
function mixinQuantitativeAxisConfig(Base) {
|
|
1674
1652
|
class Mixin extends Base {
|
|
1675
1653
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1676
1654
|
constructor(...args) {
|
|
@@ -1679,332 +1657,420 @@ function mixinXAxisConfig(Base) {
|
|
|
1679
1657
|
safeAssign(this, args[0]);
|
|
1680
1658
|
}
|
|
1681
1659
|
}
|
|
1682
|
-
getNumTicksBySpacing(spacing, dimensions) {
|
|
1683
|
-
const d3SuggestedDefault = dimensions.width / spacing;
|
|
1684
|
-
return this.getValidatedNumTicks(d3SuggestedDefault);
|
|
1685
|
-
}
|
|
1686
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: Mixin, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1687
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: Mixin, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
1688
1660
|
}
|
|
1689
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: Mixin, decorators: [{
|
|
1690
|
-
type: Directive
|
|
1691
|
-
}], ctorParameters: () => [{ type: undefined }] });
|
|
1692
1661
|
return Mixin;
|
|
1693
1662
|
}
|
|
1694
|
-
class
|
|
1663
|
+
class VicQuantitativeAxisConfig extends mixinQuantitativeAxisConfig(XyAxisConfig) {
|
|
1695
1664
|
}
|
|
1696
1665
|
|
|
1697
|
-
|
|
1698
|
-
|
|
1666
|
+
/**
|
|
1667
|
+
* A config that specifies how axis tick labels should wrap.
|
|
1668
|
+
*/
|
|
1669
|
+
class TickWrap {
|
|
1699
1670
|
constructor(options) {
|
|
1700
|
-
|
|
1671
|
+
safeAssign(this, options);
|
|
1701
1672
|
}
|
|
1702
1673
|
}
|
|
1703
1674
|
|
|
1704
|
-
const DEFAULT$
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
display: false,
|
|
1708
|
-
},
|
|
1709
|
-
};
|
|
1710
|
-
const TICK_DEFAULT$1 = {
|
|
1711
|
-
_sizeOuter: 0,
|
|
1675
|
+
const DEFAULT$A = {
|
|
1676
|
+
_wrapWidth: 'bandwidth',
|
|
1677
|
+
_lineHeight: 1.1,
|
|
1712
1678
|
};
|
|
1713
|
-
class
|
|
1679
|
+
class TickWrapBuilder {
|
|
1714
1680
|
constructor() {
|
|
1715
|
-
|
|
1716
|
-
safeAssign(this, DEFAULT$y);
|
|
1717
|
-
this.ticksBuilder = this.getTicksBuilder();
|
|
1681
|
+
safeAssign(this, DEFAULT$A);
|
|
1718
1682
|
}
|
|
1719
1683
|
/**
|
|
1720
|
-
* OPTIONAL.
|
|
1721
|
-
*
|
|
1722
|
-
* @param value - The side of the chart where the axis will be placed.
|
|
1684
|
+
* OPTIONAL. Sets the characters to break on when wrapping text.
|
|
1685
|
+
* By default, text will only break on spaces.
|
|
1723
1686
|
*
|
|
1724
|
-
*
|
|
1687
|
+
* @default []
|
|
1725
1688
|
*/
|
|
1726
|
-
|
|
1727
|
-
this.
|
|
1689
|
+
breakOnChars(breakOnChars) {
|
|
1690
|
+
this._breakOnChars = breakOnChars;
|
|
1728
1691
|
return this;
|
|
1729
1692
|
}
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1693
|
+
/**
|
|
1694
|
+
* OPTIONAL. Sets the line-height property of the tick labels. Adjusting the line-height can useful when wrapping labels, particularly on a y-axis.
|
|
1695
|
+
*
|
|
1696
|
+
* @param value - The line-height of the tick labels, as a multiplier of the font size. For example, 1.1 is 110% of the font size, 1.5 is 150% of the font size, etc.
|
|
1697
|
+
*/
|
|
1698
|
+
lineHeight(value) {
|
|
1699
|
+
if (value === null) {
|
|
1700
|
+
this._lineHeight = undefined;
|
|
1733
1701
|
return this;
|
|
1734
1702
|
}
|
|
1735
|
-
|
|
1703
|
+
this._lineHeight = value;
|
|
1736
1704
|
return this;
|
|
1737
1705
|
}
|
|
1738
|
-
|
|
1739
|
-
|
|
1706
|
+
/**
|
|
1707
|
+
* OPTIONAL. If true, the x position of the text will be maintained.
|
|
1708
|
+
*
|
|
1709
|
+
* This is useful, for example, for centering bar labels on a vertical bar chart.
|
|
1710
|
+
*
|
|
1711
|
+
* @default false
|
|
1712
|
+
*/
|
|
1713
|
+
maintainXPosition(maintainXPosition) {
|
|
1714
|
+
this._maintainXPosition = maintainXPosition;
|
|
1715
|
+
return this;
|
|
1740
1716
|
}
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1717
|
+
/**
|
|
1718
|
+
* OPTIONAL. If true, the y position of the text will be maintained.
|
|
1719
|
+
*
|
|
1720
|
+
* This is useful, for example, for centering bar labels on a horizontal bar chart.
|
|
1721
|
+
*
|
|
1722
|
+
* @default false
|
|
1723
|
+
*/
|
|
1724
|
+
maintainYPosition(maintainYPosition) {
|
|
1725
|
+
this._maintainYPosition = maintainYPosition;
|
|
1726
|
+
return this;
|
|
1727
|
+
}
|
|
1728
|
+
/**
|
|
1729
|
+
* OPTIONAL. If true, spaces will be added around break characters.
|
|
1730
|
+
*
|
|
1731
|
+
* This is useful when breaking on punctuation characters, to avoid words being stuck to punctuation.
|
|
1732
|
+
* For example, breaking on commas without spaces around them would result in "word," at the end of one line and "word" at the start of the next line.
|
|
1733
|
+
*
|
|
1734
|
+
* @default false
|
|
1735
|
+
*/
|
|
1736
|
+
spaceAroundBreakChars(spaceAroundBreakChars) {
|
|
1737
|
+
this._spaceAroundBreakChars = spaceAroundBreakChars;
|
|
1738
|
+
return this;
|
|
1739
|
+
}
|
|
1740
|
+
width(width) {
|
|
1741
|
+
if (width === null) {
|
|
1742
|
+
this._width = undefined;
|
|
1743
|
+
return this;
|
|
1744
|
+
}
|
|
1745
|
+
this._width = width;
|
|
1746
|
+
return this;
|
|
1747
|
+
}
|
|
1748
|
+
/**
|
|
1749
|
+
* @internal Not meant to be called by consumers of the library.
|
|
1750
|
+
*/
|
|
1751
|
+
_build(dimension) {
|
|
1752
|
+
this.validate(dimension);
|
|
1753
|
+
return new TickWrap({
|
|
1754
|
+
width: this._width,
|
|
1755
|
+
maintainXPosition: this._maintainXPosition,
|
|
1756
|
+
maintainYPosition: this._maintainYPosition,
|
|
1757
|
+
lineHeight: this._lineHeight,
|
|
1758
|
+
breakOnChars: this._breakOnChars,
|
|
1759
|
+
spaceAroundBreakChars: this._spaceAroundBreakChars,
|
|
1750
1760
|
});
|
|
1751
1761
|
}
|
|
1752
|
-
|
|
1753
|
-
|
|
1762
|
+
validate(dimension) {
|
|
1763
|
+
this._maintainXPosition =
|
|
1764
|
+
this._maintainXPosition === undefined
|
|
1765
|
+
? dimension === 'y'
|
|
1766
|
+
? true
|
|
1767
|
+
: false
|
|
1768
|
+
: this._maintainXPosition;
|
|
1769
|
+
this._maintainYPosition =
|
|
1770
|
+
this._maintainYPosition === undefined
|
|
1771
|
+
? dimension === 'x'
|
|
1772
|
+
? false
|
|
1773
|
+
: true
|
|
1774
|
+
: this._maintainYPosition;
|
|
1775
|
+
}
|
|
1754
1776
|
}
|
|
1755
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: VicXOrdinalAxisConfigBuilder, decorators: [{
|
|
1756
|
-
type: Injectable
|
|
1757
|
-
}], ctorParameters: () => [] });
|
|
1758
1777
|
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
class XyAxis extends XyAuxMarks {
|
|
1763
|
-
constructor() {
|
|
1764
|
-
super(...arguments);
|
|
1765
|
-
this.elRef = inject(ElementRef);
|
|
1766
|
-
// used to ensure that a zero axis does not transition in position from baseline on first draw
|
|
1767
|
-
this.isFirstDraw = true;
|
|
1778
|
+
class Ticks {
|
|
1779
|
+
constructor(options) {
|
|
1780
|
+
safeAssign(this, options);
|
|
1768
1781
|
}
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
axisGroup: 'vic-axis-group',
|
|
1774
|
-
label: 'vic-axis-label',
|
|
1775
|
-
};
|
|
1782
|
+
}
|
|
1783
|
+
class QuantitativeTicks extends Ticks {
|
|
1784
|
+
constructor(options) {
|
|
1785
|
+
super(options);
|
|
1776
1786
|
}
|
|
1777
|
-
|
|
1778
|
-
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
const DEFAULT$z = {
|
|
1790
|
+
_class: () => '',
|
|
1791
|
+
_labelsDisplay: true,
|
|
1792
|
+
_marksDisplay: true,
|
|
1793
|
+
_remove: false,
|
|
1794
|
+
_stroke: 'none',
|
|
1795
|
+
_strokeOpacity: 1,
|
|
1796
|
+
_strokeWidth: 3,
|
|
1797
|
+
};
|
|
1798
|
+
const QUANT_DEFAULT = {
|
|
1799
|
+
_spacing: 40,
|
|
1800
|
+
};
|
|
1801
|
+
class TicksBuilder {
|
|
1802
|
+
constructor(options) {
|
|
1803
|
+
safeAssign(this, DEFAULT$z);
|
|
1804
|
+
safeAssign(this, options);
|
|
1779
1805
|
}
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
this.setTicks(this.config.ticks.format);
|
|
1806
|
+
class(value) {
|
|
1807
|
+
if (value === null) {
|
|
1808
|
+
this._class = DEFAULT$z._class;
|
|
1809
|
+
return this;
|
|
1785
1810
|
}
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
this.axis.tickSize(this.config.ticks.size);
|
|
1811
|
+
if (typeof value === 'string') {
|
|
1812
|
+
this._class = () => value;
|
|
1813
|
+
return this;
|
|
1790
1814
|
}
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1815
|
+
this._class = value;
|
|
1816
|
+
return this;
|
|
1817
|
+
}
|
|
1818
|
+
/**
|
|
1819
|
+
* OPTIONAL. Sets the font size of the tick labels.
|
|
1820
|
+
*
|
|
1821
|
+
* @param value - The font size of the tick labels, in px.
|
|
1822
|
+
*
|
|
1823
|
+
* If not called, the default font size is D3's default, which is 10px.
|
|
1824
|
+
*/
|
|
1825
|
+
fontSize(value) {
|
|
1826
|
+
if (value === null) {
|
|
1827
|
+
this._fontSize = undefined;
|
|
1828
|
+
return this;
|
|
1798
1829
|
}
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1830
|
+
this._fontSize = value;
|
|
1831
|
+
return this;
|
|
1832
|
+
}
|
|
1833
|
+
format(format) {
|
|
1834
|
+
if (format === null) {
|
|
1835
|
+
this._format = undefined;
|
|
1836
|
+
return this;
|
|
1802
1837
|
}
|
|
1838
|
+
this._format = format;
|
|
1839
|
+
return this;
|
|
1803
1840
|
}
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1841
|
+
/**
|
|
1842
|
+
* OPTIONAL. If false, tick labels will be removed.
|
|
1843
|
+
*
|
|
1844
|
+
* @param value - `true` to retain all tick labels, `false` to remove all tick labels.
|
|
1845
|
+
*
|
|
1846
|
+
* If not called, the default value is `true`.
|
|
1847
|
+
*/
|
|
1848
|
+
labelsDisplay(value) {
|
|
1849
|
+
this._labelsDisplay = value;
|
|
1850
|
+
return this;
|
|
1811
1851
|
}
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1852
|
+
/**
|
|
1853
|
+
* OPTIONAL. Sets the color of the stroke around the tick labels. Often used to improve the legibility of tick labels, for example, on dark backgrounds.
|
|
1854
|
+
*
|
|
1855
|
+
* @param value - The stroke of the tick labels.
|
|
1856
|
+
*
|
|
1857
|
+
* If not called, the default value is 'none'.
|
|
1858
|
+
*/
|
|
1859
|
+
labelsStroke(value) {
|
|
1860
|
+
if (value === null) {
|
|
1861
|
+
this._labelsStroke = DEFAULT$z._stroke;
|
|
1862
|
+
return this;
|
|
1817
1863
|
}
|
|
1818
|
-
|
|
1819
|
-
this
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
this.createLabel();
|
|
1864
|
+
this._labelsStroke = value;
|
|
1865
|
+
return this;
|
|
1866
|
+
}
|
|
1867
|
+
/**
|
|
1868
|
+
* OPTIONAL. Sets the opacity of the stroke applied around the tick labels.
|
|
1869
|
+
*
|
|
1870
|
+
* @param value - The opacity of the stroke around the tick labels.
|
|
1871
|
+
*
|
|
1872
|
+
* If not called, the default value is 1.
|
|
1873
|
+
*/
|
|
1874
|
+
labelsStrokeOpacity(value) {
|
|
1875
|
+
if (value === null) {
|
|
1876
|
+
this._labelsStrokeOpacity = undefined;
|
|
1877
|
+
return this;
|
|
1833
1878
|
}
|
|
1879
|
+
this._labelsStrokeOpacity = value;
|
|
1880
|
+
return this;
|
|
1834
1881
|
}
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
///remove any previous class
|
|
1847
|
-
select(nodes[i]).attr('class', 'tick');
|
|
1848
|
-
}
|
|
1849
|
-
});
|
|
1850
|
-
}
|
|
1851
|
-
if (this.config.ticks.fontSize) {
|
|
1852
|
-
this.setTickFontSize(tickText);
|
|
1853
|
-
}
|
|
1854
|
-
// TODO: Determine if this needs to be called from the on('end') of the axisGroup transition
|
|
1855
|
-
// or if if should be moved to processTickLabels. I think there is a reason it is here. (?)
|
|
1856
|
-
if (this.config.ticks.wrap && this.config.ticks.wrap.width !== undefined) {
|
|
1857
|
-
this.wrapAxisTickText(tickText);
|
|
1858
|
-
}
|
|
1859
|
-
if (this.config.ticks.marksDisplay === false) {
|
|
1860
|
-
const marks = select(this.elRef.nativeElement).selectAll('.tick line');
|
|
1861
|
-
marks.remove();
|
|
1882
|
+
/**
|
|
1883
|
+
* OPTIONAL. Sets the width of the stroke around the tick labels. Often used to improve the legibility of tick labels, for example, on dark backgrounds.
|
|
1884
|
+
*
|
|
1885
|
+
* @param value - The width of the stroke around the tick labels.
|
|
1886
|
+
*
|
|
1887
|
+
* If not called, the default value is 3.
|
|
1888
|
+
*/
|
|
1889
|
+
labelsStrokeWidth(value) {
|
|
1890
|
+
if (value === null) {
|
|
1891
|
+
this._labelsStrokeWidth = undefined;
|
|
1892
|
+
return this;
|
|
1862
1893
|
}
|
|
1894
|
+
this._labelsStrokeWidth = value;
|
|
1895
|
+
return this;
|
|
1863
1896
|
}
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1897
|
+
/**
|
|
1898
|
+
* OPTIONAL. If false, tick marks (lines) will be removed.
|
|
1899
|
+
*
|
|
1900
|
+
* @param value - `true` to retain all tick marks, `false` to remove all tick marks.
|
|
1901
|
+
*
|
|
1902
|
+
* If not called, the default value is `true`.
|
|
1903
|
+
*/
|
|
1904
|
+
marksDisplay(value) {
|
|
1905
|
+
this._marksDisplay = value;
|
|
1906
|
+
return this;
|
|
1867
1907
|
}
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
wrapWidth = this.config.ticks.wrap.width(chartWidth, numOfTicks);
|
|
1882
|
-
}
|
|
1883
|
-
else {
|
|
1884
|
-
wrapWidth = this.config.ticks.wrap.width;
|
|
1908
|
+
/**
|
|
1909
|
+
* OPTIONAL. Determines the rotation of tick labels.
|
|
1910
|
+
*
|
|
1911
|
+
* @param value - The rotation of the tick labels in degrees, or `null` to unset the rotation.
|
|
1912
|
+
*
|
|
1913
|
+
* Positive values rotate clockwise, negative values rotate counterclockwise.
|
|
1914
|
+
*
|
|
1915
|
+
* If not called, ticks will not be rotated.
|
|
1916
|
+
*/
|
|
1917
|
+
rotate(value) {
|
|
1918
|
+
if (value === null) {
|
|
1919
|
+
this._rotate = undefined;
|
|
1920
|
+
return this;
|
|
1885
1921
|
}
|
|
1886
|
-
|
|
1887
|
-
|
|
1922
|
+
this._rotate = value;
|
|
1923
|
+
return this;
|
|
1888
1924
|
}
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
if (
|
|
1900
|
-
this.
|
|
1901
|
-
|
|
1902
|
-
.attr('class', 'domain baseline')
|
|
1903
|
-
.attr('transform', null)
|
|
1904
|
-
.attr('stroke-dasharray', null));
|
|
1905
|
-
}
|
|
1906
|
-
if (!this.config.baseline.display && zeroAxisTranslate === null) {
|
|
1907
|
-
this.axisGroup.call((g) => g.select('.domain').remove());
|
|
1925
|
+
/**
|
|
1926
|
+
* OPTIONAL. Sets the size of inner and outer tick marks.
|
|
1927
|
+
*
|
|
1928
|
+
* @param value - The size of the ticks, in px.
|
|
1929
|
+
*
|
|
1930
|
+
* If not called or called with `null`, the default size is the D3 default size.
|
|
1931
|
+
*
|
|
1932
|
+
* If specified, this value will override any values set by `sizeInner` or `sizeOuter`.
|
|
1933
|
+
*/
|
|
1934
|
+
size(value) {
|
|
1935
|
+
if (value === null) {
|
|
1936
|
+
this._size = undefined;
|
|
1937
|
+
return this;
|
|
1908
1938
|
}
|
|
1939
|
+
this._size = value;
|
|
1940
|
+
return this;
|
|
1909
1941
|
}
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
this.config.ticks.labelsStrokeOpacity ||
|
|
1923
|
-
this.config.ticks.labelsStrokeWidth) {
|
|
1924
|
-
this.axisGroup.call((g) => g
|
|
1925
|
-
.selectAll('.tick text')
|
|
1926
|
-
.attr('stroke', this.config.ticks.labelsStroke)
|
|
1927
|
-
.attr('stroke-opacity', this.config.ticks.labelsStrokeOpacity)
|
|
1928
|
-
.attr('stroke-width', this.config.ticks.labelsStrokeWidth));
|
|
1942
|
+
/**
|
|
1943
|
+
* OPTIONAL. Determines the length of the inner ticks drawn by D3. Does not apply to the outermost ticks.
|
|
1944
|
+
*
|
|
1945
|
+
* @param value - The length of the inner ticks in pixels, or `null` to unset the value.
|
|
1946
|
+
*
|
|
1947
|
+
* If not called or called with `null`, the default value is the D3 default size.
|
|
1948
|
+
*
|
|
1949
|
+
*/
|
|
1950
|
+
sizeInner(value) {
|
|
1951
|
+
if (value === null) {
|
|
1952
|
+
this._sizeInner = undefined;
|
|
1953
|
+
return this;
|
|
1929
1954
|
}
|
|
1955
|
+
this._sizeInner = value;
|
|
1956
|
+
return this;
|
|
1930
1957
|
}
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1958
|
+
/**
|
|
1959
|
+
* OPTIONAL. Determines the length of the square ends of the domain path drawn by D3.
|
|
1960
|
+
*
|
|
1961
|
+
* @param value - The length of the square ends of the domain path in pixels, or `null` to unset the value.
|
|
1962
|
+
*
|
|
1963
|
+
* If not called on ordinal axes, the default value is 0. If not called on quantitative axes, no modification is made to D3's default value.
|
|
1964
|
+
*/
|
|
1965
|
+
sizeOuter(value) {
|
|
1966
|
+
if (value === null) {
|
|
1967
|
+
this._sizeOuter = undefined;
|
|
1968
|
+
return this;
|
|
1936
1969
|
}
|
|
1937
|
-
|
|
1970
|
+
this._sizeOuter = value;
|
|
1971
|
+
return this;
|
|
1938
1972
|
}
|
|
1939
|
-
|
|
1940
|
-
if (
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
.append('g')
|
|
1944
|
-
.attr('class', this.class.gridGroup);
|
|
1945
|
-
}
|
|
1946
|
-
this.gridGroup
|
|
1947
|
-
.transition(this.getTransition(this.gridGroup))
|
|
1948
|
-
.call(this.axis.tickSizeInner(this.getGridLineLength()))
|
|
1949
|
-
.selectAll('.tick')
|
|
1950
|
-
.attr('class', `tick ${this.class.gridLine}`)
|
|
1951
|
-
.style('display', (_, i) => this.config.grid.filter(i) ? null : 'none')
|
|
1952
|
-
.select('line')
|
|
1953
|
-
.attr('stroke', this.config.grid.stroke.color)
|
|
1954
|
-
.attr('stroke-dasharray', this.config.grid.stroke.dasharray)
|
|
1955
|
-
.attr('stroke-width', this.config.grid.stroke.width)
|
|
1956
|
-
.attr('opacity', this.config.grid.stroke.opacity)
|
|
1957
|
-
.attr('stroke-linecap', this.config.grid.stroke.linecap)
|
|
1958
|
-
.attr('stroke-linejoin', this.config.grid.stroke.linejoin);
|
|
1959
|
-
this.gridGroup.call((g) => {
|
|
1960
|
-
g.selectAll('text').remove();
|
|
1961
|
-
g.selectAll('.domain').remove();
|
|
1962
|
-
});
|
|
1963
|
-
}
|
|
1964
|
-
else {
|
|
1965
|
-
select(this.elRef.nativeElement)
|
|
1966
|
-
.select(`.${this.class.gridGroup}`)
|
|
1967
|
-
.remove();
|
|
1968
|
-
this.gridGroup = undefined;
|
|
1973
|
+
wrap(wrap) {
|
|
1974
|
+
if (wrap === null) {
|
|
1975
|
+
this.wrapBuilder = undefined;
|
|
1976
|
+
return this;
|
|
1969
1977
|
}
|
|
1978
|
+
this.wrapBuilder = new TickWrapBuilder();
|
|
1979
|
+
wrap(this.wrapBuilder);
|
|
1980
|
+
return this;
|
|
1970
1981
|
}
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
: this.
|
|
1980
|
-
|
|
1982
|
+
_build(dimension) {
|
|
1983
|
+
return new Ticks({
|
|
1984
|
+
class: this._class,
|
|
1985
|
+
fontSize: this._fontSize,
|
|
1986
|
+
format: this._format,
|
|
1987
|
+
labelsDisplay: this._labelsDisplay,
|
|
1988
|
+
labelsStroke: this._labelsStroke,
|
|
1989
|
+
labelsStrokeOpacity: this._labelsStrokeOpacity,
|
|
1990
|
+
labelsStrokeWidth: this._labelsStrokeWidth,
|
|
1991
|
+
marksDisplay: this._marksDisplay,
|
|
1992
|
+
rotate: this._rotate,
|
|
1993
|
+
size: this._size,
|
|
1994
|
+
sizeInner: this._sizeInner,
|
|
1995
|
+
sizeOuter: this._sizeOuter,
|
|
1996
|
+
wrap: this.wrapBuilder?._build(dimension),
|
|
1997
|
+
});
|
|
1981
1998
|
}
|
|
1982
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: XyAxis, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1983
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: XyAxis, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
1984
1999
|
}
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
2000
|
+
class QuantitativeTicksBuilder extends TicksBuilder {
|
|
2001
|
+
constructor(options) {
|
|
2002
|
+
super(options);
|
|
2003
|
+
safeAssign(this, DEFAULT$z);
|
|
2004
|
+
safeAssign(this, QUANT_DEFAULT);
|
|
2005
|
+
}
|
|
2006
|
+
/**
|
|
2007
|
+
* OPTIONAL. Approximately specifies the number of ticks for the axis.
|
|
2008
|
+
*
|
|
2009
|
+
* @param value - The number of ticks to pass to D3's axis.ticks(), or null to unset the number of ticks.
|
|
2010
|
+
*
|
|
2011
|
+
* If not called, a reasonable and valid default will be used based on the size of the chart.
|
|
2012
|
+
*
|
|
2013
|
+
* Note that this number will be passed to D3's `ticks()` method and therefore it can be an approximate number of ticks.
|
|
2014
|
+
*
|
|
2015
|
+
* If this method is called, the passed in number of ticks will be validated against the data domain and the value formatter for the axis. If the number of ticks is not valid—for example, if the ticks are formatted with %Y and there are three years of values in the data, and this method is called with 10, a valid number will be used instead.
|
|
2016
|
+
*/
|
|
2017
|
+
count(value) {
|
|
2018
|
+
if (value === null) {
|
|
2019
|
+
this._count = undefined;
|
|
2020
|
+
return this;
|
|
2021
|
+
}
|
|
2022
|
+
this._count = value;
|
|
2023
|
+
return this;
|
|
2024
|
+
}
|
|
2025
|
+
/**
|
|
2026
|
+
* OPTIONAL. Specifies the an approximate spacing between ticks, in pixels.
|
|
2027
|
+
*
|
|
2028
|
+
* @param value - The spacing between ticks in pixels, or null to unset the spacing.
|
|
2029
|
+
*
|
|
2030
|
+
* If not called, the default value is 40. If `count` is set, this value will be ignored.
|
|
2031
|
+
*/
|
|
2032
|
+
spacing(value) {
|
|
2033
|
+
if (value === null) {
|
|
2034
|
+
this._spacing = undefined;
|
|
2035
|
+
return this;
|
|
1998
2036
|
}
|
|
1999
|
-
|
|
2000
|
-
|
|
2037
|
+
this._spacing = value;
|
|
2038
|
+
return this;
|
|
2039
|
+
}
|
|
2040
|
+
/**
|
|
2041
|
+
* OPTIONAL. Determines the values that will show up as ticks on the axis.
|
|
2042
|
+
*
|
|
2043
|
+
* @param values - An array of quantitative values to pass to D3's axis.tickValues(), or null to unset the tick values.
|
|
2044
|
+
*
|
|
2045
|
+
*/
|
|
2046
|
+
values(values) {
|
|
2047
|
+
if (values === null) {
|
|
2048
|
+
this._values = undefined;
|
|
2049
|
+
return this;
|
|
2050
|
+
}
|
|
2051
|
+
this._values = values;
|
|
2052
|
+
return this;
|
|
2053
|
+
}
|
|
2054
|
+
_build(dimension) {
|
|
2055
|
+
return new QuantitativeTicks({
|
|
2056
|
+
class: this._class,
|
|
2057
|
+
count: this._count,
|
|
2058
|
+
fontSize: this._fontSize,
|
|
2059
|
+
format: this._format,
|
|
2060
|
+
labelsDisplay: this._labelsDisplay,
|
|
2061
|
+
labelsStroke: this._labelsStroke,
|
|
2062
|
+
labelsStrokeOpacity: this._labelsStrokeOpacity,
|
|
2063
|
+
labelsStrokeWidth: this._labelsStrokeWidth,
|
|
2064
|
+
marksDisplay: this._marksDisplay,
|
|
2065
|
+
rotate: this._rotate,
|
|
2066
|
+
size: this._size,
|
|
2067
|
+
sizeInner: this._sizeInner,
|
|
2068
|
+
sizeOuter: this._sizeOuter,
|
|
2069
|
+
spacing: this._spacing,
|
|
2070
|
+
values: this._values,
|
|
2071
|
+
wrap: this.wrapBuilder?._build(dimension),
|
|
2072
|
+
});
|
|
2001
2073
|
}
|
|
2002
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: Mixin, decorators: [{
|
|
2003
|
-
type: Directive
|
|
2004
|
-
}], propDecorators: { config: [{
|
|
2005
|
-
type: Input
|
|
2006
|
-
}] } });
|
|
2007
|
-
return Mixin;
|
|
2008
2074
|
}
|
|
2009
2075
|
|
|
2010
2076
|
function xAxisMixin(Base) {
|
|
@@ -2085,33 +2151,11 @@ function xAxisMixin(Base) {
|
|
|
2085
2151
|
label.attr('x', x);
|
|
2086
2152
|
}
|
|
2087
2153
|
}
|
|
2088
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: Mixin, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2089
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: Mixin, isStandalone: true, inputs: { config: "config" }, usesInheritance: true, ngImport: i0 }); }
|
|
2090
2154
|
}
|
|
2091
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: Mixin, decorators: [{
|
|
2092
|
-
type: Directive
|
|
2093
|
-
}], propDecorators: { config: [{
|
|
2094
|
-
type: Input
|
|
2095
|
-
}] } });
|
|
2096
2155
|
return Mixin;
|
|
2097
2156
|
}
|
|
2098
2157
|
|
|
2099
|
-
|
|
2100
|
-
class XOrdinalAxisComponent extends XOrdinalAxis {
|
|
2101
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: XOrdinalAxisComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2102
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: XOrdinalAxisComponent, isStandalone: true, selector: "[vic-x-ordinal-axis]", inputs: { config: "config" }, host: { properties: { "class": "config.marksClass", "attr.mix-blend-mode": "config.mixBlendMode", "attr.transform": "translate" }, classAttribute: "vic-axis" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [".vic-axis-x-ordinal .vic-axis-label{fill:currentColor}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2103
|
-
}
|
|
2104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: XOrdinalAxisComponent, decorators: [{
|
|
2105
|
-
type: Component,
|
|
2106
|
-
args: [{ selector: '[vic-x-ordinal-axis]', template: '', inputs: ['config'], encapsulation: ViewEncapsulation.None, host: {
|
|
2107
|
-
'[class]': 'config.marksClass',
|
|
2108
|
-
class: 'vic-axis',
|
|
2109
|
-
'[attr.mix-blend-mode]': 'config.mixBlendMode',
|
|
2110
|
-
'[attr.transform]': 'translate',
|
|
2111
|
-
}, styles: [".vic-axis-x-ordinal .vic-axis-label{fill:currentColor}\n"] }]
|
|
2112
|
-
}] });
|
|
2113
|
-
|
|
2114
|
-
function mixinQuantitativeAxisConfig(Base) {
|
|
2158
|
+
function mixinXAxisConfig(Base) {
|
|
2115
2159
|
class Mixin extends Base {
|
|
2116
2160
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2117
2161
|
constructor(...args) {
|
|
@@ -2120,235 +2164,160 @@ function mixinQuantitativeAxisConfig(Base) {
|
|
|
2120
2164
|
safeAssign(this, args[0]);
|
|
2121
2165
|
}
|
|
2122
2166
|
}
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: Mixin, decorators: [{
|
|
2127
|
-
type: Directive
|
|
2128
|
-
}], ctorParameters: () => [{ type: undefined }] });
|
|
2129
|
-
return Mixin;
|
|
2130
|
-
}
|
|
2131
|
-
class VicQuantitativeAxisConfig extends mixinQuantitativeAxisConfig(XyAxisConfig) {
|
|
2132
|
-
}
|
|
2133
|
-
|
|
2134
|
-
const AbstractXQuantitativeAxis = mixinXAxisConfig(mixinQuantitativeAxisConfig(XyAxisConfig));
|
|
2135
|
-
class VicXQuantitativeAxisConfig extends AbstractXQuantitativeAxis {
|
|
2136
|
-
constructor(options) {
|
|
2137
|
-
super(options);
|
|
2138
|
-
}
|
|
2139
|
-
}
|
|
2140
|
-
|
|
2141
|
-
const DEFAULT$x = {
|
|
2142
|
-
_side: 'bottom',
|
|
2143
|
-
_removeDomainLine: false,
|
|
2144
|
-
_zeroAxis: { strokeDasharray: '2', useZeroAxis: true },
|
|
2145
|
-
};
|
|
2146
|
-
const TICK_DEFAULT = {
|
|
2147
|
-
_format: ',.1f',
|
|
2148
|
-
};
|
|
2149
|
-
class VicXQuantitativeAxisConfigBuilder extends XyAxisBaseBuilder {
|
|
2150
|
-
constructor() {
|
|
2151
|
-
super();
|
|
2152
|
-
safeAssign(this, DEFAULT$x);
|
|
2153
|
-
this.ticksBuilder = this.getTicksBuilder();
|
|
2154
|
-
}
|
|
2155
|
-
/**
|
|
2156
|
-
* OPTIONAL. Specifies the location of the axis on the chart.
|
|
2157
|
-
*
|
|
2158
|
-
* @param value - The side of the chart where the axis will be placed.
|
|
2159
|
-
*
|
|
2160
|
-
* If not called, the default value is `bottom`.
|
|
2161
|
-
*/
|
|
2162
|
-
side(value) {
|
|
2163
|
-
this._side = value;
|
|
2164
|
-
return this;
|
|
2165
|
-
}
|
|
2166
|
-
ticks(ticks) {
|
|
2167
|
-
this.ticksBuilder = this.getTicksBuilder();
|
|
2168
|
-
if (ticks === null) {
|
|
2169
|
-
return this;
|
|
2167
|
+
getNumTicksBySpacing(spacing, dimensions) {
|
|
2168
|
+
const d3SuggestedDefault = dimensions.width / spacing;
|
|
2169
|
+
return this.getValidatedNumTicks(d3SuggestedDefault);
|
|
2170
2170
|
}
|
|
2171
|
-
ticks?.(this.ticksBuilder);
|
|
2172
|
-
return this;
|
|
2173
|
-
}
|
|
2174
|
-
getTicksBuilder() {
|
|
2175
|
-
return new QuantitativeTicksBuilder(TICK_DEFAULT);
|
|
2176
|
-
}
|
|
2177
|
-
getConfig() {
|
|
2178
|
-
return new VicXQuantitativeAxisConfig({
|
|
2179
|
-
baseline: this.baselineBuilder._build('quantitative'),
|
|
2180
|
-
grid: this.gridBuilder?._build('x', 'quantitative'),
|
|
2181
|
-
label: this.labelBuilder?._build('x'),
|
|
2182
|
-
marksClass: 'vic-axis-x-quantitative',
|
|
2183
|
-
mixBlendMode: this._mixBlendMode,
|
|
2184
|
-
side: this._side,
|
|
2185
|
-
ticks: this.ticksBuilder._build('x'),
|
|
2186
|
-
});
|
|
2187
2171
|
}
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
return typeof tickFormat === 'function'
|
|
2231
|
-
? tickFormat(d)
|
|
2232
|
-
: formatter(tickFormat)(d);
|
|
2233
|
-
});
|
|
2234
|
-
}
|
|
2235
|
-
getSuggestedNumTicks(tickFormat) {
|
|
2236
|
-
let numSuggestedTicks = this.getNumTicks();
|
|
2237
|
-
if (typeof tickFormat === 'string' &&
|
|
2238
|
-
typeof numSuggestedTicks === 'number') {
|
|
2239
|
-
numSuggestedTicks = Math.round(numSuggestedTicks);
|
|
2240
|
-
if (this.scale.domain()[0] instanceof Date) {
|
|
2241
|
-
const maxTicks = this.getMaxTicksForDateFormat(tickFormat);
|
|
2242
|
-
if (maxTicks !== null) {
|
|
2243
|
-
return Math.min(numSuggestedTicks, maxTicks);
|
|
2244
|
-
}
|
|
2245
|
-
}
|
|
2246
|
-
if (tickFormat.includes('.')) {
|
|
2247
|
-
return this.getValidNumTicksForNumberFormatString(numSuggestedTicks, tickFormat);
|
|
2248
|
-
}
|
|
2249
|
-
return numSuggestedTicks;
|
|
2250
|
-
}
|
|
2251
|
-
else {
|
|
2252
|
-
return numSuggestedTicks;
|
|
2253
|
-
}
|
|
2254
|
-
}
|
|
2255
|
-
getNumTicks() {
|
|
2256
|
-
return (this.config.ticks.count ||
|
|
2257
|
-
this.config.getNumTicksBySpacing(this.config.ticks.spacing, {
|
|
2258
|
-
height: this.chart.config.height,
|
|
2259
|
-
width: this.chart.config.width,
|
|
2260
|
-
}));
|
|
2261
|
-
}
|
|
2262
|
-
getValidNumTicksForNumberFormatString(numTicks, tickFormat) {
|
|
2263
|
-
let numDecimalPlaces = Number(tickFormat.split('.')[1][0]);
|
|
2264
|
-
if (tickFormat.includes('%')) {
|
|
2265
|
-
numDecimalPlaces = numDecimalPlaces + 2;
|
|
2266
|
-
}
|
|
2267
|
-
const [start, end] = this.scale.domain();
|
|
2268
|
-
const range = end - start;
|
|
2269
|
-
const minStep = Math.pow(10, -1 * numDecimalPlaces);
|
|
2270
|
-
const rawCount = range / minStep;
|
|
2271
|
-
const numValidTicks = Math.round(rawCount);
|
|
2272
|
-
if (numTicks < numValidTicks) {
|
|
2273
|
-
return numTicks;
|
|
2274
|
-
}
|
|
2275
|
-
else {
|
|
2276
|
-
return numValidTicks;
|
|
2277
|
-
}
|
|
2278
|
-
}
|
|
2279
|
-
getMaxTicksForDateFormat(tickFormat) {
|
|
2280
|
-
const [startDate, endDate] = this.scale.domain();
|
|
2281
|
-
// Year-only formatters: %Y, %y
|
|
2282
|
-
if (tickFormat === '%Y' || tickFormat === '%y') {
|
|
2283
|
-
const startYear = startDate.getUTCFullYear();
|
|
2284
|
-
const endYear = endDate.getUTCFullYear();
|
|
2285
|
-
return endYear - startYear + 1;
|
|
2286
|
-
}
|
|
2287
|
-
// Quarter formatter: %Y Q%q
|
|
2288
|
-
if (tickFormat === '%Y Q%q') {
|
|
2289
|
-
const startYear = startDate.getUTCFullYear();
|
|
2290
|
-
const startQuarter = Math.floor(startDate.getUTCMonth() / 3);
|
|
2291
|
-
const endYear = endDate.getUTCFullYear();
|
|
2292
|
-
const endQuarter = Math.floor(endDate.getUTCMonth() / 3);
|
|
2293
|
-
return (endYear - startYear) * 4 + (endQuarter - startQuarter) + 1;
|
|
2294
|
-
}
|
|
2295
|
-
// Month-year formatters: %B %Y, %b %Y
|
|
2296
|
-
if (tickFormat === '%B %Y' || tickFormat === '%b %Y') {
|
|
2297
|
-
const startYear = startDate.getUTCFullYear();
|
|
2298
|
-
const startMonth = startDate.getUTCMonth();
|
|
2299
|
-
const endYear = endDate.getUTCFullYear();
|
|
2300
|
-
const endMonth = endDate.getUTCMonth();
|
|
2301
|
-
return (endYear - startYear) * 12 + (endMonth - startMonth) + 1;
|
|
2302
|
-
}
|
|
2303
|
-
// Full date formatters: %B %d, %Y
|
|
2304
|
-
if (tickFormat === '%B %d, %Y' ||
|
|
2305
|
-
tickFormat === '%m/%d/%Y' ||
|
|
2306
|
-
tickFormat === '%Y-%m-%d') {
|
|
2307
|
-
const timeDiff = endDate.getTime() - startDate.getTime();
|
|
2308
|
-
const daysDiff = Math.ceil(timeDiff / (1000 * 60 * 60 * 24));
|
|
2309
|
-
return daysDiff + 1;
|
|
2310
|
-
}
|
|
2311
|
-
// Additional common time formatters for completeness
|
|
2312
|
-
// Month formatters: %B (full month), %b (abbreviated), %m (numeric)
|
|
2313
|
-
if (tickFormat === '%B' || tickFormat === '%b' || tickFormat === '%m') {
|
|
2314
|
-
const startYear = startDate.getUTCFullYear();
|
|
2315
|
-
const startMonth = startDate.getUTCMonth();
|
|
2316
|
-
const endYear = endDate.getUTCFullYear();
|
|
2317
|
-
const endMonth = endDate.getUTCMonth();
|
|
2318
|
-
return (endYear - startYear) * 12 + (endMonth - startMonth) + 1;
|
|
2319
|
-
}
|
|
2320
|
-
// Day formatters: %d (day of month), %e (day of month with space), %j (day of year)
|
|
2321
|
-
if (tickFormat === '%d' || tickFormat === '%e' || tickFormat === '%j') {
|
|
2322
|
-
const timeDiff = endDate.getTime() - startDate.getTime();
|
|
2323
|
-
const daysDiff = Math.ceil(timeDiff / (1000 * 60 * 60 * 24));
|
|
2324
|
-
return daysDiff + 1;
|
|
2325
|
-
}
|
|
2326
|
-
// Week formatters: %U, %W (week of year)
|
|
2327
|
-
if (tickFormat === '%U' || tickFormat === '%W') {
|
|
2328
|
-
const timeDiff = endDate.getTime() - startDate.getTime();
|
|
2329
|
-
const weeksDiff = Math.ceil(timeDiff / (1000 * 60 * 60 * 24 * 7));
|
|
2330
|
-
return weeksDiff + 1;
|
|
2331
|
-
}
|
|
2332
|
-
// For composite formats or unrecognized formats, return null to use default logic
|
|
2333
|
-
return null;
|
|
2172
|
+
return Mixin;
|
|
2173
|
+
}
|
|
2174
|
+
class XAxisConfig extends mixinXAxisConfig(XyAxisConfig) {
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
const AbstractXOrdinalAxis = mixinXAxisConfig(mixinOrdinalAxisConfig(XyAxisConfig));
|
|
2178
|
+
class VicXOrdinalAxisConfig extends AbstractXOrdinalAxis {
|
|
2179
|
+
constructor(options) {
|
|
2180
|
+
super(options);
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
|
|
2184
|
+
const DEFAULT$y = {
|
|
2185
|
+
_side: 'bottom',
|
|
2186
|
+
_baseline: {
|
|
2187
|
+
display: false,
|
|
2188
|
+
},
|
|
2189
|
+
};
|
|
2190
|
+
const TICK_DEFAULT$1 = {
|
|
2191
|
+
_sizeOuter: 0,
|
|
2192
|
+
};
|
|
2193
|
+
class VicXOrdinalAxisConfigBuilder extends XyAxisBaseBuilder {
|
|
2194
|
+
constructor() {
|
|
2195
|
+
super();
|
|
2196
|
+
safeAssign(this, DEFAULT$y);
|
|
2197
|
+
this.ticksBuilder = this.getTicksBuilder();
|
|
2198
|
+
}
|
|
2199
|
+
/**
|
|
2200
|
+
* OPTIONAL. Specifies the location of the axis on the chart.
|
|
2201
|
+
*
|
|
2202
|
+
* @param value - The side of the chart where the axis will be placed.
|
|
2203
|
+
*
|
|
2204
|
+
* If not called, the default value is `bottom`.
|
|
2205
|
+
*/
|
|
2206
|
+
side(value) {
|
|
2207
|
+
this._side = value;
|
|
2208
|
+
return this;
|
|
2209
|
+
}
|
|
2210
|
+
ticks(ticks) {
|
|
2211
|
+
this.ticksBuilder = this.getTicksBuilder();
|
|
2212
|
+
if (ticks === null) {
|
|
2213
|
+
return this;
|
|
2334
2214
|
}
|
|
2335
|
-
|
|
2336
|
-
|
|
2215
|
+
ticks?.(this.ticksBuilder);
|
|
2216
|
+
return this;
|
|
2337
2217
|
}
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2218
|
+
getTicksBuilder() {
|
|
2219
|
+
return new TicksBuilder(TICK_DEFAULT$1);
|
|
2220
|
+
}
|
|
2221
|
+
getConfig() {
|
|
2222
|
+
return new VicXOrdinalAxisConfig({
|
|
2223
|
+
baseline: this.baselineBuilder?._build('ordinal'),
|
|
2224
|
+
grid: this.gridBuilder?._build('x', 'ordinal'),
|
|
2225
|
+
label: this.labelBuilder?._build('x'),
|
|
2226
|
+
marksClass: 'vic-axis-x-ordinal',
|
|
2227
|
+
mixBlendMode: this._mixBlendMode,
|
|
2228
|
+
side: this._side,
|
|
2229
|
+
ticks: this.ticksBuilder._build('x'),
|
|
2230
|
+
});
|
|
2231
|
+
}
|
|
2232
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicXOrdinalAxisConfigBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2233
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicXOrdinalAxisConfigBuilder }); }
|
|
2234
|
+
}
|
|
2235
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicXOrdinalAxisConfigBuilder, decorators: [{
|
|
2236
|
+
type: Injectable
|
|
2237
|
+
}], ctorParameters: () => [] });
|
|
2238
|
+
|
|
2239
|
+
const XOrdinalAxis = xAxisMixin(ordinalAxisMixin((XyAxis)));
|
|
2240
|
+
class XOrdinalAxisComponent extends XOrdinalAxis {
|
|
2241
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: XOrdinalAxisComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2242
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: XOrdinalAxisComponent, isStandalone: true, selector: "[vic-x-ordinal-axis]", inputs: { config: "config" }, host: { properties: { "class": "config.marksClass", "attr.mix-blend-mode": "config.mixBlendMode", "attr.transform": "translate" }, classAttribute: "vic-axis" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [".vic-axis-x-ordinal .vic-axis-label{fill:currentColor}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2243
|
+
}
|
|
2244
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: XOrdinalAxisComponent, decorators: [{
|
|
2245
|
+
type: Component,
|
|
2246
|
+
args: [{ selector: '[vic-x-ordinal-axis]', template: '', inputs: ['config'], encapsulation: ViewEncapsulation.None, host: {
|
|
2247
|
+
'[class]': 'config.marksClass',
|
|
2248
|
+
class: 'vic-axis',
|
|
2249
|
+
'[attr.mix-blend-mode]': 'config.mixBlendMode',
|
|
2250
|
+
'[attr.transform]': 'translate',
|
|
2251
|
+
}, styles: [".vic-axis-x-ordinal .vic-axis-label{fill:currentColor}\n"] }]
|
|
2252
|
+
}] });
|
|
2253
|
+
|
|
2254
|
+
const AbstractXQuantitativeAxis = mixinXAxisConfig(mixinQuantitativeAxisConfig(XyAxisConfig));
|
|
2255
|
+
class VicXQuantitativeAxisConfig extends AbstractXQuantitativeAxis {
|
|
2256
|
+
constructor(options) {
|
|
2257
|
+
super(options);
|
|
2258
|
+
}
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
const DEFAULT$x = {
|
|
2262
|
+
_side: 'bottom',
|
|
2263
|
+
_removeDomainLine: false,
|
|
2264
|
+
_zeroAxis: { strokeDasharray: '2', useZeroAxis: true },
|
|
2265
|
+
};
|
|
2266
|
+
const TICK_DEFAULT = {
|
|
2267
|
+
_format: ',.1f',
|
|
2268
|
+
};
|
|
2269
|
+
class VicXQuantitativeAxisConfigBuilder extends XyAxisBaseBuilder {
|
|
2270
|
+
constructor() {
|
|
2271
|
+
super();
|
|
2272
|
+
safeAssign(this, DEFAULT$x);
|
|
2273
|
+
this.ticksBuilder = this.getTicksBuilder();
|
|
2274
|
+
}
|
|
2275
|
+
/**
|
|
2276
|
+
* OPTIONAL. Specifies the location of the axis on the chart.
|
|
2277
|
+
*
|
|
2278
|
+
* @param value - The side of the chart where the axis will be placed.
|
|
2279
|
+
*
|
|
2280
|
+
* If not called, the default value is `bottom`.
|
|
2281
|
+
*/
|
|
2282
|
+
side(value) {
|
|
2283
|
+
this._side = value;
|
|
2284
|
+
return this;
|
|
2285
|
+
}
|
|
2286
|
+
ticks(ticks) {
|
|
2287
|
+
this.ticksBuilder = this.getTicksBuilder();
|
|
2288
|
+
if (ticks === null) {
|
|
2289
|
+
return this;
|
|
2290
|
+
}
|
|
2291
|
+
ticks?.(this.ticksBuilder);
|
|
2292
|
+
return this;
|
|
2293
|
+
}
|
|
2294
|
+
getTicksBuilder() {
|
|
2295
|
+
return new QuantitativeTicksBuilder(TICK_DEFAULT);
|
|
2296
|
+
}
|
|
2297
|
+
getConfig() {
|
|
2298
|
+
return new VicXQuantitativeAxisConfig({
|
|
2299
|
+
baseline: this.baselineBuilder._build('quantitative'),
|
|
2300
|
+
grid: this.gridBuilder?._build('x', 'quantitative'),
|
|
2301
|
+
label: this.labelBuilder?._build('x'),
|
|
2302
|
+
marksClass: 'vic-axis-x-quantitative',
|
|
2303
|
+
mixBlendMode: this._mixBlendMode,
|
|
2304
|
+
side: this._side,
|
|
2305
|
+
ticks: this.ticksBuilder._build('x'),
|
|
2306
|
+
});
|
|
2307
|
+
}
|
|
2308
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicXQuantitativeAxisConfigBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2309
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicXQuantitativeAxisConfigBuilder }); }
|
|
2344
2310
|
}
|
|
2311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicXQuantitativeAxisConfigBuilder, decorators: [{
|
|
2312
|
+
type: Injectable
|
|
2313
|
+
}], ctorParameters: () => [] });
|
|
2345
2314
|
|
|
2346
2315
|
const XQuantitativeAxis = xAxisMixin(quantitativeAxisMixin(XyAxis));
|
|
2347
2316
|
class XQuantitativeAxisComponent extends XQuantitativeAxis {
|
|
2348
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2349
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2317
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: XQuantitativeAxisComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2318
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: XQuantitativeAxisComponent, isStandalone: true, selector: "[vic-x-quantitative-axis]", inputs: { config: "config" }, host: { properties: { "class": "config.marksClass", "attr.mix-blend-mode": "config.mixBlendMode", "attr.transform": "translate" }, classAttribute: "vic-axis" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [".vic-axis-x-quantitative .vic-axis-label{fill:currentColor}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2350
2319
|
}
|
|
2351
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: XQuantitativeAxisComponent, decorators: [{
|
|
2352
2321
|
type: Component,
|
|
2353
2322
|
args: [{ selector: '[vic-x-quantitative-axis]', template: '', inputs: ['config'], encapsulation: ViewEncapsulation.None, host: {
|
|
2354
2323
|
'[class]': 'config.marksClass',
|
|
@@ -2486,23 +2455,16 @@ function yAxisMixin(Base) {
|
|
|
2486
2455
|
}
|
|
2487
2456
|
}
|
|
2488
2457
|
}
|
|
2489
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: Mixin, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2490
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: Mixin, isStandalone: true, inputs: { config: "config" }, usesInheritance: true, ngImport: i0 }); }
|
|
2491
2458
|
}
|
|
2492
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: Mixin, decorators: [{
|
|
2493
|
-
type: Directive
|
|
2494
|
-
}], propDecorators: { config: [{
|
|
2495
|
-
type: Input
|
|
2496
|
-
}] } });
|
|
2497
2459
|
return Mixin;
|
|
2498
2460
|
}
|
|
2499
2461
|
|
|
2500
2462
|
const YOrdinalAxis = yAxisMixin(ordinalAxisMixin((XyAxis)));
|
|
2501
2463
|
class YOrdinalAxisComponent extends YOrdinalAxis {
|
|
2502
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2503
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2464
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: YOrdinalAxisComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2465
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: YOrdinalAxisComponent, isStandalone: true, selector: "[vic-y-ordinal-axis]", inputs: { config: "config" }, host: { properties: { "class": "config.marksClass", "attr.mix-blend-mode": "config.mixBlendMode", "attr.transform": "translate" }, classAttribute: "vic-axis" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [".vic-axis-y-ordinal .vic-axis-label{fill:currentColor}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2504
2466
|
}
|
|
2505
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2467
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: YOrdinalAxisComponent, decorators: [{
|
|
2506
2468
|
type: Component,
|
|
2507
2469
|
args: [{ selector: '[vic-y-ordinal-axis]', template: '', inputs: ['config'], encapsulation: ViewEncapsulation.None, host: {
|
|
2508
2470
|
'[class]': 'config.marksClass',
|
|
@@ -2514,10 +2476,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
2514
2476
|
|
|
2515
2477
|
const YQuantitativeAxis = yAxisMixin(quantitativeAxisMixin(XyAxis));
|
|
2516
2478
|
class YQuantitativeAxisComponent extends YQuantitativeAxis {
|
|
2517
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2518
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2479
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: YQuantitativeAxisComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2480
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: YQuantitativeAxisComponent, isStandalone: true, selector: "[vic-y-quantitative-axis]", inputs: { config: "config" }, host: { properties: { "class": "config.marksClass", "attr.mix-blend-mode": "config.mixBlendMode", "attr.transform": "translate" }, classAttribute: "vic-axis" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [".vic-axis-y-quantitative .vic-axis-label{fill:currentColor}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2519
2481
|
}
|
|
2520
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2482
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: YQuantitativeAxisComponent, decorators: [{
|
|
2521
2483
|
type: Component,
|
|
2522
2484
|
args: [{ selector: '[vic-y-quantitative-axis]', template: '', inputs: ['config'], encapsulation: ViewEncapsulation.None, host: {
|
|
2523
2485
|
'[class]': 'config.marksClass',
|
|
@@ -2528,17 +2490,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
2528
2490
|
}] });
|
|
2529
2491
|
|
|
2530
2492
|
class VicXyAxisModule {
|
|
2531
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2532
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2493
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicXyAxisModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2494
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: VicXyAxisModule, imports: [YQuantitativeAxisComponent,
|
|
2533
2495
|
YOrdinalAxisComponent,
|
|
2534
2496
|
XQuantitativeAxisComponent,
|
|
2535
2497
|
XOrdinalAxisComponent], exports: [YQuantitativeAxisComponent,
|
|
2536
2498
|
YOrdinalAxisComponent,
|
|
2537
2499
|
XQuantitativeAxisComponent,
|
|
2538
2500
|
XOrdinalAxisComponent] }); }
|
|
2539
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2501
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicXyAxisModule }); }
|
|
2540
2502
|
}
|
|
2541
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2503
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicXyAxisModule, decorators: [{
|
|
2542
2504
|
type: NgModule,
|
|
2543
2505
|
args: [{
|
|
2544
2506
|
imports: [
|
|
@@ -2568,12 +2530,7 @@ function mixinYAxisConfig(Base) {
|
|
|
2568
2530
|
const d3SuggestedDefault = dimensions.height / spacing;
|
|
2569
2531
|
return this.getValidatedNumTicks(d3SuggestedDefault);
|
|
2570
2532
|
}
|
|
2571
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: Mixin, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2572
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: Mixin, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
2573
2533
|
}
|
|
2574
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: Mixin, decorators: [{
|
|
2575
|
-
type: Directive
|
|
2576
|
-
}], ctorParameters: () => [{ type: undefined }] });
|
|
2577
2534
|
return Mixin;
|
|
2578
2535
|
}
|
|
2579
2536
|
class YAxisConfig extends mixinYAxisConfig(XyAxisConfig) {
|
|
@@ -2636,10 +2593,10 @@ class VicYOrdinalAxisConfigBuilder extends XyAxisBaseBuilder {
|
|
|
2636
2593
|
ticks: this.ticksBuilder._build('y'),
|
|
2637
2594
|
});
|
|
2638
2595
|
}
|
|
2639
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2640
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2596
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicYOrdinalAxisConfigBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2597
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicYOrdinalAxisConfigBuilder }); }
|
|
2641
2598
|
}
|
|
2642
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2599
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicYOrdinalAxisConfigBuilder, decorators: [{
|
|
2643
2600
|
type: Injectable
|
|
2644
2601
|
}], ctorParameters: () => [] });
|
|
2645
2602
|
|
|
@@ -2698,10 +2655,10 @@ class VicYQuantitativeAxisConfigBuilder extends XyAxisBaseBuilder {
|
|
|
2698
2655
|
ticks: this.ticksBuilder._build('y'),
|
|
2699
2656
|
});
|
|
2700
2657
|
}
|
|
2701
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2702
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2658
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicYQuantitativeAxisConfigBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2659
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicYQuantitativeAxisConfigBuilder }); }
|
|
2703
2660
|
}
|
|
2704
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2661
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicYQuantitativeAxisConfigBuilder, decorators: [{
|
|
2705
2662
|
type: Injectable
|
|
2706
2663
|
}], ctorParameters: () => [] });
|
|
2707
2664
|
|
|
@@ -3374,14 +3331,14 @@ class BarsComponent extends VicXyPrimaryMarks {
|
|
|
3374
3331
|
this.config.quantitative.values[barDatum.index] ===
|
|
3375
3332
|
this.config.quantitative.valueAccessor(d));
|
|
3376
3333
|
}
|
|
3377
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3378
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3334
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: BarsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3335
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: BarsComponent, isStandalone: true, selector: "[vic-primary-marks-bars]", host: { properties: { "class": "config.marksClass", "style.mixBlendMode": "config.mixBlendMode" } }, providers: [
|
|
3379
3336
|
{ provide: VIC_PRIMARY_MARKS, useExisting: BarsComponent },
|
|
3380
3337
|
{ provide: BARS, useExisting: BarsComponent },
|
|
3381
3338
|
{ provide: ChartComponent, useExisting: XyChartComponent },
|
|
3382
3339
|
], usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3383
3340
|
}
|
|
3384
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: BarsComponent, decorators: [{
|
|
3385
3342
|
type: Component,
|
|
3386
3343
|
args: [{ selector: '[vic-primary-marks-bars]', template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
3387
3344
|
{ provide: VIC_PRIMARY_MARKS, useExisting: BarsComponent },
|
|
@@ -3487,10 +3444,10 @@ class EventsDirective {
|
|
|
3487
3444
|
asHost() {
|
|
3488
3445
|
return this;
|
|
3489
3446
|
}
|
|
3490
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3491
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
3447
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: EventsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3448
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: EventsDirective, isStandalone: true, inputs: { clickRemoveEvent$: "clickRemoveEvent$", inputEvent$: "inputEvent$" }, ngImport: i0 }); }
|
|
3492
3449
|
}
|
|
3493
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3450
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: EventsDirective, decorators: [{
|
|
3494
3451
|
type: Directive
|
|
3495
3452
|
}], propDecorators: { clickRemoveEvent$: [{
|
|
3496
3453
|
type: Input
|
|
@@ -3714,10 +3671,10 @@ class VicHtmlTooltipConfigBuilder {
|
|
|
3714
3671
|
}
|
|
3715
3672
|
return panelClasses;
|
|
3716
3673
|
}
|
|
3717
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3718
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3674
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicHtmlTooltipConfigBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3675
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicHtmlTooltipConfigBuilder }); }
|
|
3719
3676
|
}
|
|
3720
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3677
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicHtmlTooltipConfigBuilder, decorators: [{
|
|
3721
3678
|
type: Injectable
|
|
3722
3679
|
}], ctorParameters: () => [] });
|
|
3723
3680
|
|
|
@@ -3879,11 +3836,7 @@ class TooltipPositionBuilder {
|
|
|
3879
3836
|
}
|
|
3880
3837
|
|
|
3881
3838
|
class HtmlTooltipDirective {
|
|
3882
|
-
constructor(
|
|
3883
|
-
this.viewContainerRef = viewContainerRef;
|
|
3884
|
-
this.overlay = overlay;
|
|
3885
|
-
this.overlayPositionBuilder = overlayPositionBuilder;
|
|
3886
|
-
this.document = document;
|
|
3839
|
+
constructor() {
|
|
3887
3840
|
this.backdropClick = new EventEmitter();
|
|
3888
3841
|
this.backdropUnsubscribe = new Subject();
|
|
3889
3842
|
this.portalAttached = false;
|
|
@@ -3892,6 +3845,10 @@ class HtmlTooltipDirective {
|
|
|
3892
3845
|
this.hide();
|
|
3893
3846
|
}
|
|
3894
3847
|
};
|
|
3848
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
3849
|
+
this.overlay = inject(Overlay);
|
|
3850
|
+
this.overlayPositionBuilder = inject(OverlayPositionBuilder);
|
|
3851
|
+
this.document = inject(DOCUMENT);
|
|
3895
3852
|
}
|
|
3896
3853
|
init() {
|
|
3897
3854
|
if (!this.overlayRef) {
|
|
@@ -4027,19 +3984,16 @@ class HtmlTooltipDirective {
|
|
|
4027
3984
|
this.overlayRef.dispose();
|
|
4028
3985
|
}
|
|
4029
3986
|
}
|
|
4030
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4031
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
3987
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: HtmlTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3988
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: HtmlTooltipDirective, isStandalone: true, selector: "vic-html-tooltip", inputs: { template: "template", config: "config" }, outputs: { backdropClick: "backdropClick" }, usesOnChanges: true, ngImport: i0 }); }
|
|
4032
3989
|
}
|
|
4033
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3990
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: HtmlTooltipDirective, decorators: [{
|
|
4034
3991
|
type: Directive,
|
|
4035
3992
|
args: [{
|
|
4036
3993
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
4037
3994
|
selector: 'vic-html-tooltip',
|
|
4038
3995
|
}]
|
|
4039
|
-
}],
|
|
4040
|
-
type: Inject,
|
|
4041
|
-
args: [DOCUMENT]
|
|
4042
|
-
}] }], propDecorators: { template: [{
|
|
3996
|
+
}], propDecorators: { template: [{
|
|
4043
3997
|
type: Input
|
|
4044
3998
|
}], config: [{
|
|
4045
3999
|
type: Input
|
|
@@ -4052,10 +4006,10 @@ class TooltipTriangleComponent {
|
|
|
4052
4006
|
this.height = 12;
|
|
4053
4007
|
this.width = 20;
|
|
4054
4008
|
}
|
|
4055
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4056
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
4009
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TooltipTriangleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4010
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: TooltipTriangleComponent, isStandalone: true, selector: "vic-tooltip-triangle", inputs: { height: "height", width: "width" }, ngImport: i0, template: "<svg\n width=\"100%\"\n [attr.height]=\"height\"\n [style.--width]=\"width + 'px'\"\n class=\"vic-tooltip-svg-triangle center\"\n>\n <g class=\"svg-g\">\n <path\n class=\"triangle-path\"\n [attr.d]=\"'M 0,0 ' + (width / 2) + ',' + height + ' ' + width + ',0'\"\n ></path>\n </g>\n</svg>\n\n<svg\n width=\"100%\"\n [attr.height]=\"height\"\n [style.--width]=\"width + 'px'\"\n class=\"vic-tooltip-svg-triangle right\"\n>\n <g class=\"svg-g\">\n <path\n class=\"triangle-path\"\n [attr.d]=\"'M 0,0 ' + (width / 2) + ',' + height + ' ' + (width / 2) + ',0'\"\n ></path>\n </g>\n</svg>\n\n<svg\n width=\"100%\"\n [attr.height]=\"height\"\n [style.--width]=\"width + 'px'\"\n class=\"vic-tooltip-svg-triangle left\"\n>\n <g class=\"svg-g\">\n <path\n class=\"triangle-path\"\n [attr.d]=\"'M 0,0 ' + '0,' + height + ' ' + (width / 2) + ',0'\"\n ></path>\n </g>\n</svg>\n", styles: [".cdk-overlay-container .position-bottom-center .vic-tooltip-svg-triangle.center{transform:translate(calc(50% - var(--width) / 2),-2px)}.cdk-overlay-container .position-bottom-center .vic-tooltip-svg-triangle.right,.cdk-overlay-container .position-bottom-center .vic-tooltip-svg-triangle.left,.cdk-overlay-container .position-bottom-left .vic-tooltip-svg-triangle.center,.cdk-overlay-container .position-bottom-left .vic-tooltip-svg-triangle.right{display:none}.cdk-overlay-container .position-bottom-left .vic-tooltip-svg-triangle.left{transform:translateY(-2px)}.cdk-overlay-container .position-bottom-right .vic-tooltip-svg-triangle.center{display:none}.cdk-overlay-container .position-bottom-right .vic-tooltip-svg-triangle.right{transform:translate(calc(100% - var(--width) / 2),-2px)}.cdk-overlay-container .position-bottom-right .vic-tooltip-svg-triangle.left{display:none}.cdk-overlay-container .vic-tooltip-svg-triangle{display:block;transform:translate(calc(50% - var(--width) / 2),-2px)}.cdk-overlay-container .vic-tooltip-svg-triangle .triangle-path{stroke:var(--tooltip-triangle-stroke, gray);fill:var(--tooltip-triangle-fill, white);fill-opacity:var(--tooltip-triangle-fill-opacity, 1)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
4057
4011
|
}
|
|
4058
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4012
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TooltipTriangleComponent, decorators: [{
|
|
4059
4013
|
type: Component,
|
|
4060
4014
|
args: [{ selector: 'vic-tooltip-triangle', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<svg\n width=\"100%\"\n [attr.height]=\"height\"\n [style.--width]=\"width + 'px'\"\n class=\"vic-tooltip-svg-triangle center\"\n>\n <g class=\"svg-g\">\n <path\n class=\"triangle-path\"\n [attr.d]=\"'M 0,0 ' + (width / 2) + ',' + height + ' ' + width + ',0'\"\n ></path>\n </g>\n</svg>\n\n<svg\n width=\"100%\"\n [attr.height]=\"height\"\n [style.--width]=\"width + 'px'\"\n class=\"vic-tooltip-svg-triangle right\"\n>\n <g class=\"svg-g\">\n <path\n class=\"triangle-path\"\n [attr.d]=\"'M 0,0 ' + (width / 2) + ',' + height + ' ' + (width / 2) + ',0'\"\n ></path>\n </g>\n</svg>\n\n<svg\n width=\"100%\"\n [attr.height]=\"height\"\n [style.--width]=\"width + 'px'\"\n class=\"vic-tooltip-svg-triangle left\"\n>\n <g class=\"svg-g\">\n <path\n class=\"triangle-path\"\n [attr.d]=\"'M 0,0 ' + '0,' + height + ' ' + (width / 2) + ',0'\"\n ></path>\n </g>\n</svg>\n", styles: [".cdk-overlay-container .position-bottom-center .vic-tooltip-svg-triangle.center{transform:translate(calc(50% - var(--width) / 2),-2px)}.cdk-overlay-container .position-bottom-center .vic-tooltip-svg-triangle.right,.cdk-overlay-container .position-bottom-center .vic-tooltip-svg-triangle.left,.cdk-overlay-container .position-bottom-left .vic-tooltip-svg-triangle.center,.cdk-overlay-container .position-bottom-left .vic-tooltip-svg-triangle.right{display:none}.cdk-overlay-container .position-bottom-left .vic-tooltip-svg-triangle.left{transform:translateY(-2px)}.cdk-overlay-container .position-bottom-right .vic-tooltip-svg-triangle.center{display:none}.cdk-overlay-container .position-bottom-right .vic-tooltip-svg-triangle.right{transform:translate(calc(100% - var(--width) / 2),-2px)}.cdk-overlay-container .position-bottom-right .vic-tooltip-svg-triangle.left{display:none}.cdk-overlay-container .vic-tooltip-svg-triangle{display:block;transform:translate(calc(50% - var(--width) / 2),-2px)}.cdk-overlay-container .vic-tooltip-svg-triangle .triangle-path{stroke:var(--tooltip-triangle-stroke, gray);fill:var(--tooltip-triangle-fill, white);fill-opacity:var(--tooltip-triangle-fill-opacity, 1)}\n"] }]
|
|
4061
4015
|
}], propDecorators: { height: [{
|
|
@@ -4065,15 +4019,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
4065
4019
|
}] } });
|
|
4066
4020
|
|
|
4067
4021
|
class VicHtmlTooltipModule {
|
|
4068
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4069
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
4022
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicHtmlTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4023
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: VicHtmlTooltipModule, imports: [CommonModule,
|
|
4070
4024
|
OverlayModule,
|
|
4071
4025
|
HtmlTooltipDirective,
|
|
4072
4026
|
TooltipTriangleComponent], exports: [HtmlTooltipDirective, TooltipTriangleComponent] }); }
|
|
4073
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
4027
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicHtmlTooltipModule, imports: [CommonModule,
|
|
4074
4028
|
OverlayModule] }); }
|
|
4075
4029
|
}
|
|
4076
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4030
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicHtmlTooltipModule, decorators: [{
|
|
4077
4031
|
type: NgModule,
|
|
4078
4032
|
args: [{
|
|
4079
4033
|
imports: [
|
|
@@ -4103,10 +4057,10 @@ class BarsTooltipPositioner extends TooltipPositioner {
|
|
|
4103
4057
|
}
|
|
4104
4058
|
|
|
4105
4059
|
class BarsEventsDirective extends EventsDirective {
|
|
4106
|
-
constructor(
|
|
4107
|
-
super();
|
|
4108
|
-
this.bars = bars;
|
|
4060
|
+
constructor() {
|
|
4061
|
+
super(...arguments);
|
|
4109
4062
|
this.interactionOutput = new EventEmitter();
|
|
4063
|
+
this.bars = inject(BARS);
|
|
4110
4064
|
}
|
|
4111
4065
|
get marks() {
|
|
4112
4066
|
return this.bars;
|
|
@@ -4243,18 +4197,15 @@ class BarsEventsDirective extends EventsDirective {
|
|
|
4243
4197
|
this.positionX = undefined;
|
|
4244
4198
|
this.positionY = undefined;
|
|
4245
4199
|
}
|
|
4246
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4247
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
4200
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: BarsEventsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4201
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: BarsEventsDirective, isStandalone: true, selector: "[vicBarsEvents]", inputs: { hoverActions: "hoverActions", hoverMoveActions: "hoverMoveActions", clickActions: "clickActions", inputEventActions: "inputEventActions" }, outputs: { interactionOutput: "interactionOutput" }, usesInheritance: true, ngImport: i0 }); }
|
|
4248
4202
|
}
|
|
4249
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: BarsEventsDirective, decorators: [{
|
|
4250
4204
|
type: Directive,
|
|
4251
4205
|
args: [{
|
|
4252
4206
|
selector: '[vicBarsEvents]',
|
|
4253
4207
|
}]
|
|
4254
|
-
}],
|
|
4255
|
-
type: Inject,
|
|
4256
|
-
args: [BARS]
|
|
4257
|
-
}] }], propDecorators: { hoverActions: [{
|
|
4208
|
+
}], propDecorators: { hoverActions: [{
|
|
4258
4209
|
type: Input
|
|
4259
4210
|
}], hoverMoveActions: [{
|
|
4260
4211
|
type: Input
|
|
@@ -4267,11 +4218,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
4267
4218
|
}] } });
|
|
4268
4219
|
|
|
4269
4220
|
class VicBarsModule {
|
|
4270
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4271
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
4272
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
4221
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicBarsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4222
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: VicBarsModule, imports: [BarsComponent, BarsEventsDirective], exports: [BarsComponent, BarsEventsDirective] }); }
|
|
4223
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicBarsModule }); }
|
|
4273
4224
|
}
|
|
4274
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicBarsModule, decorators: [{
|
|
4275
4226
|
type: NgModule,
|
|
4276
4227
|
args: [{
|
|
4277
4228
|
imports: [BarsComponent, BarsEventsDirective],
|
|
@@ -4279,6 +4230,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
4279
4230
|
}]
|
|
4280
4231
|
}] });
|
|
4281
4232
|
|
|
4233
|
+
class BarsBackgrounds {
|
|
4234
|
+
constructor(options) {
|
|
4235
|
+
safeAssign(this, options);
|
|
4236
|
+
}
|
|
4237
|
+
}
|
|
4238
|
+
|
|
4239
|
+
const DEFAULT$t = {
|
|
4240
|
+
_color: 'whitesmoke',
|
|
4241
|
+
_events: false,
|
|
4242
|
+
};
|
|
4243
|
+
class BarsBackgroundsBuilder {
|
|
4244
|
+
constructor() {
|
|
4245
|
+
safeAssign(this, DEFAULT$t);
|
|
4246
|
+
}
|
|
4247
|
+
/**
|
|
4248
|
+
* OPTIONAL. Determines the color of the background.
|
|
4249
|
+
*
|
|
4250
|
+
* @param value - The color of the background.
|
|
4251
|
+
*
|
|
4252
|
+
* If not called, the default color is 'whitesmoke'.
|
|
4253
|
+
*/
|
|
4254
|
+
color(value) {
|
|
4255
|
+
this._color = value;
|
|
4256
|
+
return this;
|
|
4257
|
+
}
|
|
4258
|
+
/**
|
|
4259
|
+
* Determines whether the background is interactive or not.
|
|
4260
|
+
*
|
|
4261
|
+
* @param value - If `true`, the background is interactive and will respond to Viz Components events. If `false`, the background is not interactive.
|
|
4262
|
+
*
|
|
4263
|
+
* If not called, the default value is `false`.
|
|
4264
|
+
*/
|
|
4265
|
+
events(value) {
|
|
4266
|
+
this._events = value;
|
|
4267
|
+
return this;
|
|
4268
|
+
}
|
|
4269
|
+
/**
|
|
4270
|
+
* @internal
|
|
4271
|
+
* This function is for internal use only and should never be called by the user.
|
|
4272
|
+
*/
|
|
4273
|
+
_build() {
|
|
4274
|
+
return new BarsBackgrounds({
|
|
4275
|
+
color: this._color,
|
|
4276
|
+
events: this._events,
|
|
4277
|
+
});
|
|
4278
|
+
}
|
|
4279
|
+
}
|
|
4280
|
+
|
|
4282
4281
|
class DataDimensionBuilder {
|
|
4283
4282
|
formatFunction(formatFunction) {
|
|
4284
4283
|
if (formatFunction === null) {
|
|
@@ -4530,7 +4529,7 @@ class NumberChartPositionDimension extends NumberDimension {
|
|
|
4530
4529
|
}
|
|
4531
4530
|
}
|
|
4532
4531
|
|
|
4533
|
-
const DEFAULT$
|
|
4532
|
+
const DEFAULT$s = {
|
|
4534
4533
|
_includeZeroInDomain: true,
|
|
4535
4534
|
_scaleFn: scaleLinear,
|
|
4536
4535
|
};
|
|
@@ -4543,7 +4542,7 @@ const DEFAULT_PADDING = {
|
|
|
4543
4542
|
class NumberChartPositionDimensionBuilder extends DataDimensionBuilder {
|
|
4544
4543
|
constructor() {
|
|
4545
4544
|
super();
|
|
4546
|
-
safeAssign(this, DEFAULT$
|
|
4545
|
+
safeAssign(this, DEFAULT$s);
|
|
4547
4546
|
}
|
|
4548
4547
|
domain(domain) {
|
|
4549
4548
|
if (domain === null) {
|
|
@@ -4714,7 +4713,7 @@ class OrdinalChartPositionDimension extends DataDimension {
|
|
|
4714
4713
|
}
|
|
4715
4714
|
}
|
|
4716
4715
|
|
|
4717
|
-
const DEFAULT$
|
|
4716
|
+
const DEFAULT$r = {
|
|
4718
4717
|
_align: 0.5,
|
|
4719
4718
|
_paddingInner: 0.1,
|
|
4720
4719
|
_paddingOuter: 0.1,
|
|
@@ -4723,11 +4722,11 @@ const DEFAULT$s = {
|
|
|
4723
4722
|
class OrdinalChartPositionDimensionBuilder extends DataDimensionBuilder {
|
|
4724
4723
|
constructor() {
|
|
4725
4724
|
super();
|
|
4726
|
-
safeAssign(this, DEFAULT$
|
|
4725
|
+
safeAssign(this, DEFAULT$r);
|
|
4727
4726
|
}
|
|
4728
4727
|
align(align) {
|
|
4729
4728
|
if (align === null) {
|
|
4730
|
-
this._align = DEFAULT$
|
|
4729
|
+
this._align = DEFAULT$r._align;
|
|
4731
4730
|
return this;
|
|
4732
4731
|
}
|
|
4733
4732
|
this._align = align;
|
|
@@ -4743,7 +4742,7 @@ class OrdinalChartPositionDimensionBuilder extends DataDimensionBuilder {
|
|
|
4743
4742
|
}
|
|
4744
4743
|
paddingInner(paddingInner) {
|
|
4745
4744
|
if (paddingInner === null) {
|
|
4746
|
-
this._paddingInner = DEFAULT$
|
|
4745
|
+
this._paddingInner = DEFAULT$r._paddingInner;
|
|
4747
4746
|
return this;
|
|
4748
4747
|
}
|
|
4749
4748
|
this._paddingInner = paddingInner;
|
|
@@ -4751,7 +4750,7 @@ class OrdinalChartPositionDimensionBuilder extends DataDimensionBuilder {
|
|
|
4751
4750
|
}
|
|
4752
4751
|
paddingOuter(paddingOuter) {
|
|
4753
4752
|
if (paddingOuter === null) {
|
|
4754
|
-
this._paddingOuter = DEFAULT$
|
|
4753
|
+
this._paddingOuter = DEFAULT$r._paddingOuter;
|
|
4755
4754
|
return this;
|
|
4756
4755
|
}
|
|
4757
4756
|
this._paddingOuter = paddingOuter;
|
|
@@ -4833,14 +4832,14 @@ class OrdinalVisualValueDimension extends DataDimension {
|
|
|
4833
4832
|
}
|
|
4834
4833
|
}
|
|
4835
4834
|
|
|
4836
|
-
const DEFAULT$
|
|
4835
|
+
const DEFAULT$q = {
|
|
4837
4836
|
_range: schemeTableau10,
|
|
4838
4837
|
_valueAccessor: () => '',
|
|
4839
4838
|
};
|
|
4840
4839
|
class OrdinalVisualValueDimensionBuilder extends DataDimensionBuilder {
|
|
4841
4840
|
constructor() {
|
|
4842
4841
|
super();
|
|
4843
|
-
safeAssign(this, DEFAULT$
|
|
4842
|
+
safeAssign(this, DEFAULT$q);
|
|
4844
4843
|
}
|
|
4845
4844
|
domain(domain) {
|
|
4846
4845
|
if (domain === null) {
|
|
@@ -4852,7 +4851,7 @@ class OrdinalVisualValueDimensionBuilder extends DataDimensionBuilder {
|
|
|
4852
4851
|
}
|
|
4853
4852
|
range(range) {
|
|
4854
4853
|
if (range === null) {
|
|
4855
|
-
this._range = DEFAULT$
|
|
4854
|
+
this._range = DEFAULT$q._range;
|
|
4856
4855
|
return this;
|
|
4857
4856
|
}
|
|
4858
4857
|
this._range = range;
|
|
@@ -4889,54 +4888,6 @@ class OrdinalVisualValueDimensionBuilder extends DataDimensionBuilder {
|
|
|
4889
4888
|
}
|
|
4890
4889
|
}
|
|
4891
4890
|
|
|
4892
|
-
class BarsBackgrounds {
|
|
4893
|
-
constructor(options) {
|
|
4894
|
-
safeAssign(this, options);
|
|
4895
|
-
}
|
|
4896
|
-
}
|
|
4897
|
-
|
|
4898
|
-
const DEFAULT$q = {
|
|
4899
|
-
_color: 'whitesmoke',
|
|
4900
|
-
_events: false,
|
|
4901
|
-
};
|
|
4902
|
-
class BarsBackgroundsBuilder {
|
|
4903
|
-
constructor() {
|
|
4904
|
-
safeAssign(this, DEFAULT$q);
|
|
4905
|
-
}
|
|
4906
|
-
/**
|
|
4907
|
-
* OPTIONAL. Determines the color of the background.
|
|
4908
|
-
*
|
|
4909
|
-
* @param value - The color of the background.
|
|
4910
|
-
*
|
|
4911
|
-
* If not called, the default color is 'whitesmoke'.
|
|
4912
|
-
*/
|
|
4913
|
-
color(value) {
|
|
4914
|
-
this._color = value;
|
|
4915
|
-
return this;
|
|
4916
|
-
}
|
|
4917
|
-
/**
|
|
4918
|
-
* Determines whether the background is interactive or not.
|
|
4919
|
-
*
|
|
4920
|
-
* @param value - If `true`, the background is interactive and will respond to Viz Components events. If `false`, the background is not interactive.
|
|
4921
|
-
*
|
|
4922
|
-
* If not called, the default value is `false`.
|
|
4923
|
-
*/
|
|
4924
|
-
events(value) {
|
|
4925
|
-
this._events = value;
|
|
4926
|
-
return this;
|
|
4927
|
-
}
|
|
4928
|
-
/**
|
|
4929
|
-
* @internal
|
|
4930
|
-
* This function is for internal use only and should never be called by the user.
|
|
4931
|
-
*/
|
|
4932
|
-
_build() {
|
|
4933
|
-
return new BarsBackgrounds({
|
|
4934
|
-
color: this._color,
|
|
4935
|
-
events: this._events,
|
|
4936
|
-
});
|
|
4937
|
-
}
|
|
4938
|
-
}
|
|
4939
|
-
|
|
4940
4891
|
class BarsConfig extends XyPrimaryMarksConfig {
|
|
4941
4892
|
constructor(dimensions, options) {
|
|
4942
4893
|
super();
|
|
@@ -5258,10 +5209,10 @@ class VicBarsConfigBuilder extends PrimaryMarksBuilder {
|
|
|
5258
5209
|
getQuantitativeDimensionName() {
|
|
5259
5210
|
return this._orientation === 'horizontal' ? 'X' : 'Y';
|
|
5260
5211
|
}
|
|
5261
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5262
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
5212
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicBarsConfigBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5213
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicBarsConfigBuilder }); }
|
|
5263
5214
|
}
|
|
5264
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicBarsConfigBuilder, decorators: [{
|
|
5265
5216
|
type: Injectable
|
|
5266
5217
|
}], ctorParameters: () => [] });
|
|
5267
5218
|
|
|
@@ -5311,6 +5262,33 @@ class BarsHoverMoveEmitTooltipData {
|
|
|
5311
5262
|
}
|
|
5312
5263
|
}
|
|
5313
5264
|
|
|
5265
|
+
/**
|
|
5266
|
+
* @internal
|
|
5267
|
+
*/
|
|
5268
|
+
class ResizeChartHeightPipe {
|
|
5269
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5270
|
+
transform(divWidth, maxHeight, maxWidth) {
|
|
5271
|
+
if (typeof divWidth !== 'number') {
|
|
5272
|
+
return divWidth;
|
|
5273
|
+
}
|
|
5274
|
+
else if (divWidth < maxWidth) {
|
|
5275
|
+
const aspectRatio = maxWidth / maxHeight;
|
|
5276
|
+
return divWidth / aspectRatio;
|
|
5277
|
+
}
|
|
5278
|
+
else {
|
|
5279
|
+
return maxHeight;
|
|
5280
|
+
}
|
|
5281
|
+
}
|
|
5282
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ResizeChartHeightPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5283
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: ResizeChartHeightPipe, isStandalone: true, name: "resizeChartHeight" }); }
|
|
5284
|
+
}
|
|
5285
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ResizeChartHeightPipe, decorators: [{
|
|
5286
|
+
type: Pipe,
|
|
5287
|
+
args: [{
|
|
5288
|
+
name: 'resizeChartHeight',
|
|
5289
|
+
}]
|
|
5290
|
+
}] });
|
|
5291
|
+
|
|
5314
5292
|
var Orientation;
|
|
5315
5293
|
(function (Orientation) {
|
|
5316
5294
|
Orientation["horizontal"] = "horizontal";
|
|
@@ -5335,153 +5313,6 @@ const valueFormat = {
|
|
|
5335
5313
|
monthFullYear: '%B %Y',
|
|
5336
5314
|
};
|
|
5337
5315
|
|
|
5338
|
-
class VicDataExport {
|
|
5339
|
-
saveCSV(name, dataConfigs) {
|
|
5340
|
-
const blobParts = [];
|
|
5341
|
-
for (const dataConfig of dataConfigs) {
|
|
5342
|
-
let csv;
|
|
5343
|
-
let csvData = cloneDeep(dataConfig.data);
|
|
5344
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5345
|
-
csvData = csvData.map((datum) => {
|
|
5346
|
-
const returnObj = {};
|
|
5347
|
-
for (const column of dataConfig.columns) {
|
|
5348
|
-
returnObj[column.title] = column.valueAccessor(datum);
|
|
5349
|
-
// handle common unicode character replacements
|
|
5350
|
-
// d3 format's strange default minus character https://observablehq.com/@d3/d3-format
|
|
5351
|
-
if (typeof returnObj[column.title] === 'string') {
|
|
5352
|
-
returnObj[column.title] = returnObj[column.title].replace(/\u2212/g, '-');
|
|
5353
|
-
}
|
|
5354
|
-
}
|
|
5355
|
-
return returnObj;
|
|
5356
|
-
});
|
|
5357
|
-
if (dataConfig.flipped) {
|
|
5358
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5359
|
-
const data = csvData.reduce((acc, curr) => {
|
|
5360
|
-
for (const key in curr) {
|
|
5361
|
-
if (dataConfig.flippedHeaderKey &&
|
|
5362
|
-
key === dataConfig.flippedHeaderKey)
|
|
5363
|
-
continue;
|
|
5364
|
-
const valueToAdd = curr[key] instanceof String || typeof curr[key] === 'string'
|
|
5365
|
-
? `"${curr[key]}"`
|
|
5366
|
-
: curr[key];
|
|
5367
|
-
if (key in acc) {
|
|
5368
|
-
acc[key] += `,${valueToAdd}`;
|
|
5369
|
-
}
|
|
5370
|
-
else {
|
|
5371
|
-
acc[key] = `${valueToAdd}`;
|
|
5372
|
-
}
|
|
5373
|
-
}
|
|
5374
|
-
return acc;
|
|
5375
|
-
}, {});
|
|
5376
|
-
csv = '';
|
|
5377
|
-
if (dataConfig.flippedHeaderKey) {
|
|
5378
|
-
csv += ',';
|
|
5379
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5380
|
-
csv += csvData.reduce((acc, curr) => {
|
|
5381
|
-
if (acc !== '') {
|
|
5382
|
-
acc += `,${curr[dataConfig.flippedHeaderKey]}`;
|
|
5383
|
-
}
|
|
5384
|
-
else {
|
|
5385
|
-
acc += `${curr[dataConfig.flippedHeaderKey]}`;
|
|
5386
|
-
}
|
|
5387
|
-
return acc;
|
|
5388
|
-
}, '');
|
|
5389
|
-
}
|
|
5390
|
-
for (const key of Object.keys(data)) {
|
|
5391
|
-
if (csv !== '') {
|
|
5392
|
-
csv += '\r\n';
|
|
5393
|
-
}
|
|
5394
|
-
csv += `${key},${data[key]}`;
|
|
5395
|
-
}
|
|
5396
|
-
}
|
|
5397
|
-
else {
|
|
5398
|
-
csv = unparse(csvData);
|
|
5399
|
-
}
|
|
5400
|
-
for (let i = 0; i < dataConfig.marginBottom; i++) {
|
|
5401
|
-
csv = `${csv}\r\n`;
|
|
5402
|
-
}
|
|
5403
|
-
blobParts.push(csv);
|
|
5404
|
-
}
|
|
5405
|
-
const blob = new Blob(blobParts, { type: 'text/csv;charset=utf-8' });
|
|
5406
|
-
saveAs.saveAs(blob, `${name}.csv`);
|
|
5407
|
-
}
|
|
5408
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: VicDataExport, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5409
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: VicDataExport, providedIn: 'root' }); }
|
|
5410
|
-
}
|
|
5411
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: VicDataExport, decorators: [{
|
|
5412
|
-
type: Injectable,
|
|
5413
|
-
args: [{ providedIn: 'root' }]
|
|
5414
|
-
}] });
|
|
5415
|
-
|
|
5416
|
-
class VicColumnConfig {
|
|
5417
|
-
constructor(options) {
|
|
5418
|
-
safeAssign(this, options);
|
|
5419
|
-
}
|
|
5420
|
-
}
|
|
5421
|
-
class VicDataExportConfig {
|
|
5422
|
-
constructor(config) {
|
|
5423
|
-
/**
|
|
5424
|
-
* If true, the data will be flipped.
|
|
5425
|
-
* Data: {a: 1, b: 2}, {a: 3, b: 4}
|
|
5426
|
-
* Output CSV:
|
|
5427
|
-
* a | 1 | 3
|
|
5428
|
-
* b | 2 | 4
|
|
5429
|
-
*/
|
|
5430
|
-
this.flipped = false;
|
|
5431
|
-
/**
|
|
5432
|
-
* Specifies the keys on each object to include in the csv,
|
|
5433
|
-
* using default titles (converts thisIsAKey to This Is A Key) and values (object.thisIsAKey).
|
|
5434
|
-
* Data: {myKey: 1, otherKey: 2}, {myKey: 3, otherKey: 4}
|
|
5435
|
-
* defaultColumnList: [myKey]
|
|
5436
|
-
* Output CSV:
|
|
5437
|
-
* My Key
|
|
5438
|
-
* 1
|
|
5439
|
-
* 3
|
|
5440
|
-
*/
|
|
5441
|
-
this.defaultColumnList = [];
|
|
5442
|
-
/**
|
|
5443
|
-
* If true, all keys from the first object in the data array
|
|
5444
|
-
* are used to populate defaultColumnList
|
|
5445
|
-
*/
|
|
5446
|
-
this.includeAllKeysAsDefault = false;
|
|
5447
|
-
/**
|
|
5448
|
-
* A ColumnConfig needs to be provided for any column that can't use defaults
|
|
5449
|
-
* e.g. if there's a special title, the data needs to be formatted in some way,
|
|
5450
|
-
* sometimes certain fields are suppressed, etc.
|
|
5451
|
-
*/
|
|
5452
|
-
this.columns = [];
|
|
5453
|
-
this.marginBottom = 0;
|
|
5454
|
-
safeAssign(this, config);
|
|
5455
|
-
if (this.includeAllKeysAsDefault && this.data) {
|
|
5456
|
-
this.defaultColumnList = Object.keys(this.data[0]);
|
|
5457
|
-
}
|
|
5458
|
-
this.defaultColumnList.forEach((key) => {
|
|
5459
|
-
this.columns.push(new VicColumnConfig({
|
|
5460
|
-
title: key !== this.flippedHeaderKey ? this.convertToTitle(key) : key,
|
|
5461
|
-
valueAccessor: (x) => x[key] instanceof Date
|
|
5462
|
-
? ValueUtilities.d3Format(x[key], valueFormat.monthYear)
|
|
5463
|
-
: x[key],
|
|
5464
|
-
}));
|
|
5465
|
-
});
|
|
5466
|
-
}
|
|
5467
|
-
convertToTitle(key) {
|
|
5468
|
-
/**
|
|
5469
|
-
* Will convert:
|
|
5470
|
-
* - thisString -> This String
|
|
5471
|
-
* - 123String -> 123 String
|
|
5472
|
-
* - 123string -> 123 string
|
|
5473
|
-
* - string123 -> String 123
|
|
5474
|
-
* - thisSTRING -> This STRING
|
|
5475
|
-
* - thisSTRiNG -> This STRi NG
|
|
5476
|
-
*/
|
|
5477
|
-
let converted_key = key.charAt(0).toUpperCase() +
|
|
5478
|
-
key.slice(1).replace(/([a-z])([A-Z])/g, (match, p1, p2) => p1 + ' ' + p2);
|
|
5479
|
-
converted_key = converted_key.replace(/([a-zA-Z])(\d+)/g, (match, p1, p2) => p1 + ' ' + p2);
|
|
5480
|
-
converted_key = converted_key.replace(/(\d+)([a-zA-Z])/g, (match, p1, p2) => p1 + ' ' + p2);
|
|
5481
|
-
return converted_key;
|
|
5482
|
-
}
|
|
5483
|
-
}
|
|
5484
|
-
|
|
5485
5316
|
/**
|
|
5486
5317
|
* A dimension that transforms Date values into a position on a chart.
|
|
5487
5318
|
*
|
|
@@ -5662,48 +5493,195 @@ class NumberVisualValueDimensionBuilder extends DataDimensionBuilder {
|
|
|
5662
5493
|
this._range = undefined;
|
|
5663
5494
|
return this;
|
|
5664
5495
|
}
|
|
5665
|
-
this._range = range;
|
|
5666
|
-
return this;
|
|
5496
|
+
this._range = range;
|
|
5497
|
+
return this;
|
|
5498
|
+
}
|
|
5499
|
+
scaleFn(scaleFn) {
|
|
5500
|
+
if (scaleFn === null) {
|
|
5501
|
+
this._scaleFn = undefined;
|
|
5502
|
+
return this;
|
|
5503
|
+
}
|
|
5504
|
+
this._scaleFn = scaleFn;
|
|
5505
|
+
return this;
|
|
5506
|
+
}
|
|
5507
|
+
scale(scale) {
|
|
5508
|
+
if (scale === null) {
|
|
5509
|
+
this._scale = undefined;
|
|
5510
|
+
return this;
|
|
5511
|
+
}
|
|
5512
|
+
this._scale = scale;
|
|
5513
|
+
return this;
|
|
5514
|
+
}
|
|
5515
|
+
/**
|
|
5516
|
+
* @internal This method is not intended to be used by consumers of this library.
|
|
5517
|
+
*
|
|
5518
|
+
* @param dimensionName A user-intelligible name for the dimension being built. Used for error messages. Should be title cased.
|
|
5519
|
+
*/
|
|
5520
|
+
_build(dimensionName) {
|
|
5521
|
+
this.validateBuilder(dimensionName);
|
|
5522
|
+
return new NumberVisualValueDimension({
|
|
5523
|
+
domain: this._domain,
|
|
5524
|
+
formatFunction: this._formatFunction,
|
|
5525
|
+
formatSpecifier: this._formatSpecifier,
|
|
5526
|
+
includeZeroInDomain: this._includeZeroInDomain,
|
|
5527
|
+
range: this._range,
|
|
5528
|
+
scaleFn: this._scaleFn,
|
|
5529
|
+
scale: this._scale,
|
|
5530
|
+
valueAccessor: this._valueAccessor,
|
|
5531
|
+
});
|
|
5532
|
+
}
|
|
5533
|
+
validateBuilder(dimensionName) {
|
|
5534
|
+
this.validateValueAccessor(dimensionName);
|
|
5535
|
+
if (!this._range && !this._scale) {
|
|
5536
|
+
throw new Error(`${dimensionName} Dimension: Either a range or a scale must be provided.`);
|
|
5537
|
+
}
|
|
5538
|
+
}
|
|
5539
|
+
}
|
|
5540
|
+
|
|
5541
|
+
class VicDataExport {
|
|
5542
|
+
saveCSV(name, dataConfigs) {
|
|
5543
|
+
const blobParts = [];
|
|
5544
|
+
for (const dataConfig of dataConfigs) {
|
|
5545
|
+
let csv;
|
|
5546
|
+
let csvData = cloneDeep(dataConfig.data);
|
|
5547
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5548
|
+
csvData = csvData.map((datum) => {
|
|
5549
|
+
const returnObj = {};
|
|
5550
|
+
for (const column of dataConfig.columns) {
|
|
5551
|
+
returnObj[column.title] = column.valueAccessor(datum);
|
|
5552
|
+
// handle common unicode character replacements
|
|
5553
|
+
// d3 format's strange default minus character https://observablehq.com/@d3/d3-format
|
|
5554
|
+
if (typeof returnObj[column.title] === 'string') {
|
|
5555
|
+
returnObj[column.title] = returnObj[column.title].replace(/\u2212/g, '-');
|
|
5556
|
+
}
|
|
5557
|
+
}
|
|
5558
|
+
return returnObj;
|
|
5559
|
+
});
|
|
5560
|
+
if (dataConfig.flipped) {
|
|
5561
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5562
|
+
const data = csvData.reduce((acc, curr) => {
|
|
5563
|
+
for (const key in curr) {
|
|
5564
|
+
if (dataConfig.flippedHeaderKey &&
|
|
5565
|
+
key === dataConfig.flippedHeaderKey)
|
|
5566
|
+
continue;
|
|
5567
|
+
const valueToAdd = curr[key] instanceof String || typeof curr[key] === 'string'
|
|
5568
|
+
? `"${curr[key]}"`
|
|
5569
|
+
: curr[key];
|
|
5570
|
+
if (key in acc) {
|
|
5571
|
+
acc[key] += `,${valueToAdd}`;
|
|
5572
|
+
}
|
|
5573
|
+
else {
|
|
5574
|
+
acc[key] = `${valueToAdd}`;
|
|
5575
|
+
}
|
|
5576
|
+
}
|
|
5577
|
+
return acc;
|
|
5578
|
+
}, {});
|
|
5579
|
+
csv = '';
|
|
5580
|
+
if (dataConfig.flippedHeaderKey) {
|
|
5581
|
+
csv += ',';
|
|
5582
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5583
|
+
csv += csvData.reduce((acc, curr) => {
|
|
5584
|
+
if (acc !== '') {
|
|
5585
|
+
acc += `,${curr[dataConfig.flippedHeaderKey]}`;
|
|
5586
|
+
}
|
|
5587
|
+
else {
|
|
5588
|
+
acc += `${curr[dataConfig.flippedHeaderKey]}`;
|
|
5589
|
+
}
|
|
5590
|
+
return acc;
|
|
5591
|
+
}, '');
|
|
5592
|
+
}
|
|
5593
|
+
for (const key of Object.keys(data)) {
|
|
5594
|
+
if (csv !== '') {
|
|
5595
|
+
csv += '\r\n';
|
|
5596
|
+
}
|
|
5597
|
+
csv += `${key},${data[key]}`;
|
|
5598
|
+
}
|
|
5599
|
+
}
|
|
5600
|
+
else {
|
|
5601
|
+
csv = unparse(csvData);
|
|
5602
|
+
}
|
|
5603
|
+
for (let i = 0; i < dataConfig.marginBottom; i++) {
|
|
5604
|
+
csv = `${csv}\r\n`;
|
|
5605
|
+
}
|
|
5606
|
+
blobParts.push(csv);
|
|
5607
|
+
}
|
|
5608
|
+
const blob = new Blob(blobParts, { type: 'text/csv;charset=utf-8' });
|
|
5609
|
+
saveAs.saveAs(blob, `${name}.csv`);
|
|
5667
5610
|
}
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5611
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicDataExport, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5612
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicDataExport, providedIn: 'root' }); }
|
|
5613
|
+
}
|
|
5614
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicDataExport, decorators: [{
|
|
5615
|
+
type: Injectable,
|
|
5616
|
+
args: [{ providedIn: 'root' }]
|
|
5617
|
+
}] });
|
|
5618
|
+
|
|
5619
|
+
class VicColumnConfig {
|
|
5620
|
+
constructor(options) {
|
|
5621
|
+
safeAssign(this, options);
|
|
5675
5622
|
}
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5623
|
+
}
|
|
5624
|
+
class VicDataExportConfig {
|
|
5625
|
+
constructor(config) {
|
|
5626
|
+
/**
|
|
5627
|
+
* If true, the data will be flipped.
|
|
5628
|
+
* Data: {a: 1, b: 2}, {a: 3, b: 4}
|
|
5629
|
+
* Output CSV:
|
|
5630
|
+
* a | 1 | 3
|
|
5631
|
+
* b | 2 | 4
|
|
5632
|
+
*/
|
|
5633
|
+
this.flipped = false;
|
|
5634
|
+
/**
|
|
5635
|
+
* Specifies the keys on each object to include in the csv,
|
|
5636
|
+
* using default titles (converts thisIsAKey to This Is A Key) and values (object.thisIsAKey).
|
|
5637
|
+
* Data: {myKey: 1, otherKey: 2}, {myKey: 3, otherKey: 4}
|
|
5638
|
+
* defaultColumnList: [myKey]
|
|
5639
|
+
* Output CSV:
|
|
5640
|
+
* My Key
|
|
5641
|
+
* 1
|
|
5642
|
+
* 3
|
|
5643
|
+
*/
|
|
5644
|
+
this.defaultColumnList = [];
|
|
5645
|
+
/**
|
|
5646
|
+
* If true, all keys from the first object in the data array
|
|
5647
|
+
* are used to populate defaultColumnList
|
|
5648
|
+
*/
|
|
5649
|
+
this.includeAllKeysAsDefault = false;
|
|
5650
|
+
/**
|
|
5651
|
+
* A ColumnConfig needs to be provided for any column that can't use defaults
|
|
5652
|
+
* e.g. if there's a special title, the data needs to be formatted in some way,
|
|
5653
|
+
* sometimes certain fields are suppressed, etc.
|
|
5654
|
+
*/
|
|
5655
|
+
this.columns = [];
|
|
5656
|
+
this.marginBottom = 0;
|
|
5657
|
+
safeAssign(this, config);
|
|
5658
|
+
if (this.includeAllKeysAsDefault && this.data) {
|
|
5659
|
+
this.defaultColumnList = Object.keys(this.data[0]);
|
|
5680
5660
|
}
|
|
5681
|
-
this.
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
*/
|
|
5689
|
-
_build(dimensionName) {
|
|
5690
|
-
this.validateBuilder(dimensionName);
|
|
5691
|
-
return new NumberVisualValueDimension({
|
|
5692
|
-
domain: this._domain,
|
|
5693
|
-
formatFunction: this._formatFunction,
|
|
5694
|
-
formatSpecifier: this._formatSpecifier,
|
|
5695
|
-
includeZeroInDomain: this._includeZeroInDomain,
|
|
5696
|
-
range: this._range,
|
|
5697
|
-
scaleFn: this._scaleFn,
|
|
5698
|
-
scale: this._scale,
|
|
5699
|
-
valueAccessor: this._valueAccessor,
|
|
5661
|
+
this.defaultColumnList.forEach((key) => {
|
|
5662
|
+
this.columns.push(new VicColumnConfig({
|
|
5663
|
+
title: key !== this.flippedHeaderKey ? this.convertToTitle(key) : key,
|
|
5664
|
+
valueAccessor: (x) => x[key] instanceof Date
|
|
5665
|
+
? ValueUtilities.d3Format(x[key], valueFormat.monthYear)
|
|
5666
|
+
: x[key],
|
|
5667
|
+
}));
|
|
5700
5668
|
});
|
|
5701
5669
|
}
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5670
|
+
convertToTitle(key) {
|
|
5671
|
+
/**
|
|
5672
|
+
* Will convert:
|
|
5673
|
+
* - thisString -> This String
|
|
5674
|
+
* - 123String -> 123 String
|
|
5675
|
+
* - 123string -> 123 string
|
|
5676
|
+
* - string123 -> String 123
|
|
5677
|
+
* - thisSTRING -> This STRING
|
|
5678
|
+
* - thisSTRiNG -> This STRi NG
|
|
5679
|
+
*/
|
|
5680
|
+
let converted_key = key.charAt(0).toUpperCase() +
|
|
5681
|
+
key.slice(1).replace(/([a-z])([A-Z])/g, (match, p1, p2) => p1 + ' ' + p2);
|
|
5682
|
+
converted_key = converted_key.replace(/([a-zA-Z])(\d+)/g, (match, p1, p2) => p1 + ' ' + p2);
|
|
5683
|
+
converted_key = converted_key.replace(/(\d+)([a-zA-Z])/g, (match, p1, p2) => p1 + ' ' + p2);
|
|
5684
|
+
return converted_key;
|
|
5707
5685
|
}
|
|
5708
5686
|
}
|
|
5709
5687
|
|
|
@@ -5963,10 +5941,10 @@ class VicDotsConfigBuilder extends PrimaryMarksBuilder {
|
|
|
5963
5941
|
throw new Error('Dots Builder: Exactly one Y dimension is required. Please use one of `yDate`, `yNumeric`, or `yOrdinal` to set it.');
|
|
5964
5942
|
}
|
|
5965
5943
|
}
|
|
5966
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5967
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
5944
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicDotsConfigBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5945
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicDotsConfigBuilder }); }
|
|
5968
5946
|
}
|
|
5969
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5947
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicDotsConfigBuilder, decorators: [{
|
|
5970
5948
|
type: Injectable
|
|
5971
5949
|
}], ctorParameters: () => [] });
|
|
5972
5950
|
|
|
@@ -6096,14 +6074,14 @@ class DotsComponent extends VicXyPrimaryMarks {
|
|
|
6096
6074
|
return ('formatSpecifier' in dimension &&
|
|
6097
6075
|
typeof dimension.formatSpecifier === 'string');
|
|
6098
6076
|
}
|
|
6099
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
6100
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
6077
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
6078
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DotsComponent, isStandalone: true, selector: "[vic-primary-marks-dots]", host: { properties: { "class": "config.marksClass", "style.mixed-blend-mode": "config.mixBlendMode" } }, providers: [
|
|
6101
6079
|
{ provide: VIC_PRIMARY_MARKS, useExisting: DotsComponent },
|
|
6102
6080
|
{ provide: DOTS, useExisting: DotsComponent },
|
|
6103
6081
|
{ provide: ChartComponent, useExisting: XyChartComponent },
|
|
6104
6082
|
], usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6105
6083
|
}
|
|
6106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
6084
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotsComponent, decorators: [{
|
|
6107
6085
|
type: Component,
|
|
6108
6086
|
args: [{ selector: '[vic-primary-marks-dots]', template: '', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
6109
6087
|
{ provide: VIC_PRIMARY_MARKS, useExisting: DotsComponent },
|
|
@@ -6132,10 +6110,10 @@ class DotsTooltipPositioner extends TooltipPositioner {
|
|
|
6132
6110
|
}
|
|
6133
6111
|
|
|
6134
6112
|
class DotsEventsDirective extends EventsDirective {
|
|
6135
|
-
constructor(
|
|
6136
|
-
super();
|
|
6137
|
-
this.dots = dots;
|
|
6113
|
+
constructor() {
|
|
6114
|
+
super(...arguments);
|
|
6138
6115
|
this.interactionOutput = new EventEmitter();
|
|
6116
|
+
this.dots = inject(DOTS);
|
|
6139
6117
|
}
|
|
6140
6118
|
get marks() {
|
|
6141
6119
|
return this.dots;
|
|
@@ -6273,18 +6251,15 @@ class DotsEventsDirective extends EventsDirective {
|
|
|
6273
6251
|
this.positionX = undefined;
|
|
6274
6252
|
this.positionY = undefined;
|
|
6275
6253
|
}
|
|
6276
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
6277
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
6254
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotsEventsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6255
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: DotsEventsDirective, isStandalone: true, selector: "[vicDotsEvents]", inputs: { hoverActions: "hoverActions", hoverMoveActions: "hoverMoveActions", clickActions: "clickActions", inputEventActions: "inputEventActions" }, outputs: { interactionOutput: "interactionOutput" }, usesInheritance: true, ngImport: i0 }); }
|
|
6278
6256
|
}
|
|
6279
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
6257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotsEventsDirective, decorators: [{
|
|
6280
6258
|
type: Directive,
|
|
6281
6259
|
args: [{
|
|
6282
6260
|
selector: '[vicDotsEvents]',
|
|
6283
6261
|
}]
|
|
6284
|
-
}],
|
|
6285
|
-
type: Inject,
|
|
6286
|
-
args: [DOTS]
|
|
6287
|
-
}] }], propDecorators: { hoverActions: [{
|
|
6262
|
+
}], propDecorators: { hoverActions: [{
|
|
6288
6263
|
type: Input
|
|
6289
6264
|
}], hoverMoveActions: [{
|
|
6290
6265
|
type: Input
|
|
@@ -6297,11 +6272,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
6297
6272
|
}] } });
|
|
6298
6273
|
|
|
6299
6274
|
class VicDotsModule {
|
|
6300
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
6301
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
6302
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
6275
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicDotsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6276
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: VicDotsModule, imports: [DotsComponent, DotsEventsDirective], exports: [DotsComponent, DotsEventsDirective] }); }
|
|
6277
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicDotsModule }); }
|
|
6303
6278
|
}
|
|
6304
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
6279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicDotsModule, decorators: [{
|
|
6305
6280
|
type: NgModule,
|
|
6306
6281
|
args: [{
|
|
6307
6282
|
imports: [DotsComponent, DotsEventsDirective],
|
|
@@ -7563,10 +7538,10 @@ class VicGeographiesConfigBuilder {
|
|
|
7563
7538
|
throw new Error('At least one layer is required');
|
|
7564
7539
|
}
|
|
7565
7540
|
}
|
|
7566
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7567
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
7541
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicGeographiesConfigBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
7542
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicGeographiesConfigBuilder }); }
|
|
7568
7543
|
}
|
|
7569
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7544
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicGeographiesConfigBuilder, decorators: [{
|
|
7570
7545
|
type: Injectable
|
|
7571
7546
|
}], ctorParameters: () => [] });
|
|
7572
7547
|
|
|
@@ -7746,8 +7721,8 @@ class GeographiesComponent extends MapPrimaryMarks {
|
|
|
7746
7721
|
}, []);
|
|
7747
7722
|
this.pathsByLayer.next(pathsByLayer);
|
|
7748
7723
|
}
|
|
7749
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7750
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
7724
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: GeographiesComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
7725
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: GeographiesComponent, isStandalone: true, selector: "[vic-primary-marks-geographies]", host: { properties: { "class": "config.marksClass", "style.mixed-blend-mode": "config.mixBlendMode" } }, providers: [
|
|
7751
7726
|
{ provide: VIC_PRIMARY_MARKS, useExisting: GeographiesComponent },
|
|
7752
7727
|
{
|
|
7753
7728
|
provide: GEOGRAPHIES,
|
|
@@ -7759,7 +7734,7 @@ class GeographiesComponent extends MapPrimaryMarks {
|
|
|
7759
7734
|
},
|
|
7760
7735
|
], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
7761
7736
|
}
|
|
7762
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7737
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: GeographiesComponent, decorators: [{
|
|
7763
7738
|
type: Component,
|
|
7764
7739
|
args: [{ selector: '[vic-primary-marks-geographies]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
7765
7740
|
{ provide: VIC_PRIMARY_MARKS, useExisting: GeographiesComponent },
|
|
@@ -7773,7 +7748,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
7773
7748
|
},
|
|
7774
7749
|
], host: {
|
|
7775
7750
|
'[class]': 'config.marksClass',
|
|
7776
|
-
'[style.mixed-blend-mode]': 'config.
|
|
7751
|
+
'[style.mixed-blend-mode]': 'config.mixBlendMode',
|
|
7777
7752
|
}, template: "<ng-content></ng-content>\n" }]
|
|
7778
7753
|
}] });
|
|
7779
7754
|
|
|
@@ -7794,10 +7769,10 @@ class GeographiesTooltipPositioner extends TooltipPositioner {
|
|
|
7794
7769
|
}
|
|
7795
7770
|
|
|
7796
7771
|
class GeographiesEventsDirective extends EventsDirective {
|
|
7797
|
-
constructor(
|
|
7798
|
-
super();
|
|
7799
|
-
this.geographies = geographies;
|
|
7772
|
+
constructor() {
|
|
7773
|
+
super(...arguments);
|
|
7800
7774
|
this.interactionOutput = new EventEmitter();
|
|
7775
|
+
this.geographies = inject(GEOGRAPHIES);
|
|
7801
7776
|
}
|
|
7802
7777
|
get marks() {
|
|
7803
7778
|
return this.geographies;
|
|
@@ -7936,18 +7911,15 @@ class GeographiesEventsDirective extends EventsDirective {
|
|
|
7936
7911
|
this.positionY = undefined;
|
|
7937
7912
|
this.layer = undefined;
|
|
7938
7913
|
}
|
|
7939
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7940
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
7914
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: GeographiesEventsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7915
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: GeographiesEventsDirective, isStandalone: true, selector: "[vicGeographiesEvents]", inputs: { hoverActions: "hoverActions", hoverMoveActions: "hoverMoveActions", clickActions: "clickActions", inputEventActions: "inputEventActions" }, outputs: { interactionOutput: "interactionOutput" }, usesInheritance: true, ngImport: i0 }); }
|
|
7941
7916
|
}
|
|
7942
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7917
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: GeographiesEventsDirective, decorators: [{
|
|
7943
7918
|
type: Directive,
|
|
7944
7919
|
args: [{
|
|
7945
7920
|
selector: '[vicGeographiesEvents]',
|
|
7946
7921
|
}]
|
|
7947
|
-
}],
|
|
7948
|
-
type: Inject,
|
|
7949
|
-
args: [GEOGRAPHIES]
|
|
7950
|
-
}] }], propDecorators: { hoverActions: [{
|
|
7922
|
+
}], propDecorators: { hoverActions: [{
|
|
7951
7923
|
type: Input
|
|
7952
7924
|
}], hoverMoveActions: [{
|
|
7953
7925
|
type: Input
|
|
@@ -7964,11 +7936,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
7964
7936
|
*/
|
|
7965
7937
|
|
|
7966
7938
|
class VicGeographiesModule {
|
|
7967
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7968
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
7969
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
7939
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicGeographiesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7940
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: VicGeographiesModule, imports: [GeographiesComponent, GeographiesEventsDirective], exports: [GeographiesComponent, GeographiesEventsDirective] }); }
|
|
7941
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicGeographiesModule }); }
|
|
7970
7942
|
}
|
|
7971
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7943
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicGeographiesModule, decorators: [{
|
|
7972
7944
|
type: NgModule,
|
|
7973
7945
|
args: [{
|
|
7974
7946
|
imports: [GeographiesComponent, GeographiesEventsDirective],
|
|
@@ -8042,18 +8014,18 @@ class VicGroupedBarsConfigBuilder extends VicBarsConfigBuilder {
|
|
|
8042
8014
|
quantitative: this.quantitativeDimensionBuilder._build(this.getQuantitativeDimensionName()),
|
|
8043
8015
|
});
|
|
8044
8016
|
}
|
|
8045
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
8046
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
8017
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicGroupedBarsConfigBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
8018
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicGroupedBarsConfigBuilder }); }
|
|
8047
8019
|
}
|
|
8048
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8020
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicGroupedBarsConfigBuilder, decorators: [{
|
|
8049
8021
|
type: Injectable
|
|
8050
8022
|
}], ctorParameters: () => [] });
|
|
8051
8023
|
|
|
8052
8024
|
class GroupedBarsEventsDirective extends EventsDirective {
|
|
8053
|
-
constructor(
|
|
8054
|
-
super();
|
|
8055
|
-
this.bars = bars;
|
|
8025
|
+
constructor() {
|
|
8026
|
+
super(...arguments);
|
|
8056
8027
|
this.interactionOutput = new EventEmitter();
|
|
8028
|
+
this.bars = inject(BARS);
|
|
8057
8029
|
}
|
|
8058
8030
|
get marks() {
|
|
8059
8031
|
return this.bars;
|
|
@@ -8190,18 +8162,15 @@ class GroupedBarsEventsDirective extends EventsDirective {
|
|
|
8190
8162
|
this.positionX = undefined;
|
|
8191
8163
|
this.positionY = undefined;
|
|
8192
8164
|
}
|
|
8193
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
8194
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
8165
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: GroupedBarsEventsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
8166
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: GroupedBarsEventsDirective, isStandalone: true, selector: "[vicGroupedBarsEvents]", inputs: { hoverActions: "hoverActions", hoverMoveActions: "hoverMoveActions", clickActions: "clickActions", inputEventActions: "inputEventActions" }, outputs: { interactionOutput: "interactionOutput" }, usesInheritance: true, ngImport: i0 }); }
|
|
8195
8167
|
}
|
|
8196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: GroupedBarsEventsDirective, decorators: [{
|
|
8197
8169
|
type: Directive,
|
|
8198
8170
|
args: [{
|
|
8199
8171
|
selector: '[vicGroupedBarsEvents]',
|
|
8200
8172
|
}]
|
|
8201
|
-
}],
|
|
8202
|
-
type: Inject,
|
|
8203
|
-
args: [BARS]
|
|
8204
|
-
}] }], propDecorators: { hoverActions: [{
|
|
8173
|
+
}], propDecorators: { hoverActions: [{
|
|
8205
8174
|
type: Input
|
|
8206
8175
|
}], hoverMoveActions: [{
|
|
8207
8176
|
type: Input
|
|
@@ -8262,14 +8231,14 @@ class GroupedBarsComponent extends BarsComponent {
|
|
|
8262
8231
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8263
8232
|
return this.groupScale.bandwidth();
|
|
8264
8233
|
}
|
|
8265
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
8266
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
8234
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: GroupedBarsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
8235
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: GroupedBarsComponent, isStandalone: true, selector: "[vic-primary-grouped-bars]", inputs: { config: "config" }, host: { properties: { "class": "config.marksClass", "style.mixBlendMode": "config.mixBlendMode" } }, providers: [
|
|
8267
8236
|
{ provide: VIC_PRIMARY_MARKS, useExisting: GroupedBarsComponent },
|
|
8268
8237
|
{ provide: BARS, useExisting: GroupedBarsComponent },
|
|
8269
8238
|
{ provide: ChartComponent, useExisting: XyChartComponent },
|
|
8270
8239
|
], usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
8271
8240
|
}
|
|
8272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: GroupedBarsComponent, decorators: [{
|
|
8273
8242
|
type: Component,
|
|
8274
8243
|
args: [{ selector: '[vic-primary-grouped-bars]', template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
8275
8244
|
{ provide: VIC_PRIMARY_MARKS, useExisting: GroupedBarsComponent },
|
|
@@ -8285,11 +8254,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
8285
8254
|
}] } });
|
|
8286
8255
|
|
|
8287
8256
|
class VicGroupedBarsModule {
|
|
8288
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
8289
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
8290
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
8257
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicGroupedBarsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
8258
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: VicGroupedBarsModule, imports: [GroupedBarsComponent, GroupedBarsEventsDirective], exports: [GroupedBarsComponent, GroupedBarsEventsDirective] }); }
|
|
8259
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicGroupedBarsModule }); }
|
|
8291
8260
|
}
|
|
8292
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicGroupedBarsModule, decorators: [{
|
|
8293
8262
|
type: NgModule,
|
|
8294
8263
|
args: [{
|
|
8295
8264
|
imports: [GroupedBarsComponent, GroupedBarsEventsDirective],
|
|
@@ -8373,21 +8342,80 @@ class VicImageDownloadService {
|
|
|
8373
8342
|
link.href = dataUrl;
|
|
8374
8343
|
link.click();
|
|
8375
8344
|
}
|
|
8376
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
8377
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
8345
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicImageDownloadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
8346
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicImageDownloadService, providedIn: 'root' }); }
|
|
8378
8347
|
}
|
|
8379
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8348
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicImageDownloadService, decorators: [{
|
|
8380
8349
|
type: Injectable,
|
|
8381
8350
|
args: [{ providedIn: 'root' }]
|
|
8382
8351
|
}] });
|
|
8383
8352
|
|
|
8384
|
-
class
|
|
8353
|
+
class AreaFills {
|
|
8385
8354
|
constructor(options) {
|
|
8386
8355
|
safeAssign(this, options);
|
|
8387
8356
|
}
|
|
8388
8357
|
}
|
|
8389
8358
|
|
|
8390
8359
|
const DEFAULT$7 = {
|
|
8360
|
+
_display: () => true,
|
|
8361
|
+
_opacity: 0.2,
|
|
8362
|
+
_gradient: undefined,
|
|
8363
|
+
_color: undefined,
|
|
8364
|
+
};
|
|
8365
|
+
class AreaFillsBuilder {
|
|
8366
|
+
constructor() {
|
|
8367
|
+
safeAssign(this, DEFAULT$7);
|
|
8368
|
+
}
|
|
8369
|
+
color(color) {
|
|
8370
|
+
if (color === null) {
|
|
8371
|
+
this._color = undefined;
|
|
8372
|
+
return this;
|
|
8373
|
+
}
|
|
8374
|
+
this._color = typeof color === 'string' ? () => color : color;
|
|
8375
|
+
return this;
|
|
8376
|
+
}
|
|
8377
|
+
display(display) {
|
|
8378
|
+
this._display = typeof display === 'boolean' ? () => display : display;
|
|
8379
|
+
return this;
|
|
8380
|
+
}
|
|
8381
|
+
/**
|
|
8382
|
+
* OPTIONAL. A number to determine the opacity of the fill under line.
|
|
8383
|
+
*
|
|
8384
|
+
* @default 0.2
|
|
8385
|
+
*/
|
|
8386
|
+
opacity(opacity) {
|
|
8387
|
+
this._opacity = opacity;
|
|
8388
|
+
return this;
|
|
8389
|
+
}
|
|
8390
|
+
/**
|
|
8391
|
+
* OPTIONAL. A string to determine the gradient of the fill under line.
|
|
8392
|
+
*
|
|
8393
|
+
* @default undefined
|
|
8394
|
+
*/
|
|
8395
|
+
customFills(customFills) {
|
|
8396
|
+
this._customFills = customFills;
|
|
8397
|
+
return this;
|
|
8398
|
+
}
|
|
8399
|
+
/**
|
|
8400
|
+
* @internal This function is for internal use only and should never be called by the user.
|
|
8401
|
+
*/
|
|
8402
|
+
_build() {
|
|
8403
|
+
return {
|
|
8404
|
+
display: this._display,
|
|
8405
|
+
opacity: this._opacity,
|
|
8406
|
+
customFills: this._customFills,
|
|
8407
|
+
color: this._color,
|
|
8408
|
+
};
|
|
8409
|
+
}
|
|
8410
|
+
}
|
|
8411
|
+
|
|
8412
|
+
class PointMarkers {
|
|
8413
|
+
constructor(options) {
|
|
8414
|
+
safeAssign(this, options);
|
|
8415
|
+
}
|
|
8416
|
+
}
|
|
8417
|
+
|
|
8418
|
+
const DEFAULT$6 = {
|
|
8391
8419
|
_class: () => '',
|
|
8392
8420
|
_display: () => true,
|
|
8393
8421
|
_radius: 3,
|
|
@@ -8395,11 +8423,11 @@ const DEFAULT$7 = {
|
|
|
8395
8423
|
};
|
|
8396
8424
|
class PointMarkersBuilder {
|
|
8397
8425
|
constructor() {
|
|
8398
|
-
safeAssign(this, DEFAULT$
|
|
8426
|
+
safeAssign(this, DEFAULT$6);
|
|
8399
8427
|
}
|
|
8400
8428
|
class(value) {
|
|
8401
8429
|
if (value === null) {
|
|
8402
|
-
this._class = DEFAULT$
|
|
8430
|
+
this._class = DEFAULT$6._class;
|
|
8403
8431
|
return this;
|
|
8404
8432
|
}
|
|
8405
8433
|
if (typeof value === 'string') {
|
|
@@ -8451,7 +8479,7 @@ class LinesStroke extends StrokeBase {
|
|
|
8451
8479
|
}
|
|
8452
8480
|
}
|
|
8453
8481
|
|
|
8454
|
-
const DEFAULT$
|
|
8482
|
+
const DEFAULT$5 = {
|
|
8455
8483
|
_dasharray: 'none',
|
|
8456
8484
|
_linecap: 'round',
|
|
8457
8485
|
_linejoin: 'round',
|
|
@@ -8460,7 +8488,7 @@ const DEFAULT$6 = {
|
|
|
8460
8488
|
};
|
|
8461
8489
|
class LinesStrokeBuilder {
|
|
8462
8490
|
constructor() {
|
|
8463
|
-
safeAssign(this, DEFAULT$
|
|
8491
|
+
safeAssign(this, DEFAULT$5);
|
|
8464
8492
|
}
|
|
8465
8493
|
color(color) {
|
|
8466
8494
|
if (color === null) {
|
|
@@ -8478,7 +8506,7 @@ class LinesStrokeBuilder {
|
|
|
8478
8506
|
* OPTIONAL. A value for the line's [stroke-dasharray]{@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray}
|
|
8479
8507
|
* attribute.
|
|
8480
8508
|
*
|
|
8481
|
-
* @default '
|
|
8509
|
+
* @default 'none'
|
|
8482
8510
|
*/
|
|
8483
8511
|
dasharray(dasharray) {
|
|
8484
8512
|
this._dasharray = dasharray;
|
|
@@ -8545,59 +8573,6 @@ class LinesStrokeBuilder {
|
|
|
8545
8573
|
}
|
|
8546
8574
|
}
|
|
8547
8575
|
|
|
8548
|
-
const DEFAULT$5 = {
|
|
8549
|
-
_display: () => true,
|
|
8550
|
-
_opacity: 0.2,
|
|
8551
|
-
_gradient: undefined,
|
|
8552
|
-
_color: undefined,
|
|
8553
|
-
};
|
|
8554
|
-
class AreaFillsBuilder {
|
|
8555
|
-
constructor() {
|
|
8556
|
-
safeAssign(this, DEFAULT$5);
|
|
8557
|
-
}
|
|
8558
|
-
color(color) {
|
|
8559
|
-
if (color === null) {
|
|
8560
|
-
this._color = undefined;
|
|
8561
|
-
return this;
|
|
8562
|
-
}
|
|
8563
|
-
this._color = typeof color === 'string' ? () => color : color;
|
|
8564
|
-
return this;
|
|
8565
|
-
}
|
|
8566
|
-
display(display) {
|
|
8567
|
-
this._display = typeof display === 'boolean' ? () => display : display;
|
|
8568
|
-
return this;
|
|
8569
|
-
}
|
|
8570
|
-
/**
|
|
8571
|
-
* OPTIONAL. A number to determine the opacity of the fill under line.
|
|
8572
|
-
*
|
|
8573
|
-
* @default 0.2
|
|
8574
|
-
*/
|
|
8575
|
-
opacity(opacity) {
|
|
8576
|
-
this._opacity = opacity;
|
|
8577
|
-
return this;
|
|
8578
|
-
}
|
|
8579
|
-
/**
|
|
8580
|
-
* OPTIONAL. A string to determine the gradient of the fill under line.
|
|
8581
|
-
*
|
|
8582
|
-
* @default undefined
|
|
8583
|
-
*/
|
|
8584
|
-
customFills(customFills) {
|
|
8585
|
-
this._customFills = customFills;
|
|
8586
|
-
return this;
|
|
8587
|
-
}
|
|
8588
|
-
/**
|
|
8589
|
-
* @internal This function is for internal use only and should never be called by the user.
|
|
8590
|
-
*/
|
|
8591
|
-
_build() {
|
|
8592
|
-
return {
|
|
8593
|
-
display: this._display,
|
|
8594
|
-
opacity: this._opacity,
|
|
8595
|
-
customFills: this._customFills,
|
|
8596
|
-
color: this._color,
|
|
8597
|
-
};
|
|
8598
|
-
}
|
|
8599
|
-
}
|
|
8600
|
-
|
|
8601
8576
|
class LinesConfig extends XyPrimaryMarksConfig {
|
|
8602
8577
|
constructor(options) {
|
|
8603
8578
|
super();
|
|
@@ -8792,10 +8767,10 @@ class VicLinesConfigBuilder extends PrimaryMarksBuilder {
|
|
|
8792
8767
|
throw new Error('Lines Builder: Y dimension is required. Please use method `createYDimension` to set it.');
|
|
8793
8768
|
}
|
|
8794
8769
|
}
|
|
8795
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
8796
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
8770
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicLinesConfigBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
8771
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicLinesConfigBuilder }); }
|
|
8797
8772
|
}
|
|
8798
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8773
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicLinesConfigBuilder, decorators: [{
|
|
8799
8774
|
type: Injectable
|
|
8800
8775
|
}], ctorParameters: () => [] });
|
|
8801
8776
|
|
|
@@ -9024,8 +8999,17 @@ class LinesComponent extends VicXyPrimaryMarks {
|
|
|
9024
8999
|
.append('path')
|
|
9025
9000
|
.attr('class', ([category], i) => `${this.class.line} ${this.config.datumClass(this.config.getDataFromCategory(category)[0], i)}`.trim())
|
|
9026
9001
|
.attr('stroke', ([category]) => this.scales.color(category))
|
|
9002
|
+
.attr('stroke-dasharray', this.config.stroke.dasharray)
|
|
9003
|
+
.attr('stroke-linecap', this.config.stroke.linecap)
|
|
9004
|
+
.attr('stroke-linejoin', this.config.stroke.linejoin)
|
|
9005
|
+
.attr('stroke-width', this.config.stroke.width)
|
|
9027
9006
|
.attr('d', ([, lineData]) => this.line(lineData)), (update) => update
|
|
9007
|
+
.attr('class', ([category], i) => `${this.class.line} ${this.config.datumClass(this.config.getDataFromCategory(category)[0], i)}`.trim())
|
|
9028
9008
|
.attr('stroke', ([category]) => this.scales.color(category))
|
|
9009
|
+
.attr('stroke-dasharray', this.config.stroke.dasharray)
|
|
9010
|
+
.attr('stroke-linecap', this.config.stroke.linecap)
|
|
9011
|
+
.attr('stroke-linejoin', this.config.stroke.linejoin)
|
|
9012
|
+
.attr('stroke-width', this.config.stroke.width)
|
|
9029
9013
|
.call((update) => update
|
|
9030
9014
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9031
9015
|
.transition(t)
|
|
@@ -9144,14 +9128,14 @@ class LinesComponent extends VicXyPrimaryMarks {
|
|
|
9144
9128
|
origin: this.chart.svgRef.nativeElement,
|
|
9145
9129
|
};
|
|
9146
9130
|
}
|
|
9147
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9148
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
9131
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: LinesComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
9132
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: LinesComponent, isStandalone: true, selector: "[vic-primary-marks-lines]", host: { attributes: { "fill": "none" }, properties: { "class": "config.marksClass", "attr.stroke-linecap": "config.stroke.linecap", "attr.stroke-linejoin": "config.stroke.linejoin", "attr.stroke-width": "config.stroke.width", "attr.stroke-opacity": "config.stroke.opacity", "style.mix-blend-mode": "config.mixBlendMode" } }, providers: [
|
|
9149
9133
|
{ provide: VIC_PRIMARY_MARKS, useExisting: LinesComponent },
|
|
9150
9134
|
{ provide: LINES, useExisting: LinesComponent },
|
|
9151
9135
|
{ provide: ChartComponent, useExisting: XyChartComponent },
|
|
9152
9136
|
], usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
9153
9137
|
}
|
|
9154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: LinesComponent, decorators: [{
|
|
9155
9139
|
type: Component,
|
|
9156
9140
|
args: [{ selector: '[vic-primary-marks-lines]', template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
9157
9141
|
{ provide: VIC_PRIMARY_MARKS, useExisting: LinesComponent },
|
|
@@ -9185,11 +9169,11 @@ class LinesTooltipPositioner extends TooltipPositioner {
|
|
|
9185
9169
|
}
|
|
9186
9170
|
|
|
9187
9171
|
class LinesEventsDirective extends EventsDirective {
|
|
9188
|
-
constructor(
|
|
9189
|
-
super();
|
|
9190
|
-
this.lines = lines;
|
|
9172
|
+
constructor() {
|
|
9173
|
+
super(...arguments);
|
|
9191
9174
|
this.interactionOutput = new EventEmitter();
|
|
9192
9175
|
this.actionActive = false;
|
|
9176
|
+
this.lines = inject(LINES);
|
|
9193
9177
|
}
|
|
9194
9178
|
get marks() {
|
|
9195
9179
|
return this.lines;
|
|
@@ -9360,18 +9344,15 @@ class LinesEventsDirective extends EventsDirective {
|
|
|
9360
9344
|
this.positionX = undefined;
|
|
9361
9345
|
this.positionY = undefined;
|
|
9362
9346
|
}
|
|
9363
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9364
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
9347
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: LinesEventsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
9348
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: LinesEventsDirective, isStandalone: true, selector: "[vicLinesEvents]", inputs: { hoverMoveActions: "hoverMoveActions", clickActions: "clickActions", inputEventActions: "inputEventActions" }, outputs: { interactionOutput: "interactionOutput" }, usesInheritance: true, ngImport: i0 }); }
|
|
9365
9349
|
}
|
|
9366
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: LinesEventsDirective, decorators: [{
|
|
9367
9351
|
type: Directive,
|
|
9368
9352
|
args: [{
|
|
9369
9353
|
selector: '[vicLinesEvents]',
|
|
9370
9354
|
}]
|
|
9371
|
-
}],
|
|
9372
|
-
type: Inject,
|
|
9373
|
-
args: [LINES]
|
|
9374
|
-
}] }], propDecorators: { hoverMoveActions: [{
|
|
9355
|
+
}], propDecorators: { hoverMoveActions: [{
|
|
9375
9356
|
type: Input
|
|
9376
9357
|
}], clickActions: [{
|
|
9377
9358
|
type: Input
|
|
@@ -9382,11 +9363,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
9382
9363
|
}] } });
|
|
9383
9364
|
|
|
9384
9365
|
class VicLinesModule {
|
|
9385
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9386
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
9387
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
9366
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicLinesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
9367
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: VicLinesModule, imports: [LinesComponent, LinesEventsDirective], exports: [LinesComponent, LinesEventsDirective] }); }
|
|
9368
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicLinesModule }); }
|
|
9388
9369
|
}
|
|
9389
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9370
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicLinesModule, decorators: [{
|
|
9390
9371
|
type: NgModule,
|
|
9391
9372
|
args: [{
|
|
9392
9373
|
imports: [LinesComponent, LinesEventsDirective],
|
|
@@ -9448,10 +9429,10 @@ class MapLegend {
|
|
|
9448
9429
|
this.largerValueSpace = 0;
|
|
9449
9430
|
this.leftOffset = 0;
|
|
9450
9431
|
}
|
|
9451
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9452
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
9432
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MapLegend, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
9433
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: MapLegend, isStandalone: true, inputs: { width: "width", height: "height", orientation: "orientation", valuesSide: "valuesSide", scale: "scale", config: "config", outlineColor: "outlineColor" }, usesOnChanges: true, ngImport: i0 }); }
|
|
9453
9434
|
}
|
|
9454
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MapLegend, decorators: [{
|
|
9455
9436
|
type: Directive
|
|
9456
9437
|
}], propDecorators: { width: [{
|
|
9457
9438
|
type: Input
|
|
@@ -9522,12 +9503,12 @@ class ContinuousLegendComponent extends MapLegend {
|
|
|
9522
9503
|
ctx.fillRect(0, i, 1, 1);
|
|
9523
9504
|
}
|
|
9524
9505
|
}
|
|
9525
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9526
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
9506
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ContinuousLegendComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
9507
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: ContinuousLegendComponent, isStandalone: true, selector: "vic-continuous-legend", viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["canvas"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"vic-legend-color-scale vic-continuous\"\n [ngClass]=\"['vic-' + orientation, 'vic-' + valuesSide]\"\n [style.--width]=\"width + 'px'\"\n [style.--height]=\"height + 'px'\"\n [style.--border-color]=\"outlineColor\"\n [style.--value-space]=\"largerValueSpace + 'px'\"\n [style.left.px]=\"leftOffset\"\n>\n @if ((orientation === 'vertical' && valuesSide === 'left') || (orientation ===\n 'horizontal' && valuesSide === 'top')) {\n <ng-container *ngTemplateOutlet=\"valuesDisplay\"></ng-container>\n }\n <div class=\"vic-legend-canvas-container\">\n <canvas class=\"vic-legend-canvas\" #canvas></canvas>\n </div>\n @if ((orientation === 'vertical' && valuesSide === 'right') || (orientation\n === 'horizontal' && valuesSide === 'bottom')) {\n <ng-container *ngTemplateOutlet=\"valuesDisplay\"></ng-container>\n }\n</div>\n\n<ng-template #valuesDisplay>\n <div class=\"vic-legend-values-container vic-continuous\">\n <p class=\"vic-value vic-low\">{{ values[0] }}</p>\n <p class=\"vic-value vic-high\">{{ values[values.length - 1] }}</p>\n </div>\n</ng-template>\n", styles: [".vic-legend-canvas{display:block}.vic-legend-color-scale.vic-horizontal{display:flex;flex-direction:column;position:relative;max-width:var(--width)}.vic-legend-color-scale.vic-horizontal .vic-legend-canvas-container{display:flex;flex-direction:column;width:calc(var(--width) - var(--value-space) * 2);height:var(--height);margin-right:var(--value-space);margin-left:var(--value-space)}.vic-legend-color-scale.vic-horizontal .vic-legend-values-container{padding-top:.25rem;display:flex;flex-direction:row;justify-content:space-between}.vic-legend-color-scale.vic-horizontal .vic-value{width:calc(var(--value-space) * 2);text-align:center}.vic-legend-color-scale.vic-horizontal.vic-top .vic-legend-values-container{padding-top:0;padding-bottom:.25rem}.vic-legend-color-scale.vic-vertical{display:flex;max-height:var(--height)}.vic-legend-color-scale.vic-vertical .vic-legend-canvas-container{width:var(--width);height:calc(var(--height) - grid-2 * 2);margin-top:.5rem;margin-bottom:.5rem}.vic-legend-color-scale.vic-vertical .vic-legend-values-container{padding-right:.25rem;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end}.vic-legend-color-scale.vic-vertical.vic-right .vic-legend-values-container{padding-right:0;padding-left:.25rem;align-items:flex-start}.vic-legend-canvas-container{border:1px solid var(--border-color)}.vic-value{font-size:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
9527
9508
|
}
|
|
9528
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9509
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ContinuousLegendComponent, decorators: [{
|
|
9529
9510
|
type: Component,
|
|
9530
|
-
args: [{ selector: 'vic-continuous-legend', imports: [CommonModule], template: "<div\n class=\"vic-legend-color-scale vic-continuous\"\n [ngClass]=\"['vic-' + orientation, 'vic-' + valuesSide]\"\n [style.--width]=\"width + 'px'\"\n [style.--height]=\"height + 'px'\"\n [style.--border-color]=\"outlineColor\"\n [style.--value-space]=\"largerValueSpace + 'px'\"\n [style.left.px]=\"leftOffset\"\n>\n
|
|
9511
|
+
args: [{ selector: 'vic-continuous-legend', imports: [CommonModule], template: "<div\n class=\"vic-legend-color-scale vic-continuous\"\n [ngClass]=\"['vic-' + orientation, 'vic-' + valuesSide]\"\n [style.--width]=\"width + 'px'\"\n [style.--height]=\"height + 'px'\"\n [style.--border-color]=\"outlineColor\"\n [style.--value-space]=\"largerValueSpace + 'px'\"\n [style.left.px]=\"leftOffset\"\n>\n @if ((orientation === 'vertical' && valuesSide === 'left') || (orientation ===\n 'horizontal' && valuesSide === 'top')) {\n <ng-container *ngTemplateOutlet=\"valuesDisplay\"></ng-container>\n }\n <div class=\"vic-legend-canvas-container\">\n <canvas class=\"vic-legend-canvas\" #canvas></canvas>\n </div>\n @if ((orientation === 'vertical' && valuesSide === 'right') || (orientation\n === 'horizontal' && valuesSide === 'bottom')) {\n <ng-container *ngTemplateOutlet=\"valuesDisplay\"></ng-container>\n }\n</div>\n\n<ng-template #valuesDisplay>\n <div class=\"vic-legend-values-container vic-continuous\">\n <p class=\"vic-value vic-low\">{{ values[0] }}</p>\n <p class=\"vic-value vic-high\">{{ values[values.length - 1] }}</p>\n </div>\n</ng-template>\n", styles: [".vic-legend-canvas{display:block}.vic-legend-color-scale.vic-horizontal{display:flex;flex-direction:column;position:relative;max-width:var(--width)}.vic-legend-color-scale.vic-horizontal .vic-legend-canvas-container{display:flex;flex-direction:column;width:calc(var(--width) - var(--value-space) * 2);height:var(--height);margin-right:var(--value-space);margin-left:var(--value-space)}.vic-legend-color-scale.vic-horizontal .vic-legend-values-container{padding-top:.25rem;display:flex;flex-direction:row;justify-content:space-between}.vic-legend-color-scale.vic-horizontal .vic-value{width:calc(var(--value-space) * 2);text-align:center}.vic-legend-color-scale.vic-horizontal.vic-top .vic-legend-values-container{padding-top:0;padding-bottom:.25rem}.vic-legend-color-scale.vic-vertical{display:flex;max-height:var(--height)}.vic-legend-color-scale.vic-vertical .vic-legend-canvas-container{width:var(--width);height:calc(var(--height) - grid-2 * 2);margin-top:.5rem;margin-bottom:.5rem}.vic-legend-color-scale.vic-vertical .vic-legend-values-container{padding-right:.25rem;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end}.vic-legend-color-scale.vic-vertical.vic-right .vic-legend-values-container{padding-right:0;padding-left:.25rem;align-items:flex-start}.vic-legend-canvas-container{border:1px solid var(--border-color)}.vic-value{font-size:12px}\n"] }]
|
|
9531
9512
|
}], propDecorators: { canvasRef: [{
|
|
9532
9513
|
type: ViewChild,
|
|
9533
9514
|
args: ['canvas', { static: true }]
|
|
@@ -9565,12 +9546,12 @@ class DiscontinuousLegendComponent extends MapLegend {
|
|
|
9565
9546
|
return 0;
|
|
9566
9547
|
}
|
|
9567
9548
|
}
|
|
9568
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9569
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
9549
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DiscontinuousLegendComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
9550
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DiscontinuousLegendComponent, isStandalone: true, selector: "vic-discontinuous-legend", usesInheritance: true, ngImport: i0, template: "<div\n class=\"vic-legend-color-scale vic-discontinuous\"\n [ngClass]=\"['vic-' + orientation, 'vic-' + valuesSide]\"\n [class.vic-categorical]=\"config.binType === VicValuesBin.categorical\"\n [style.--border-color]=\"outlineColor\"\n [style.--width]=\"width + 'px'\"\n [style.--height]=\"height + 'px'\"\n [style.--num-colors]=\"colors.length\"\n [style.--value-space]=\"largerValueSpace + 'px'\"\n [style.left.px]=\"leftOffset\"\n>\n @if ((orientation === 'vertical' && valuesSide === 'left') || (orientation ===\n 'horizontal' && valuesSide === 'top')) {\n <ng-container *ngTemplateOutlet=\"valuesDisplay\"></ng-container>\n }\n <div class=\"vic-legend-colors-container\">\n @if (config.binType !== VicValuesBin.categorical) {\n <div class=\"vic-legend-color-padding\"></div>\n } @for (color of colors; track $index) {\n <div\n class=\"vic-legend-color vic-discontinuous\"\n [style.background-color]=\"color\"\n [style.--border-color]=\"outlineColor\"\n >\n </div>\n }\n </div>\n @if ((orientation === 'vertical' && valuesSide === 'right') || (orientation\n === 'horizontal' && valuesSide === 'bottom')) {\n <ng-container *ngTemplateOutlet=\"valuesDisplay\"></ng-container>\n }\n</div>\n\n<ng-template #valuesDisplay>\n <div class=\"vic-legend-values-container vic-discontinous\">\n @for (value of values; track $index) {\n <p class=\"vic-value\"> {{ value }} </p>\n }\n </div>\n</ng-template>\n", styles: [".vic-legend-color-scale.vic-horizontal{display:flex;flex-direction:column;position:relative}.vic-legend-color-scale.vic-horizontal .vic-legend-colors-container{display:grid;grid-template-columns:minmax(var(--value-space),.5fr) repeat(var(--num-colors),minmax(calc(var(--value-space) * 2),1fr)) minmax(var(--value-space),.5fr);max-width:var(--width);height:var(--height)}.vic-legend-color-scale.vic-horizontal .vic-legend-colors-container .vic-legend-color{height:100%;border-top:1px solid var(--border-color);border-bottom:1px solid var(--border-color);border-left:1px solid var(--border-color)}.vic-legend-color-scale.vic-horizontal .vic-legend-colors-container .vic-legend-color:last-child{border-right:1px solid var(--border-color)}.vic-legend-color-scale.vic-horizontal .vic-legend-values-container{padding-top:.25rem;display:grid;grid-template-columns:repeat(calc(var(--num-colors) + 1),minmax(calc(var(--value-space) * 2),1fr));max-width:var(--width);justify-items:center}.vic-legend-color-scale.vic-horizontal.vic-top .vic-legend-values-container{padding-top:0;padding-bottom:.25rem}.vic-legend-color-scale.vic-horizontal.vic-categorical .vic-legend-colors-container,.vic-legend-color-scale.vic-horizontal.vic-categorical .vic-legend-values-container{column-gap:.5rem;grid-template-columns:repeat(calc(var(--num-colors)),1fr)}.vic-legend-color-scale.vic-horizontal.vic-categorical .vic-value{text-align:center}.vic-legend-color-scale.vic-categorical .vic-legend-color{border:1px solid var(--border-color)}.vic-legend-color-scale.vic-vertical{display:flex;height:var(--height)}.vic-legend-color-scale.vic-vertical .vic-legend-colors-container{display:grid;grid-template-columns:var(--width);grid-template-rows:.5fr repeat(var(--num-colors),1fr) .5fr;height:100%}.vic-legend-color-scale.vic-vertical .vic-legend-colors-container .vic-legend-color{width:100%;border-top:1px solid var(--border-color);border-left:1px solid var(--border-color);border-right:1px solid var(--border-color)}.vic-legend-color-scale.vic-vertical .vic-legend-colors-container .vic-legend-color:last-child{border-bottom:1px solid var(--border-color)}.vic-legend-color-scale.vic-vertical .vic-legend-values-container{padding-right:.25rem;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(calc(var(--num-colors) + 1),1fr);align-items:center;justify-items:end;height:100%}.vic-legend-color-scale.vic-vertical.vic-right .vic-legend-values-container{padding-right:0;padding-left:.25rem;justify-items:start}.vic-legend-color-scale.vic-vertical.vic-categorical .vic-legend-colors-container,.vic-legend-color-scale.vic-vertical.vic-categorical .vic-legend-values-container{grid-template-rows:repeat(var(--num-colors),1fr);row-gap:.5rem}.vic-legend-color-scale.vic-vertical.vic-categorical .vic-value{text-align:right}.vic-legend-color-scale.vic-vertical.vic-categorical.vic-right .vic-value{text-align:left}.vic-value{font-size:12px;line-height:1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
9570
9551
|
}
|
|
9571
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9552
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DiscontinuousLegendComponent, decorators: [{
|
|
9572
9553
|
type: Component,
|
|
9573
|
-
args: [{ selector: 'vic-discontinuous-legend', imports: [CommonModule], template: "<div\n class=\"vic-legend-color-scale vic-discontinuous\"\n [ngClass]=\"['vic-' + orientation, 'vic-' + valuesSide]\"\n [class.vic-categorical]=\"config.binType === VicValuesBin.categorical\"\n [style.--border-color]=\"outlineColor\"\n [style.--width]=\"width + 'px'\"\n [style.--height]=\"height + 'px'\"\n [style.--num-colors]=\"colors.length\"\n [style.--value-space]=\"largerValueSpace + 'px'\"\n [style.left.px]=\"leftOffset\"\n>\n
|
|
9554
|
+
args: [{ selector: 'vic-discontinuous-legend', imports: [CommonModule], template: "<div\n class=\"vic-legend-color-scale vic-discontinuous\"\n [ngClass]=\"['vic-' + orientation, 'vic-' + valuesSide]\"\n [class.vic-categorical]=\"config.binType === VicValuesBin.categorical\"\n [style.--border-color]=\"outlineColor\"\n [style.--width]=\"width + 'px'\"\n [style.--height]=\"height + 'px'\"\n [style.--num-colors]=\"colors.length\"\n [style.--value-space]=\"largerValueSpace + 'px'\"\n [style.left.px]=\"leftOffset\"\n>\n @if ((orientation === 'vertical' && valuesSide === 'left') || (orientation ===\n 'horizontal' && valuesSide === 'top')) {\n <ng-container *ngTemplateOutlet=\"valuesDisplay\"></ng-container>\n }\n <div class=\"vic-legend-colors-container\">\n @if (config.binType !== VicValuesBin.categorical) {\n <div class=\"vic-legend-color-padding\"></div>\n } @for (color of colors; track $index) {\n <div\n class=\"vic-legend-color vic-discontinuous\"\n [style.background-color]=\"color\"\n [style.--border-color]=\"outlineColor\"\n >\n </div>\n }\n </div>\n @if ((orientation === 'vertical' && valuesSide === 'right') || (orientation\n === 'horizontal' && valuesSide === 'bottom')) {\n <ng-container *ngTemplateOutlet=\"valuesDisplay\"></ng-container>\n }\n</div>\n\n<ng-template #valuesDisplay>\n <div class=\"vic-legend-values-container vic-discontinous\">\n @for (value of values; track $index) {\n <p class=\"vic-value\"> {{ value }} </p>\n }\n </div>\n</ng-template>\n", styles: [".vic-legend-color-scale.vic-horizontal{display:flex;flex-direction:column;position:relative}.vic-legend-color-scale.vic-horizontal .vic-legend-colors-container{display:grid;grid-template-columns:minmax(var(--value-space),.5fr) repeat(var(--num-colors),minmax(calc(var(--value-space) * 2),1fr)) minmax(var(--value-space),.5fr);max-width:var(--width);height:var(--height)}.vic-legend-color-scale.vic-horizontal .vic-legend-colors-container .vic-legend-color{height:100%;border-top:1px solid var(--border-color);border-bottom:1px solid var(--border-color);border-left:1px solid var(--border-color)}.vic-legend-color-scale.vic-horizontal .vic-legend-colors-container .vic-legend-color:last-child{border-right:1px solid var(--border-color)}.vic-legend-color-scale.vic-horizontal .vic-legend-values-container{padding-top:.25rem;display:grid;grid-template-columns:repeat(calc(var(--num-colors) + 1),minmax(calc(var(--value-space) * 2),1fr));max-width:var(--width);justify-items:center}.vic-legend-color-scale.vic-horizontal.vic-top .vic-legend-values-container{padding-top:0;padding-bottom:.25rem}.vic-legend-color-scale.vic-horizontal.vic-categorical .vic-legend-colors-container,.vic-legend-color-scale.vic-horizontal.vic-categorical .vic-legend-values-container{column-gap:.5rem;grid-template-columns:repeat(calc(var(--num-colors)),1fr)}.vic-legend-color-scale.vic-horizontal.vic-categorical .vic-value{text-align:center}.vic-legend-color-scale.vic-categorical .vic-legend-color{border:1px solid var(--border-color)}.vic-legend-color-scale.vic-vertical{display:flex;height:var(--height)}.vic-legend-color-scale.vic-vertical .vic-legend-colors-container{display:grid;grid-template-columns:var(--width);grid-template-rows:.5fr repeat(var(--num-colors),1fr) .5fr;height:100%}.vic-legend-color-scale.vic-vertical .vic-legend-colors-container .vic-legend-color{width:100%;border-top:1px solid var(--border-color);border-left:1px solid var(--border-color);border-right:1px solid var(--border-color)}.vic-legend-color-scale.vic-vertical .vic-legend-colors-container .vic-legend-color:last-child{border-bottom:1px solid var(--border-color)}.vic-legend-color-scale.vic-vertical .vic-legend-values-container{padding-right:.25rem;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(calc(var(--num-colors) + 1),1fr);align-items:center;justify-items:end;height:100%}.vic-legend-color-scale.vic-vertical.vic-right .vic-legend-values-container{padding-right:0;padding-left:.25rem;justify-items:start}.vic-legend-color-scale.vic-vertical.vic-categorical .vic-legend-colors-container,.vic-legend-color-scale.vic-vertical.vic-categorical .vic-legend-values-container{grid-template-rows:repeat(var(--num-colors),1fr);row-gap:.5rem}.vic-legend-color-scale.vic-vertical.vic-categorical .vic-value{text-align:right}.vic-legend-color-scale.vic-vertical.vic-categorical.vic-right .vic-value{text-align:left}.vic-value{font-size:12px;line-height:1}\n"] }]
|
|
9574
9555
|
}] });
|
|
9575
9556
|
|
|
9576
9557
|
var VicLegendType;
|
|
@@ -9613,16 +9594,16 @@ class MapLegendComponent {
|
|
|
9613
9594
|
}
|
|
9614
9595
|
}
|
|
9615
9596
|
}
|
|
9616
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9617
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
9597
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MapLegendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9598
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: MapLegendComponent, isStandalone: true, selector: "vic-map-legend", inputs: { width: "width", height: "height", valuesSide: "valuesSide", outlineColor: "outlineColor" }, viewQueries: [{ propertyName: "VicValuesBin", first: true, predicate: ["canvas"], descendants: true, static: true }], ngImport: i0, template: "<ng-content select=\"[title]\"></ng-content>\n@if (chart.attributeProperties$ | async; as attributeProperties) { @if\n(attributeProperties.config) { @if (attributeProperties.config.binType ===\nVicValuesBin.none) {\n<vic-continuous-legend\n [width]=\"width\"\n [height]=\"height\"\n [valuesSide]=\"valuesSide\"\n [scale]=\"attributeProperties.scale\"\n [config]=\"attributeProperties.config\"\n [outlineColor]=\"outlineColor\"\n [orientation]=\"orientation\"\n></vic-continuous-legend>\n} @else {\n<vic-discontinuous-legend\n [width]=\"width\"\n [height]=\"height\"\n [valuesSide]=\"valuesSide\"\n [scale]=\"attributeProperties.scale\"\n [config]=\"attributeProperties.config\"\n [outlineColor]=\"outlineColor\"\n [orientation]=\"orientation\"\n></vic-discontinuous-legend>\n} } }\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ContinuousLegendComponent, selector: "vic-continuous-legend" }, { kind: "component", type: DiscontinuousLegendComponent, selector: "vic-discontinuous-legend" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
|
|
9618
9599
|
}
|
|
9619
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9600
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MapLegendComponent, decorators: [{
|
|
9620
9601
|
type: Component,
|
|
9621
9602
|
args: [{ selector: 'vic-map-legend', imports: [
|
|
9622
9603
|
CommonModule,
|
|
9623
9604
|
ContinuousLegendComponent,
|
|
9624
9605
|
DiscontinuousLegendComponent,
|
|
9625
|
-
], template: "<ng-content select=\"[title]\"></ng-content>\n@if (chart.attributeProperties$ | async; as attributeProperties) { @if\n(attributeProperties.config) {
|
|
9606
|
+
], template: "<ng-content select=\"[title]\"></ng-content>\n@if (chart.attributeProperties$ | async; as attributeProperties) { @if\n(attributeProperties.config) { @if (attributeProperties.config.binType ===\nVicValuesBin.none) {\n<vic-continuous-legend\n [width]=\"width\"\n [height]=\"height\"\n [valuesSide]=\"valuesSide\"\n [scale]=\"attributeProperties.scale\"\n [config]=\"attributeProperties.config\"\n [outlineColor]=\"outlineColor\"\n [orientation]=\"orientation\"\n></vic-continuous-legend>\n} @else {\n<vic-discontinuous-legend\n [width]=\"width\"\n [height]=\"height\"\n [valuesSide]=\"valuesSide\"\n [scale]=\"attributeProperties.scale\"\n [config]=\"attributeProperties.config\"\n [outlineColor]=\"outlineColor\"\n [orientation]=\"orientation\"\n></vic-discontinuous-legend>\n} } }\n" }]
|
|
9626
9607
|
}], propDecorators: { width: [{
|
|
9627
9608
|
type: Input
|
|
9628
9609
|
}], height: [{
|
|
@@ -9637,11 +9618,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
9637
9618
|
}] } });
|
|
9638
9619
|
|
|
9639
9620
|
class VicMapLegendModule {
|
|
9640
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9641
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
9642
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
9621
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicMapLegendModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
9622
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: VicMapLegendModule, imports: [MapLegendComponent], exports: [MapLegendComponent] }); }
|
|
9623
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicMapLegendModule, imports: [MapLegendComponent] }); }
|
|
9643
9624
|
}
|
|
9644
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9625
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicMapLegendModule, decorators: [{
|
|
9645
9626
|
type: NgModule,
|
|
9646
9627
|
args: [{
|
|
9647
9628
|
imports: [MapLegendComponent],
|
|
@@ -9871,10 +9852,10 @@ class VicQuantitativeRulesConfigBuilder extends VicAuxMarksBuilder {
|
|
|
9871
9852
|
this.labelsBuilder.validateBuilder(this._orientation, this._color);
|
|
9872
9853
|
}
|
|
9873
9854
|
}
|
|
9874
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9875
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
9855
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicQuantitativeRulesConfigBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
9856
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicQuantitativeRulesConfigBuilder }); }
|
|
9876
9857
|
}
|
|
9877
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9858
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicQuantitativeRulesConfigBuilder, decorators: [{
|
|
9878
9859
|
type: Injectable
|
|
9879
9860
|
}], ctorParameters: () => [] });
|
|
9880
9861
|
|
|
@@ -10039,10 +10020,10 @@ class QuantitativeRulesComponent extends XyAuxMarks {
|
|
|
10039
10020
|
}
|
|
10040
10021
|
return this.scales.y.range()[1];
|
|
10041
10022
|
}
|
|
10042
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
10043
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
10023
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: QuantitativeRulesComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
10024
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: QuantitativeRulesComponent, isStandalone: true, selector: "[vic-quantitative-rules]", host: { properties: { "class": "config.marksClass" } }, providers: [{ provide: ChartComponent, useExisting: XyChartComponent }], usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [":host{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10044
10025
|
}
|
|
10045
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10026
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: QuantitativeRulesComponent, decorators: [{
|
|
10046
10027
|
type: Component,
|
|
10047
10028
|
args: [{ selector: '[vic-quantitative-rules]', template: '', changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: ChartComponent, useExisting: XyChartComponent }], host: {
|
|
10048
10029
|
'[class]': 'config.marksClass',
|
|
@@ -10050,11 +10031,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
10050
10031
|
}] });
|
|
10051
10032
|
|
|
10052
10033
|
class VicQuantitativeRulesModule {
|
|
10053
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
10054
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
10055
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
10034
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicQuantitativeRulesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10035
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: VicQuantitativeRulesModule, imports: [QuantitativeRulesComponent], exports: [QuantitativeRulesComponent] }); }
|
|
10036
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicQuantitativeRulesModule }); }
|
|
10056
10037
|
}
|
|
10057
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10038
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicQuantitativeRulesModule, decorators: [{
|
|
10058
10039
|
type: NgModule,
|
|
10059
10040
|
args: [{
|
|
10060
10041
|
imports: [QuantitativeRulesComponent],
|
|
@@ -10224,10 +10205,10 @@ class VicStackedAreaConfigBuilder extends PrimaryMarksBuilder {
|
|
|
10224
10205
|
throw new Error('Stacked Area Builder: Y dimension must be created. Please use method `y` to set the y dimension.');
|
|
10225
10206
|
}
|
|
10226
10207
|
}
|
|
10227
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
10228
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
10208
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicStackedAreaConfigBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
10209
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicStackedAreaConfigBuilder }); }
|
|
10229
10210
|
}
|
|
10230
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicStackedAreaConfigBuilder, decorators: [{
|
|
10231
10212
|
type: Injectable
|
|
10232
10213
|
}], ctorParameters: () => [] });
|
|
10233
10214
|
|
|
@@ -10361,14 +10342,14 @@ class StackedAreaComponent extends VicXyPrimaryMarks {
|
|
|
10361
10342
|
updateStackedAreaElements() {
|
|
10362
10343
|
this.stackedAreas.next(this.areas);
|
|
10363
10344
|
}
|
|
10364
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
10365
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
10345
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: StackedAreaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
10346
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: StackedAreaComponent, isStandalone: true, selector: "[vic-primary-marks-stacked-area]", host: { properties: { "class": "config.marksClass" } }, providers: [
|
|
10366
10347
|
{ provide: VIC_PRIMARY_MARKS, useExisting: StackedAreaComponent },
|
|
10367
10348
|
{ provide: STACKED_AREA, useExisting: StackedAreaComponent },
|
|
10368
10349
|
{ provide: ChartComponent, useExisting: XyChartComponent },
|
|
10369
10350
|
], usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10370
10351
|
}
|
|
10371
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: StackedAreaComponent, decorators: [{
|
|
10372
10353
|
type: Component,
|
|
10373
10354
|
args: [{ selector: '[vic-primary-marks-stacked-area]', template: '', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
10374
10355
|
{ provide: VIC_PRIMARY_MARKS, useExisting: StackedAreaComponent },
|
|
@@ -10398,10 +10379,10 @@ class StackedAreaTooltipPositioner extends TooltipPositioner {
|
|
|
10398
10379
|
}
|
|
10399
10380
|
|
|
10400
10381
|
class StackedAreaEventsDirective extends EventsDirective {
|
|
10401
|
-
constructor(
|
|
10402
|
-
super();
|
|
10403
|
-
this.stackedArea = stackedArea;
|
|
10382
|
+
constructor() {
|
|
10383
|
+
super(...arguments);
|
|
10404
10384
|
this.interactionOutput = new EventEmitter();
|
|
10385
|
+
this.stackedArea = inject(STACKED_AREA);
|
|
10405
10386
|
}
|
|
10406
10387
|
get marks() {
|
|
10407
10388
|
return this.stackedArea;
|
|
@@ -10553,18 +10534,15 @@ class StackedAreaEventsDirective extends EventsDirective {
|
|
|
10553
10534
|
this.categoryYMax = undefined;
|
|
10554
10535
|
this.categoryIndex = undefined;
|
|
10555
10536
|
}
|
|
10556
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
10557
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
10537
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: StackedAreaEventsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
10538
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: StackedAreaEventsDirective, isStandalone: true, selector: "[vicStackedAreaEvents]", inputs: { hoverMoveActions: "hoverMoveActions", clickActions: "clickActions", inputEventActions: "inputEventActions" }, outputs: { interactionOutput: "interactionOutput" }, usesInheritance: true, ngImport: i0 }); }
|
|
10558
10539
|
}
|
|
10559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: StackedAreaEventsDirective, decorators: [{
|
|
10560
10541
|
type: Directive,
|
|
10561
10542
|
args: [{
|
|
10562
10543
|
selector: '[vicStackedAreaEvents]',
|
|
10563
10544
|
}]
|
|
10564
|
-
}],
|
|
10565
|
-
type: Inject,
|
|
10566
|
-
args: [STACKED_AREA]
|
|
10567
|
-
}] }], propDecorators: { hoverMoveActions: [{
|
|
10545
|
+
}], propDecorators: { hoverMoveActions: [{
|
|
10568
10546
|
type: Input
|
|
10569
10547
|
}], clickActions: [{
|
|
10570
10548
|
type: Input
|
|
@@ -10575,11 +10553,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
10575
10553
|
}] } });
|
|
10576
10554
|
|
|
10577
10555
|
class VicStackedAreaModule {
|
|
10578
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
10579
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
10580
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
10556
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicStackedAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10557
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: VicStackedAreaModule, imports: [StackedAreaComponent, StackedAreaEventsDirective], exports: [StackedAreaComponent, StackedAreaEventsDirective] }); }
|
|
10558
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicStackedAreaModule }); }
|
|
10581
10559
|
}
|
|
10582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicStackedAreaModule, decorators: [{
|
|
10583
10561
|
type: NgModule,
|
|
10584
10562
|
args: [{
|
|
10585
10563
|
imports: [StackedAreaComponent, StackedAreaEventsDirective],
|
|
@@ -10680,10 +10658,10 @@ class VicStackedBarsConfigBuilder extends VicBarsConfigBuilder {
|
|
|
10680
10658
|
stackOrder: this._stackOrder,
|
|
10681
10659
|
});
|
|
10682
10660
|
}
|
|
10683
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
10684
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
10661
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicStackedBarsConfigBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
10662
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicStackedBarsConfigBuilder }); }
|
|
10685
10663
|
}
|
|
10686
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10664
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicStackedBarsConfigBuilder, decorators: [{
|
|
10687
10665
|
type: Injectable
|
|
10688
10666
|
}], ctorParameters: () => [] });
|
|
10689
10667
|
|
|
@@ -10801,14 +10779,14 @@ class StackedBarsComponent extends BarsComponent {
|
|
|
10801
10779
|
getSourceDatumFromStackedBarDatum(datum) {
|
|
10802
10780
|
return this.config.data[datum.i];
|
|
10803
10781
|
}
|
|
10804
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
10805
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
10782
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: StackedBarsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
10783
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: StackedBarsComponent, isStandalone: true, selector: "[vic-primary-marks-stacked-bars]", inputs: { config: "config" }, host: { properties: { "class": "config.marksClass", "style.mixBlendMode": "config.mixBlendMode" } }, providers: [
|
|
10806
10784
|
{ provide: VIC_PRIMARY_MARKS, useExisting: StackedBarsComponent },
|
|
10807
10785
|
{ provide: STACKED_BARS, useExisting: StackedBarsComponent },
|
|
10808
10786
|
{ provide: ChartComponent, useExisting: XyChartComponent },
|
|
10809
10787
|
], usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
10810
10788
|
}
|
|
10811
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10789
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: StackedBarsComponent, decorators: [{
|
|
10812
10790
|
type: Component,
|
|
10813
10791
|
args: [{ selector: '[vic-primary-marks-stacked-bars]', template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
10814
10792
|
{ provide: VIC_PRIMARY_MARKS, useExisting: StackedBarsComponent },
|
|
@@ -10823,11 +10801,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
10823
10801
|
}] } });
|
|
10824
10802
|
|
|
10825
10803
|
class StackedBarsEventsDirective extends EventsDirective {
|
|
10826
|
-
constructor(
|
|
10827
|
-
super();
|
|
10828
|
-
this.stackedBars = stackedBars;
|
|
10804
|
+
constructor() {
|
|
10805
|
+
super(...arguments);
|
|
10829
10806
|
this.interactionOutput = new EventEmitter();
|
|
10830
10807
|
this.stackDatum = null;
|
|
10808
|
+
this.stackedBars = inject(STACKED_BARS);
|
|
10831
10809
|
}
|
|
10832
10810
|
get marks() {
|
|
10833
10811
|
return this.stackedBars;
|
|
@@ -10971,18 +10949,15 @@ class StackedBarsEventsDirective extends EventsDirective {
|
|
|
10971
10949
|
this.positionX = undefined;
|
|
10972
10950
|
this.positionY = undefined;
|
|
10973
10951
|
}
|
|
10974
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
10975
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
10952
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: StackedBarsEventsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
10953
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: StackedBarsEventsDirective, isStandalone: true, selector: "[vicStackedBarsEvents]", inputs: { hoverActions: "hoverActions", hoverMoveActions: "hoverMoveActions", clickActions: "clickActions", inputEventActions: "inputEventActions" }, outputs: { interactionOutput: "interactionOutput" }, usesInheritance: true, ngImport: i0 }); }
|
|
10976
10954
|
}
|
|
10977
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10955
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: StackedBarsEventsDirective, decorators: [{
|
|
10978
10956
|
type: Directive,
|
|
10979
10957
|
args: [{
|
|
10980
10958
|
selector: '[vicStackedBarsEvents]',
|
|
10981
10959
|
}]
|
|
10982
|
-
}],
|
|
10983
|
-
type: Inject,
|
|
10984
|
-
args: [STACKED_BARS]
|
|
10985
|
-
}] }], propDecorators: { hoverActions: [{
|
|
10960
|
+
}], propDecorators: { hoverActions: [{
|
|
10986
10961
|
type: Input
|
|
10987
10962
|
}], hoverMoveActions: [{
|
|
10988
10963
|
type: Input
|
|
@@ -10995,11 +10970,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
10995
10970
|
}] } });
|
|
10996
10971
|
|
|
10997
10972
|
class VicStackedBarsModule {
|
|
10998
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
10999
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
11000
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
10973
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicStackedBarsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10974
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: VicStackedBarsModule, imports: [StackedBarsComponent, StackedBarsEventsDirective], exports: [StackedBarsComponent, StackedBarsEventsDirective] }); }
|
|
10975
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicStackedBarsModule }); }
|
|
11001
10976
|
}
|
|
11002
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10977
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicStackedBarsModule, decorators: [{
|
|
11003
10978
|
type: NgModule,
|
|
11004
10979
|
args: [{
|
|
11005
10980
|
imports: [StackedBarsComponent, StackedBarsEventsDirective],
|
|
@@ -11008,28 +10983,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
11008
10983
|
}] });
|
|
11009
10984
|
|
|
11010
10985
|
class XyBackgroundComponent {
|
|
11011
|
-
constructor(
|
|
11012
|
-
this.chart = chart;
|
|
10986
|
+
constructor() {
|
|
11013
10987
|
this.color = 'whitesmoke';
|
|
10988
|
+
this.chart = inject(XyChartComponent);
|
|
11014
10989
|
}
|
|
11015
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
11016
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
10990
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: XyBackgroundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10991
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: XyBackgroundComponent, isStandalone: true, selector: "[vic-xy-background]", inputs: { color: "color" }, host: { classAttribute: "vic-xy-background" }, ngImport: i0, template: "@if(chart.scales$ | async; as scales) { @if(scales.x && scales.y) {\n<svg:rect\n class=\"vic-xy-background\"\n [attr.x]=\"scales.x.range()[0]\"\n [attr.y]=\"scales.y.range()[1]\"\n [attr.width]=\"scales.x.range()[1] - scales.x.range()[0]\"\n [attr.height]=\"scales.y.range()[0] - scales.y.range()[1]\"\n [attr.fill]=\"color\"\n></svg:rect>\n} }\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
|
|
11017
10992
|
}
|
|
11018
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10993
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: XyBackgroundComponent, decorators: [{
|
|
11019
10994
|
type: Component,
|
|
11020
10995
|
args: [{ selector: '[vic-xy-background]', host: {
|
|
11021
10996
|
class: 'vic-xy-background',
|
|
11022
10997
|
}, imports: [AsyncPipe, CommonModule], template: "@if(chart.scales$ | async; as scales) { @if(scales.x && scales.y) {\n<svg:rect\n class=\"vic-xy-background\"\n [attr.x]=\"scales.x.range()[0]\"\n [attr.y]=\"scales.y.range()[1]\"\n [attr.width]=\"scales.x.range()[1] - scales.x.range()[0]\"\n [attr.height]=\"scales.y.range()[0] - scales.y.range()[1]\"\n [attr.fill]=\"color\"\n></svg:rect>\n} }\n" }]
|
|
11023
|
-
}],
|
|
10998
|
+
}], propDecorators: { color: [{
|
|
11024
10999
|
type: Input
|
|
11025
11000
|
}] } });
|
|
11026
11001
|
|
|
11027
11002
|
class VicXyBackgroundModule {
|
|
11028
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
11029
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
11030
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
11003
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicXyBackgroundModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
11004
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: VicXyBackgroundModule, imports: [XyBackgroundComponent], exports: [XyBackgroundComponent] }); }
|
|
11005
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicXyBackgroundModule, imports: [XyBackgroundComponent] }); }
|
|
11031
11006
|
}
|
|
11032
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
11007
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: VicXyBackgroundModule, decorators: [{
|
|
11033
11008
|
type: NgModule,
|
|
11034
11009
|
args: [{
|
|
11035
11010
|
imports: [XyBackgroundComponent],
|
|
@@ -11045,5 +11020,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
11045
11020
|
* Generated bundle index. Do not edit.
|
|
11046
11021
|
*/
|
|
11047
11022
|
|
|
11048
|
-
export { AuxMarks, AuxMarksConfig, BARS, BarsClickEmitTooltipDataPauseOtherActions, BarsComponent, BarsConfig, BarsEventsDirective, BarsHoverEmitTooltipData, BarsHoverMoveEmitTooltipData, BarsHoverShowLabels, BarsLabels, BinStrategy, CHART, CHART_SIZE, CategoricalBinsAttributeDataDimension, Chart, ChartComponent, ChartConfig, ColorUtilities, CustomBreaksBinsAttributeDataDimension, DEFAULT_TOOLTIP_Y_OFFSET, DOTS, DataMarksConfig, DotsComponent, DotsConfig, DotsEventsDirective, DotsHoverDefaultStyles, DotsHoverMoveDefaultStyles, DotsHoverMoveEmitTooltipData, EqualFrequenciesAttributeDataDimension, EqualValueRangesAttributeDataDimension, EventType, EventsDirective, GEOGRAPHIES, GeographiesAttributeDataLayer, GeographiesAttributeDataLayerBuilder, GeographiesClickEmitTooltipDataPauseOtherActions, GeographiesComponent, GeographiesConfig, GeographiesEventsDirective, GeographiesGeojsonPropertiesLayer, GeographiesGeojsonPropertiesLayerBuilder, GeographiesHoverEmitTooltipData, GeographiesHoverMoveEmitTooltipData, GeographiesLabels, GeographiesLabelsBuilder, GroupedBarsComponent, GroupedBarsConfig, GroupedBarsEventsDirective, HorizontalBarsDimensionsBuilder, HtmlTooltipCdkManagedPosition, HtmlTooltipConfig, HtmlTooltipDirective, HtmlTooltipSize, HtmlTooltipSizeBuilder, LINES, LinesClickEmitTooltipDataPauseHoverMoveActions, LinesComponent, LinesConfig, LinesEventsDirective, LinesHoverMoveDefaultLinesStyles, LinesHoverMoveDefaultMarkersStyles, LinesHoverMoveDefaultStyles, LinesHoverMoveEmitTooltipData, LinesMarkerClickEmitTooltipData, LinesTooltipPositioner, MapChartComponent, MapLegendComponent, MapPrimaryMarks, MarksConfig, NoBinsAttributeDataDimension, Orientation, PointMarkers, PrimaryMarks, PrimaryMarksBuilder, PrimaryMarksConfig, QuantitativeRulesComponent, QuantitativeRulesConfig, QuantitativeRulesLabels, STACKED_AREA, STACKED_BARS, Side, StackedAreaComponent, StackedAreaConfig, StackedAreaEventsDirective, StackedAreaHoverMoveEmitTooltipData, StackedBarsClickEmitTooltipDataPauseOtherActions, StackedBarsComponent, StackedBarsConfig, StackedBarsEventsDirective, StackedBarsHoverEmitTooltipData, StackedBarsHoverMoveEmitTooltipData, Stroke, SvgTextWrap, TooltipPosition, TooltipPositionBuilder, TooltipPositioner, TooltipTriangleComponent, VIC_PRIMARY_MARKS, ValueExtent, VerticalBarsDimensionsBuilder, VicAuxMarksBuilder, VicBarsConfigBuilder, VicBarsModule, VicChartConfigBuilder, VicChartModule, VicColumnConfig, VicDataExport, VicDataExportConfig, VicDotsConfigBuilder, VicDotsModule, VicGeographiesConfigBuilder, VicGeographiesModule, VicGroupedBarsConfigBuilder, VicGroupedBarsModule, VicHtmlTooltipConfigBuilder, VicHtmlTooltipModule, VicImage, VicImageDownloadService, VicJpegImageConfig, VicLegendType, VicLinesConfigBuilder, VicLinesModule, VicMapAuxMarks, VicMapLegendModule, VicPngImageConfig, VicQuantitativeRulesConfigBuilder, VicQuantitativeRulesModule, VicStackedAreaConfigBuilder, VicStackedAreaModule, VicStackedBarsConfigBuilder, VicStackedBarsModule, VicSvgImageConfig, VicXOrdinalAxisConfig, VicXOrdinalAxisConfigBuilder, VicXQuantitativeAxisConfig, VicXQuantitativeAxisConfigBuilder, VicXyAxisModule, VicXyBackgroundModule, VicXyPrimaryMarks, VicYOrdinalAxisConfig, VicYOrdinalAxisConfigBuilder, VicYQuantitativeAxisConfig, VicYQuantitativeAxisConfigBuilder, XOrdinalAxisComponent, XQuantitativeAxisComponent, XyAuxMarks, XyBackgroundComponent, XyChartComponent, XyContentScale, XyMarksConfig, XyPrimaryMarksConfig, YOrdinalAxisComponent, YQuantitativeAxisComponent, valueFormat };
|
|
11023
|
+
export { AreaFills, AreaFillsBuilder, AuxMarks, AuxMarksConfig, AxisBaseline, AxisBaselineBuilder, AxisLabel, AxisLabelBuilder, BARS, BarsBackgrounds, BarsBackgroundsBuilder, BarsClickEmitTooltipDataPauseOtherActions, BarsComponent, BarsConfig, BarsEventsDirective, BarsHoverEmitTooltipData, BarsHoverMoveEmitTooltipData, BarsHoverShowLabels, BarsLabels, BarsLabelsBuilder, BarsTooltipPositioner, BinStrategy, CHART, CHART_SIZE, CategoricalBinsAttributeDataDimension, Chart, ChartComponent, ChartConfig, ColorUtilities, CustomBreaksBinsAttributeDataDimension, DEFAULT_TOOLTIP_Y_OFFSET, DOTS, DataDimension, DataDimensionBuilder, DataMarksConfig, DateChartPositionDimension, DateChartPositionDimensionBuilder, DomainPadding, DomainPaddingType, DotsComponent, DotsConfig, DotsEventsDirective, DotsHoverDefaultStyles, DotsHoverMoveDefaultStyles, DotsHoverMoveEmitTooltipData, DotsTooltipPositioner, EqualFrequenciesAttributeDataDimension, EqualValueRangesAttributeDataDimension, EventType, EventsDirective, FillUtilities, GEOGRAPHIES, GeographiesAttributeDataLayer, GeographiesAttributeDataLayerBuilder, GeographiesClickEmitTooltipDataPauseOtherActions, GeographiesComponent, GeographiesConfig, GeographiesEventsDirective, GeographiesGeojsonPropertiesLayer, GeographiesGeojsonPropertiesLayerBuilder, GeographiesHoverEmitTooltipData, GeographiesHoverMoveEmitTooltipData, GeographiesLabels, GeographiesLabelsBuilder, Grid, GridBuilder, GroupedBarsComponent, GroupedBarsConfig, GroupedBarsEventsDirective, HORIZONTAL_BARS_DIMENSIONS, HorizontalBarsDimensionsBuilder, HtmlTooltipCdkManagedPosition, HtmlTooltipConfig, HtmlTooltipDirective, HtmlTooltipSize, HtmlTooltipSizeBuilder, LINES, LinesClickEmitTooltipDataPauseHoverMoveActions, LinesComponent, LinesConfig, LinesEventsDirective, LinesHoverMoveDefaultLinesStyles, LinesHoverMoveDefaultMarkersStyles, LinesHoverMoveDefaultStyles, LinesHoverMoveEmitTooltipData, LinesMarkerClickEmitTooltipData, LinesStroke, LinesStrokeBuilder, LinesTooltipPositioner, MapChartComponent, MapLegendComponent, MapPrimaryMarks, MarksConfig, NoBinsAttributeDataDimension, NumberChartPositionDimension, NumberChartPositionDimensionBuilder, NumberDimension, NumberVisualValueDimension, NumberVisualValueDimensionBuilder, OrdinalChartPositionDimension, OrdinalChartPositionDimensionBuilder, OrdinalVisualValueDimension, OrdinalVisualValueDimensionBuilder, Orientation, PercentOverDomainPadding, PixelDomainPadding, PointMarkers, PointMarkersBuilder, PrimaryMarks, PrimaryMarksBuilder, PrimaryMarksConfig, QuantitativeRulesComponent, QuantitativeRulesConfig, QuantitativeRulesLabels, QuantitativeTicks, QuantitativeTicksBuilder, ResizeChartHeightPipe, RoundUpToIntervalDomainPadding, RoundUpToSigFigDomainPadding, STACKED_AREA, STACKED_BARS, Side, StackedAreaComponent, StackedAreaConfig, StackedAreaEventsDirective, StackedAreaHoverMoveEmitTooltipData, StackedBarsClickEmitTooltipDataPauseOtherActions, StackedBarsComponent, StackedBarsConfig, StackedBarsEventsDirective, StackedBarsHoverEmitTooltipData, StackedBarsHoverMoveEmitTooltipData, Stroke, StrokeBase, StrokeBuilder, SvgTextWrap, SvgTextWrapBuilder, TickWrap, TickWrapBuilder, Ticks, TicksBuilder, TooltipPosition, TooltipPositionBuilder, TooltipPositioner, TooltipTriangleComponent, VERTICAL_BARS_DIMENSIONS, VIC_PRIMARY_MARKS, ValueExtent, ValueUtilities, VerticalBarsDimensionsBuilder, VicAuxMarksBuilder, VicBarsConfigBuilder, VicBarsModule, VicChartConfigBuilder, VicChartModule, VicColumnConfig, VicDataExport, VicDataExportConfig, VicDotsConfigBuilder, VicDotsModule, VicGeographiesConfigBuilder, VicGeographiesModule, VicGroupedBarsConfigBuilder, VicGroupedBarsModule, VicHtmlTooltipConfigBuilder, VicHtmlTooltipModule, VicImage, VicImageDownloadService, VicJpegImageConfig, VicLegendType, VicLinesConfigBuilder, VicLinesModule, VicMapAuxMarks, VicMapLegendModule, VicOrdinalAxisConfig, VicPngImageConfig, VicQuantitativeAxisConfig, VicQuantitativeRulesConfigBuilder, VicQuantitativeRulesModule, VicStackedAreaConfigBuilder, VicStackedAreaModule, VicStackedBarsConfigBuilder, VicStackedBarsModule, VicSvgImageConfig, VicXOrdinalAxisConfig, VicXOrdinalAxisConfigBuilder, VicXQuantitativeAxisConfig, VicXQuantitativeAxisConfigBuilder, VicXyAxisModule, VicXyBackgroundModule, VicXyPrimaryMarks, VicYOrdinalAxisConfig, VicYOrdinalAxisConfigBuilder, VicYQuantitativeAxisConfig, VicYQuantitativeAxisConfigBuilder, XAxisConfig, XOrdinalAxisComponent, XQuantitativeAxisComponent, XyAuxMarks, XyAxis, XyAxisBaseBuilder, XyAxisConfig, XyBackgroundComponent, XyChartComponent, XyContentScale, XyMarksConfig, XyPrimaryMarksConfig, YAxisConfig, YOrdinalAxisComponent, YQuantitativeAxisComponent, isDate, isFunction, isNumber, isNumberArray, isObject, isPrimitiveType, mixinOrdinalAxisConfig, mixinQuantitativeAxisConfig, mixinXAxisConfig, mixinYAxisConfig, ordinalAxisMixin, quantitativeAxisMixin, valueFormat, xAxisMixin, yAxisMixin };
|
|
11049
11024
|
//# sourceMappingURL=mathstack-viz.mjs.map
|