@mathstack/viz 2.0.3 → 2.2.0
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/fesm2022/mathstack-viz.mjs +11024 -0
- package/fesm2022/mathstack-viz.mjs.map +1 -0
- package/package.json +14 -5
- package/types/mathstack-viz.d.ts +5830 -0
- package/CHANGELOG.md +0 -0
- package/cypress/fixtures/example.json +0 -5
- package/cypress/fixtures/usMap.json +0 -13511
- package/cypress/support/commands.ts +0 -104
- package/cypress/support/component-index.html +0 -12
- package/cypress/support/component.ts +0 -33
- package/cypress.config.ts +0 -9
- package/karma.conf.js +0 -62
- package/ng-package.json +0 -8
- package/project.json +0 -97
- package/src/.eslintrc.json +0 -35
- package/src/.prettierrc +0 -31
- package/src/lib/axes/base/config/xy-axis-builder.ts +0 -68
- package/src/lib/axes/base/config/xy-axis-config.ts +0 -35
- package/src/lib/axes/base/config/xy-axis-options.ts +0 -11
- package/src/lib/axes/base/xy-axis-base.spec.ts +0 -114
- package/src/lib/axes/base/xy-axis-base.ts +0 -300
- package/src/lib/axes/base/xy-axis-domain-lines.cy.ts +0 -511
- package/src/lib/axes/baseline/axis-baseline-builder.ts +0 -77
- package/src/lib/axes/baseline/axis-baseline-options.ts +0 -4
- package/src/lib/axes/baseline/axis-baseline.ts +0 -11
- package/src/lib/axes/grid/grid-builder.ts +0 -74
- package/src/lib/axes/grid/grid-config.ts +0 -13
- package/src/lib/axes/grid/grid-options.ts +0 -7
- package/src/lib/axes/index.ts +0 -40
- package/src/lib/axes/label/axis-label-builder.ts +0 -140
- package/src/lib/axes/label/axis-label-options.ts +0 -12
- package/src/lib/axes/label/axis-label.ts +0 -18
- package/src/lib/axes/label/axis-labels.cy.ts +0 -303
- package/src/lib/axes/ordinal/ordinal-axis-config.ts +0 -31
- package/src/lib/axes/ordinal/ordinal-axis.spec.ts +0 -30
- package/src/lib/axes/ordinal/ordinal-axis.ts +0 -26
- package/src/lib/axes/quantitative/quantitative-axis-config.ts +0 -39
- package/src/lib/axes/quantitative/quantitative-axis-ticks.cy.ts +0 -748
- package/src/lib/axes/quantitative/quantitative-axis.spec.ts +0 -537
- package/src/lib/axes/quantitative/quantitative-axis.ts +0 -191
- package/src/lib/axes/ticks/tick-wrap/tick-wrap-builder.ts +0 -141
- package/src/lib/axes/ticks/tick-wrap/tick-wrap-options.ts +0 -11
- package/src/lib/axes/ticks/tick-wrap/tick-wrap.cy.ts +0 -360
- package/src/lib/axes/ticks/tick-wrap/tick-wrap.ts +0 -21
- package/src/lib/axes/ticks/ticks-builder.ts +0 -370
- package/src/lib/axes/ticks/ticks-options.ts +0 -24
- package/src/lib/axes/ticks/ticks.ts +0 -33
- package/src/lib/axes/x/x-axis-config.ts +0 -48
- package/src/lib/axes/x/x-axis.spec.ts +0 -90
- package/src/lib/axes/x/x-axis.ts +0 -109
- package/src/lib/axes/x-ordinal/x-ordinal-axis-builder.ts +0 -75
- package/src/lib/axes/x-ordinal/x-ordinal-axis-config.ts +0 -27
- package/src/lib/axes/x-ordinal/x-ordinal-axis.component.ts +0 -33
- package/src/lib/axes/x-quantitative/x-quantitative-axis-builder.ts +0 -74
- package/src/lib/axes/x-quantitative/x-quantitative-axis-config.ts +0 -32
- package/src/lib/axes/x-quantitative/x-quantitative-axis.component.ts +0 -40
- package/src/lib/axes/xy-axis.module.ts +0 -20
- package/src/lib/axes/y/y-axis-config.ts +0 -47
- package/src/lib/axes/y/y-axis.spec.ts +0 -92
- package/src/lib/axes/y/y-axis.ts +0 -161
- package/src/lib/axes/y-ordinal/y-ordinal-axis-builder.ts +0 -76
- package/src/lib/axes/y-ordinal/y-ordinal-axis-config.ts +0 -29
- package/src/lib/axes/y-ordinal/y-ordinal-axis.component.ts +0 -33
- package/src/lib/axes/y-quantitative-axis/y-quantitative-axis-builder.ts +0 -74
- package/src/lib/axes/y-quantitative-axis/y-quantitative-axis-config.ts +0 -34
- package/src/lib/axes/y-quantitative-axis/y-quantitative-axis.component.ts +0 -40
- package/src/lib/bars/bars.component.scss +0 -0
- package/src/lib/bars/bars.component.spec.ts +0 -1470
- package/src/lib/bars/bars.component.ts +0 -717
- package/src/lib/bars/bars.cy.ts +0 -829
- package/src/lib/bars/bars.module.ts +0 -9
- package/src/lib/bars/config/backgrounds/bars-backgrounds-builder.ts +0 -51
- package/src/lib/bars/config/backgrounds/bars-backgrounds-options.ts +0 -4
- package/src/lib/bars/config/backgrounds/bars-backgrounds.ts +0 -11
- package/src/lib/bars/config/bars-builder.ts +0 -340
- package/src/lib/bars/config/bars-config.spec.ts +0 -132
- package/src/lib/bars/config/bars-config.ts +0 -70
- package/src/lib/bars/config/bars-dimensions.ts +0 -29
- package/src/lib/bars/config/bars-options.ts +0 -20
- package/src/lib/bars/config/labels/bars-labels-builder.ts +0 -89
- package/src/lib/bars/config/labels/bars-labels-options.ts +0 -6
- package/src/lib/bars/config/labels/bars-labels.cy.ts +0 -781
- package/src/lib/bars/config/labels/bars-labels.ts +0 -13
- package/src/lib/bars/events/actions/bars-click-actions.ts +0 -23
- package/src/lib/bars/events/actions/bars-hover-actions.ts +0 -43
- package/src/lib/bars/events/actions/bars-hover-move-actions.ts +0 -21
- package/src/lib/bars/events/bars-events.directive.spec.ts +0 -186
- package/src/lib/bars/events/bars-events.directive.ts +0 -235
- package/src/lib/bars/events/bars-interaction-output.ts +0 -17
- package/src/lib/bars/events/bars-tooltip-positioner.ts +0 -24
- package/src/lib/bars/index.ts +0 -18
- package/src/lib/charts/chart/chart-scaling.cy.ts +0 -323
- package/src/lib/charts/chart/chart.component.html +0 -45
- package/src/lib/charts/chart/chart.component.scss +0 -37
- package/src/lib/charts/chart/chart.component.ts +0 -243
- package/src/lib/charts/chart/chart.token.ts +0 -4
- package/src/lib/charts/chart/chart.ts +0 -5
- package/src/lib/charts/chart/config/chart-builder.ts +0 -194
- package/src/lib/charts/chart/config/chart-config.ts +0 -21
- package/src/lib/charts/chart/config/chart-options.ts +0 -11
- package/src/lib/charts/chart.module.ts +0 -10
- package/src/lib/charts/index.ts +0 -9
- package/src/lib/charts/map-chart/map-chart.component.scss +0 -0
- package/src/lib/charts/map-chart/map-chart.component.spec.ts +0 -35
- package/src/lib/charts/map-chart/map-chart.component.ts +0 -61
- package/src/lib/charts/xy-chart/xy-chart.component.spec.ts +0 -34
- package/src/lib/charts/xy-chart/xy-chart.component.ts +0 -65
- package/src/lib/core/common-behaviors/constructor.ts +0 -7
- package/src/lib/core/index.ts +0 -11
- package/src/lib/core/pipes/resize-chart-height.pipe.spec.ts +0 -23
- package/src/lib/core/pipes/resize-chart-height.pipe.ts +0 -20
- package/src/lib/core/styles/_spacing.scss +0 -4
- package/src/lib/core/types/layout.ts +0 -28
- package/src/lib/core/types/scale.ts +0 -6
- package/src/lib/core/types/utility.ts +0 -11
- package/src/lib/core/types/values.ts +0 -10
- package/src/lib/core/utilities/colors.spec.ts +0 -57
- package/src/lib/core/utilities/colors.ts +0 -42
- package/src/lib/core/utilities/fill-utilities.spec.ts +0 -25
- package/src/lib/core/utilities/fill-utilities.ts +0 -21
- package/src/lib/core/utilities/type-guards.spec.ts +0 -55
- package/src/lib/core/utilities/type-guards.ts +0 -33
- package/src/lib/core/utilities/value-format.ts +0 -21
- package/src/lib/core/utilities/values.spec.ts +0 -954
- package/src/lib/core/utilities/values.ts +0 -189
- package/src/lib/data-dimensions/continuous-quantitative/date-chart-position/date-chart-position-builder.ts +0 -105
- package/src/lib/data-dimensions/continuous-quantitative/date-chart-position/date-chart-position-options.ts +0 -24
- package/src/lib/data-dimensions/continuous-quantitative/date-chart-position/date-chart-position.spec.ts +0 -66
- package/src/lib/data-dimensions/continuous-quantitative/date-chart-position/date-chart-position.ts +0 -72
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/concrete-domain-padding.ts +0 -10
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/domain-padding.ts +0 -76
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/domain-test-utility.ts +0 -130
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/percent-over/percent-over-options.ts +0 -3
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/percent-over/percent-over.ts +0 -37
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/pixel/pixel-options.ts +0 -3
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/pixel/pixel.ts +0 -73
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/quantitative-domain-padding.cy.ts +0 -978
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-interval/round-to-interval-options.ts +0 -3
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-interval/round-to-interval.ts +0 -27
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-sig-fig/round-to-sig-fig-options.ts +0 -3
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-sig-fig/round-to-sig-fig.ts +0 -30
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/number-chart-position-builder.ts +0 -183
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/number-chart-position-options.ts +0 -8
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/number-chart-position.spec.ts +0 -28
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/number-chart-position.ts +0 -62
- package/src/lib/data-dimensions/continuous-quantitative/number-dimension/number-dimension-options.ts +0 -15
- package/src/lib/data-dimensions/continuous-quantitative/number-dimension/number-dimension.spec.ts +0 -155
- package/src/lib/data-dimensions/continuous-quantitative/number-dimension/number-dimension.ts +0 -57
- package/src/lib/data-dimensions/continuous-quantitative/number-visual-value/number-visual-value-builder.ts +0 -166
- package/src/lib/data-dimensions/continuous-quantitative/number-visual-value/number-visual-value-options.ts +0 -10
- package/src/lib/data-dimensions/continuous-quantitative/number-visual-value/number-visual-value.spec.ts +0 -34
- package/src/lib/data-dimensions/continuous-quantitative/number-visual-value/number-visual-value.ts +0 -57
- package/src/lib/data-dimensions/dimension-builder.ts +0 -45
- package/src/lib/data-dimensions/dimension-options.ts +0 -12
- package/src/lib/data-dimensions/dimension.ts +0 -30
- package/src/lib/data-dimensions/index.ts +0 -31
- package/src/lib/data-dimensions/ordinal/ordinal-chart-position/ordinal-chart-position-builder.ts +0 -122
- package/src/lib/data-dimensions/ordinal/ordinal-chart-position/ordinal-chart-position-options.ts +0 -12
- package/src/lib/data-dimensions/ordinal/ordinal-chart-position/ordinal-chart-position.spec.ts +0 -83
- package/src/lib/data-dimensions/ordinal/ordinal-chart-position/ordinal-chart-position.ts +0 -101
- package/src/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value-builder.ts +0 -108
- package/src/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value-options.ts +0 -12
- package/src/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value.cy.ts +0 -384
- package/src/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value.spec.ts +0 -63
- package/src/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value.ts +0 -79
- package/src/lib/data-export/data-export-config.ts +0 -98
- package/src/lib/data-export/data-export.spec.ts +0 -33
- package/src/lib/data-export/data-export.ts +0 -87
- package/src/lib/data-export/index.ts +0 -2
- package/src/lib/dots/config/dots-builder.ts +0 -442
- package/src/lib/dots/config/dots-config.spec.ts +0 -123
- package/src/lib/dots/config/dots-config.ts +0 -81
- package/src/lib/dots/config/dots-options.ts +0 -32
- package/src/lib/dots/dots.component.scss +0 -0
- package/src/lib/dots/dots.component.spec.ts +0 -143
- package/src/lib/dots/dots.component.ts +0 -291
- package/src/lib/dots/dots.cy.ts +0 -594
- package/src/lib/dots/dots.module.ts +0 -9
- package/src/lib/dots/events/actions/dots-hover-actions.ts +0 -19
- package/src/lib/dots/events/actions/dots-hover-move-actions.ts +0 -38
- package/src/lib/dots/events/dots-events.directive.ts +0 -214
- package/src/lib/dots/events/dots-interaction-output.ts +0 -15
- package/src/lib/dots/events/dots-tooltip-positioner.ts +0 -24
- package/src/lib/dots/index.ts +0 -10
- package/src/lib/events/events.directive.ts +0 -184
- package/src/lib/events/events.types.ts +0 -57
- package/src/lib/events/index.ts +0 -4
- package/src/lib/events/interaction-output.ts +0 -34
- package/src/lib/events/tooltip-positioner.ts +0 -15
- package/src/lib/fill-definitions/fill-definitions.ts +0 -4
- package/src/lib/fill-definitions/index.ts +0 -1
- package/src/lib/geographies/config/geographies-builder.ts +0 -224
- package/src/lib/geographies/config/geographies-config.spec.ts +0 -100
- package/src/lib/geographies/config/geographies-config.ts +0 -81
- package/src/lib/geographies/config/geographies-options.ts +0 -37
- package/src/lib/geographies/config/layers/attribute-data-layer/attribute-data-layer-builder.ts +0 -212
- package/src/lib/geographies/config/layers/attribute-data-layer/attribute-data-layer-options.ts +0 -26
- package/src/lib/geographies/config/layers/attribute-data-layer/attribute-data-layer.spec.ts +0 -119
- package/src/lib/geographies/config/layers/attribute-data-layer/attribute-data-layer.ts +0 -148
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data/attribute-data-dimension-builder.ts +0 -65
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data/attribute-data-dimension-options.ts +0 -15
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data/attribute-data-dimension.ts +0 -32
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data-bin-enums.ts +0 -10
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data-bin-types.ts +0 -15
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/calculated-bins/calculated-bins-builder.ts +0 -18
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/calculated-bins/calculated-bins-options.ts +0 -8
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/calculated-bins/calculated-bins.spec.ts +0 -60
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/calculated-bins/calculated-bins.ts +0 -34
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins-builder.ts +0 -46
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins-options.ts +0 -8
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins.cy.ts +0 -437
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins.spec.ts +0 -105
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins.ts +0 -54
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks-bins-builder.ts +0 -65
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks-bins-options.ts +0 -9
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks-bins.spec.ts +0 -82
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks-bins.ts +0 -81
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks.cy.ts +0 -378
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins-builder.ts +0 -50
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins-options.ts +0 -8
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins.cy.ts +0 -362
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins.spec.ts +0 -72
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins.ts +0 -56
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins-builder.ts +0 -60
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins-options.ts +0 -9
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins.cy.ts +0 -307
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins.spec.ts +0 -104
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins.ts +0 -89
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins-builder.ts +0 -62
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins-options.ts +0 -8
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins.cy.ts +0 -265
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins.spec.ts +0 -42
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins.ts +0 -42
- package/src/lib/geographies/config/layers/geographies-layer/geographies-layer-builder.ts +0 -116
- package/src/lib/geographies/config/layers/geographies-layer/geographies-layer-options.ts +0 -20
- package/src/lib/geographies/config/layers/geographies-layer/geographies-layer.ts +0 -104
- package/src/lib/geographies/config/layers/geojson-properties-layer/geojson-properties-layer-builder.ts +0 -111
- package/src/lib/geographies/config/layers/geojson-properties-layer/geojson-properties-layer-options.ts +0 -19
- package/src/lib/geographies/config/layers/geojson-properties-layer/geojson-properties-layer.spec.ts +0 -41
- package/src/lib/geographies/config/layers/geojson-properties-layer/geojson-properties-layer.ts +0 -67
- package/src/lib/geographies/config/layers/labels/geographies-labels-builder.ts +0 -269
- package/src/lib/geographies/config/layers/labels/geographies-labels-options.ts +0 -45
- package/src/lib/geographies/config/layers/labels/geographies-labels.ts +0 -38
- package/src/lib/geographies/events/actions/geographies-click-actions.ts +0 -21
- package/src/lib/geographies/events/actions/geographies-hover-actions.ts +0 -17
- package/src/lib/geographies/events/actions/geographies-hover-move-actions.ts +0 -19
- package/src/lib/geographies/events/geographies-events.directive.spec.ts +0 -225
- package/src/lib/geographies/events/geographies-events.directive.ts +0 -235
- package/src/lib/geographies/events/geographies-interaction-output.ts +0 -17
- package/src/lib/geographies/events/geographies-tooltip-positioner.ts +0 -23
- package/src/lib/geographies/geographies-feature.ts +0 -16
- package/src/lib/geographies/geographies.component.html +0 -1
- package/src/lib/geographies/geographies.component.scss +0 -0
- package/src/lib/geographies/geographies.component.spec.ts +0 -148
- package/src/lib/geographies/geographies.component.ts +0 -318
- package/src/lib/geographies/geographies.cy.ts +0 -640
- package/src/lib/geographies/geographies.module.ts +0 -9
- package/src/lib/geographies/index.ts +0 -32
- package/src/lib/grouped-bars/config/grouped-bars-builder.ts +0 -66
- package/src/lib/grouped-bars/config/grouped-bars-config.ts +0 -41
- package/src/lib/grouped-bars/config/grouped-bars-options.ts +0 -9
- package/src/lib/grouped-bars/events/grouped-bars-events.directive.ts +0 -221
- package/src/lib/grouped-bars/grouped-bars.component.scss +0 -0
- package/src/lib/grouped-bars/grouped-bars.component.spec.ts +0 -25
- package/src/lib/grouped-bars/grouped-bars.component.ts +0 -94
- package/src/lib/grouped-bars/grouped-bars.module.ts +0 -9
- package/src/lib/grouped-bars/index.ts +0 -10
- package/src/lib/image-download/image-download-config.ts +0 -57
- package/src/lib/image-download/image-download-enums.ts +0 -7
- package/src/lib/image-download/image-download-options.ts +0 -14
- package/src/lib/image-download/image-download.service.ts +0 -70
- package/src/lib/image-download/index.ts +0 -4
- package/src/lib/lines/config/area-fills/area-fills-builder.ts +0 -87
- package/src/lib/lines/config/area-fills/area-fills-options.ts +0 -8
- package/src/lib/lines/config/area-fills/area-fills.ts +0 -14
- package/src/lib/lines/config/lines-builder.ts +0 -242
- package/src/lib/lines/config/lines-config.spec.ts +0 -52
- package/src/lib/lines/config/lines-config.ts +0 -96
- package/src/lib/lines/config/lines-options.ts +0 -19
- package/src/lib/lines/config/stroke/lines-stroke-builder.ts +0 -135
- package/src/lib/lines/config/stroke/lines-stroke-options.ts +0 -6
- package/src/lib/lines/config/stroke/lines-stroke.ts +0 -15
- package/src/lib/lines/events/actions/lines-click-actions.ts +0 -17
- package/src/lib/lines/events/actions/lines-hover-move-actions.ts +0 -113
- package/src/lib/lines/events/actions/lines-marker-click-actions.ts +0 -29
- package/src/lib/lines/events/lines-events.directive.spec.ts +0 -152
- package/src/lib/lines/events/lines-events.directive.ts +0 -310
- package/src/lib/lines/events/lines-interaction-output.ts +0 -17
- package/src/lib/lines/events/lines-tooltip-positioner.ts +0 -24
- package/src/lib/lines/index.ts +0 -17
- package/src/lib/lines/lines.component.scss +0 -0
- package/src/lib/lines/lines.component.spec.ts +0 -95
- package/src/lib/lines/lines.component.ts +0 -425
- package/src/lib/lines/lines.cy.ts +0 -738
- package/src/lib/lines/lines.module.ts +0 -9
- package/src/lib/map-legend/continuous-legend/continuous-legend.component.html +0 -28
- package/src/lib/map-legend/continuous-legend/continuous-legend.component.scss +0 -76
- package/src/lib/map-legend/continuous-legend/continuous-legend.component.spec.ts +0 -61
- package/src/lib/map-legend/continuous-legend/continuous-legend.component.ts +0 -82
- package/src/lib/map-legend/discontinuous-legend/discontinuous-legend.component.html +0 -40
- package/src/lib/map-legend/discontinuous-legend/discontinuous-legend.component.scss +0 -141
- package/src/lib/map-legend/discontinuous-legend/discontinuous-legend.component.spec.ts +0 -75
- package/src/lib/map-legend/discontinuous-legend/discontinuous-legend.component.ts +0 -57
- package/src/lib/map-legend/index.ts +0 -2
- package/src/lib/map-legend/map-legend-base.spec.ts +0 -190
- package/src/lib/map-legend/map-legend-base.ts +0 -99
- package/src/lib/map-legend/map-legend.component.html +0 -24
- package/src/lib/map-legend/map-legend.component.scss +0 -0
- package/src/lib/map-legend/map-legend.component.spec.ts +0 -125
- package/src/lib/map-legend/map-legend.component.ts +0 -80
- package/src/lib/map-legend/map-legend.module.ts +0 -8
- package/src/lib/marks/aux-marks/aux-marks.ts +0 -18
- package/src/lib/marks/aux-marks/config/aux-marks-builder.ts +0 -25
- package/src/lib/marks/aux-marks/config/aux-marks-config.ts +0 -6
- package/src/lib/marks/config/marks-config.ts +0 -14
- package/src/lib/marks/config/marks-options.ts +0 -9
- package/src/lib/marks/index.ts +0 -15
- package/src/lib/marks/map-marks/map-aux-marks/map-aux-marks.spec.ts +0 -74
- package/src/lib/marks/map-marks/map-aux-marks/map-aux-marks.ts +0 -40
- package/src/lib/marks/map-marks/map-primary-marks/map-primary-marks.spec.ts +0 -79
- package/src/lib/marks/map-marks/map-primary-marks/map-primary-marks.ts +0 -63
- package/src/lib/marks/marks.ts +0 -39
- package/src/lib/marks/primary-marks/config/primary-marks-builder.ts +0 -75
- package/src/lib/marks/primary-marks/config/primary-marks-config.ts +0 -9
- package/src/lib/marks/primary-marks/primary-marks-base.spec.ts +0 -58
- package/src/lib/marks/primary-marks/primary-marks.ts +0 -43
- package/src/lib/marks/xy-marks/xy-aux-marks/xy-aux-marks.ts +0 -40
- package/src/lib/marks/xy-marks/xy-marks-config.ts +0 -5
- package/src/lib/marks/xy-marks/xy-marks.ts +0 -10
- package/src/lib/marks/xy-marks/xy-primary-marks/xy-primary-marks-config.ts +0 -7
- package/src/lib/marks/xy-marks/xy-primary-marks/xy-primary-marks.spec.ts +0 -186
- package/src/lib/marks/xy-marks/xy-primary-marks/xy-primary-marks.ts +0 -72
- package/src/lib/point-markers/index.ts +0 -3
- package/src/lib/point-markers/point-markers-builder.ts +0 -93
- package/src/lib/point-markers/point-markers-options.ts +0 -6
- package/src/lib/point-markers/point-markers.ts +0 -13
- package/src/lib/quantitative-rules/config/labels/quantitative-rules-labels-builder.ts +0 -162
- package/src/lib/quantitative-rules/config/labels/quantitative-rules-labels-options.ts +0 -17
- package/src/lib/quantitative-rules/config/labels/quantitative-rules-labels.ts +0 -26
- package/src/lib/quantitative-rules/config/quantitative-rules-builder.ts +0 -134
- package/src/lib/quantitative-rules/config/quantitative-rules-config.ts +0 -21
- package/src/lib/quantitative-rules/config/quantitative-rules-dimensions.ts +0 -20
- package/src/lib/quantitative-rules/config/quantitative-rules-options.ts +0 -13
- package/src/lib/quantitative-rules/index.ts +0 -6
- package/src/lib/quantitative-rules/quantitative-rules.component.scss +0 -3
- package/src/lib/quantitative-rules/quantitative-rules.component.spec.ts +0 -50
- package/src/lib/quantitative-rules/quantitative-rules.component.ts +0 -224
- package/src/lib/quantitative-rules/quantitative-rules.cy.ts +0 -549
- package/src/lib/quantitative-rules/quantitative-rules.module.ts +0 -8
- package/src/lib/stacked-area/config/stacked-area-builder.ts +0 -264
- package/src/lib/stacked-area/config/stacked-area-config.spec.ts +0 -107
- package/src/lib/stacked-area/config/stacked-area-config.ts +0 -109
- package/src/lib/stacked-area/config/stacked-area-options.ts +0 -28
- package/src/lib/stacked-area/events/actions/stacked-area-hover-move-actions.ts +0 -17
- package/src/lib/stacked-area/events/stacked-area-events.directive.spec.ts +0 -168
- package/src/lib/stacked-area/events/stacked-area-events.directive.ts +0 -272
- package/src/lib/stacked-area/events/stacked-area-interaction-output.ts +0 -33
- package/src/lib/stacked-area/events/stacked-area-tooltip-positioner.ts +0 -37
- package/src/lib/stacked-area/index.ts +0 -7
- package/src/lib/stacked-area/stacked-area.component.scss +0 -0
- package/src/lib/stacked-area/stacked-area.component.spec.ts +0 -41
- package/src/lib/stacked-area/stacked-area.component.ts +0 -241
- package/src/lib/stacked-area/stacked-area.module.ts +0 -9
- package/src/lib/stacked-bars/config/stacked-bars-builder.ts +0 -109
- package/src/lib/stacked-bars/config/stacked-bars-config.spec.ts +0 -122
- package/src/lib/stacked-bars/config/stacked-bars-config.ts +0 -79
- package/src/lib/stacked-bars/config/stacked-bars-options.ts +0 -16
- package/src/lib/stacked-bars/events/actions/stacked-bars-click-actions.ts +0 -23
- package/src/lib/stacked-bars/events/actions/stacked-bars-hover-actions.ts +0 -22
- package/src/lib/stacked-bars/events/actions/stacked-bars-hover-move-actions.ts +0 -21
- package/src/lib/stacked-bars/events/stacked-bars-events.directive.spec.ts +0 -266
- package/src/lib/stacked-bars/events/stacked-bars-events.directive.ts +0 -240
- package/src/lib/stacked-bars/index.ts +0 -10
- package/src/lib/stacked-bars/stacked-bars.component.scss +0 -0
- package/src/lib/stacked-bars/stacked-bars.component.spec.ts +0 -25
- package/src/lib/stacked-bars/stacked-bars.component.ts +0 -158
- package/src/lib/stacked-bars/stacked-bars.module.ts +0 -9
- package/src/lib/stroke/base/stroke-base-options.ts +0 -7
- package/src/lib/stroke/base/stroke-base.ts +0 -9
- package/src/lib/stroke/index.ts +0 -5
- package/src/lib/stroke/stroke-builder.ts +0 -103
- package/src/lib/stroke/stroke-options.ts +0 -5
- package/src/lib/stroke/stroke.ts +0 -12
- package/src/lib/svg-text-wrap/index.ts +0 -3
- package/src/lib/svg-text-wrap/svg-text-wrap-builder.ts +0 -105
- package/src/lib/svg-text-wrap/svg-text-wrap-options.ts +0 -8
- package/src/lib/svg-text-wrap/svg-text-wrap.ts +0 -137
- package/src/lib/testing/data/continent-population-year-data.ts +0 -126
- package/src/lib/testing/data/country-area-continent.ts +0 -59
- package/src/lib/testing/data/state-population-income-year-data.ts +0 -123
- package/src/lib/testing/stubs/bars.component.stub.ts +0 -12
- package/src/lib/testing/stubs/chart.component.stub.ts +0 -6
- package/src/lib/testing/stubs/click.directive.stub.ts +0 -15
- package/src/lib/testing/stubs/core/destroy-ref.stub.ts +0 -9
- package/src/lib/testing/stubs/core/overlay-ref.stub.ts +0 -13
- package/src/lib/testing/stubs/core/overlay.stub.ts +0 -8
- package/src/lib/testing/stubs/event.directive.stub.ts +0 -10
- package/src/lib/testing/stubs/hover-move.directive.stub.ts +0 -17
- package/src/lib/testing/stubs/hover.directive.stub.ts +0 -14
- package/src/lib/testing/stubs/input-event.directive.stub.ts +0 -9
- package/src/lib/testing/stubs/lines.component.stub.ts +0 -13
- package/src/lib/testing/stubs/map-aux-marks.stub.ts +0 -10
- package/src/lib/testing/stubs/map-chart.component.stub.ts +0 -3
- package/src/lib/testing/stubs/map-legend-content.stub.ts +0 -16
- package/src/lib/testing/stubs/map-legend.component.stub.ts +0 -10
- package/src/lib/testing/stubs/map-primary-marks.stub.ts +0 -16
- package/src/lib/testing/stubs/ordinal-axis.stub.ts +0 -18
- package/src/lib/testing/stubs/primary-marks.stub.ts +0 -18
- package/src/lib/testing/stubs/quantitative-axis.stub.ts +0 -18
- package/src/lib/testing/stubs/services/main.service.stub.ts +0 -5
- package/src/lib/testing/stubs/services/utilities.service.stub.ts +0 -7
- package/src/lib/testing/stubs/stacked-area.component.stub.ts +0 -13
- package/src/lib/testing/stubs/x-axis.stub.ts +0 -10
- package/src/lib/testing/stubs/xy-axis.class.stub.ts +0 -20
- package/src/lib/testing/stubs/xy-axis.stub.ts +0 -44
- package/src/lib/testing/stubs/xy-chart.component.stub.ts +0 -5
- package/src/lib/testing/stubs/xy-data-marks.stub.ts +0 -15
- package/src/lib/testing/stubs/y-axis.stub.ts +0 -15
- package/src/lib/tooltips/config/tooltip.ts +0 -11
- package/src/lib/tooltips/html-tooltip/config/html-tooltip-builder.ts +0 -134
- package/src/lib/tooltips/html-tooltip/config/html-tooltip-config.ts +0 -21
- package/src/lib/tooltips/html-tooltip/config/html-tooltip-options.ts +0 -12
- package/src/lib/tooltips/html-tooltip/config/position/tooltip-position-builder.ts +0 -191
- package/src/lib/tooltips/html-tooltip/config/position/tooltip-position.ts +0 -42
- package/src/lib/tooltips/html-tooltip/config/size/tooltip-size-builder.ts +0 -75
- package/src/lib/tooltips/html-tooltip/config/size/tooltip-size-options.ts +0 -8
- package/src/lib/tooltips/html-tooltip/config/size/tooltip-size.ts +0 -15
- package/src/lib/tooltips/html-tooltip/html-tooltip.directive.spec.ts +0 -537
- package/src/lib/tooltips/html-tooltip/html-tooltip.directive.ts +0 -210
- package/src/lib/tooltips/html-tooltip/html-tooltip.module.ts +0 -16
- package/src/lib/tooltips/html-tooltip/tooltip-triangle/tooltip-triangle.component.html +0 -41
- package/src/lib/tooltips/html-tooltip/tooltip-triangle/tooltip-triangle.component.scss +0 -63
- package/src/lib/tooltips/html-tooltip/tooltip-triangle/tooltip-triangle.component.ts +0 -19
- package/src/lib/tooltips/index.ts +0 -11
- package/src/lib/tooltips/svg-tooltip/config/svg-tooltip.ts +0 -5
- package/src/lib/xy-background/index.ts +0 -2
- package/src/lib/xy-background/xy-background.component.html +0 -10
- package/src/lib/xy-background/xy-background.component.scss +0 -0
- package/src/lib/xy-background/xy-background.component.spec.ts +0 -24
- package/src/lib/xy-background/xy-background.component.ts +0 -19
- package/src/lib/xy-background/xy-background.module.ts +0 -8
- package/src/public-api.ts +0 -26
- package/src/test.ts +0 -15
- package/tsconfig.doc.json +0 -4
- package/tsconfig.json +0 -20
- package/tsconfig.lib.json +0 -23
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -10
package/src/lib/axes/index.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export * from './base/config/xy-axis-builder';
|
|
2
|
-
export * from './base/config/xy-axis-config';
|
|
3
|
-
export * from './base/config/xy-axis-options';
|
|
4
|
-
export * from './base/xy-axis-base';
|
|
5
|
-
export * from './baseline/axis-baseline';
|
|
6
|
-
export * from './baseline/axis-baseline-builder';
|
|
7
|
-
export * from './baseline/axis-baseline-options';
|
|
8
|
-
export * from './grid/grid-builder';
|
|
9
|
-
export * from './grid/grid-config';
|
|
10
|
-
export * from './grid/grid-options';
|
|
11
|
-
export * from './label/axis-label';
|
|
12
|
-
export * from './label/axis-label-builder';
|
|
13
|
-
export * from './label/axis-label-options';
|
|
14
|
-
export * from './ordinal/ordinal-axis';
|
|
15
|
-
export * from './ordinal/ordinal-axis-config';
|
|
16
|
-
export * from './quantitative/quantitative-axis';
|
|
17
|
-
export * from './quantitative/quantitative-axis-config';
|
|
18
|
-
export * from './ticks/tick-wrap/tick-wrap';
|
|
19
|
-
export * from './ticks/tick-wrap/tick-wrap-builder';
|
|
20
|
-
export * from './ticks/tick-wrap/tick-wrap-options';
|
|
21
|
-
export * from './ticks/ticks';
|
|
22
|
-
export * from './ticks/ticks-builder';
|
|
23
|
-
export * from './ticks/ticks-options';
|
|
24
|
-
export * from './x/x-axis';
|
|
25
|
-
export * from './x/x-axis-config';
|
|
26
|
-
export * from './x-ordinal/x-ordinal-axis-builder';
|
|
27
|
-
export * from './x-ordinal/x-ordinal-axis-config';
|
|
28
|
-
export * from './x-ordinal/x-ordinal-axis.component';
|
|
29
|
-
export * from './x-quantitative/x-quantitative-axis-builder';
|
|
30
|
-
export * from './x-quantitative/x-quantitative-axis-config';
|
|
31
|
-
export * from './x-quantitative/x-quantitative-axis.component';
|
|
32
|
-
export * from './xy-axis.module';
|
|
33
|
-
export * from './y/y-axis';
|
|
34
|
-
export * from './y/y-axis-config';
|
|
35
|
-
export * from './y-ordinal/y-ordinal-axis-builder';
|
|
36
|
-
export * from './y-ordinal/y-ordinal-axis-config';
|
|
37
|
-
export * from './y-ordinal/y-ordinal-axis.component';
|
|
38
|
-
export * from './y-quantitative-axis/y-quantitative-axis-builder';
|
|
39
|
-
export * from './y-quantitative-axis/y-quantitative-axis-config';
|
|
40
|
-
export * from './y-quantitative-axis/y-quantitative-axis.component';
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { safeAssign } from '@mathstack/app-kit';
|
|
2
|
-
import { SvgTextWrapBuilder } from '../../svg-text-wrap/svg-text-wrap-builder';
|
|
3
|
-
import { AxisLabel } from './axis-label';
|
|
4
|
-
|
|
5
|
-
const DEFAULT = {
|
|
6
|
-
_offset: { x: 0, y: 0 },
|
|
7
|
-
_position: 'middle',
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export class AxisLabelBuilder {
|
|
11
|
-
protected _anchor: 'start' | 'middle' | 'end';
|
|
12
|
-
protected _offset: {
|
|
13
|
-
x: number;
|
|
14
|
-
y: number;
|
|
15
|
-
};
|
|
16
|
-
protected _position: 'start' | 'middle' | 'end';
|
|
17
|
-
protected _text: string;
|
|
18
|
-
protected textWrapBuilder: SvgTextWrapBuilder;
|
|
19
|
-
protected textWrapFunction: (wrap: SvgTextWrapBuilder) => void;
|
|
20
|
-
|
|
21
|
-
constructor() {
|
|
22
|
-
safeAssign(this, DEFAULT);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* OPTIONAL. The [text-anchor](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/text-anchor) for the axis label.
|
|
27
|
-
*
|
|
28
|
-
* If not provided or if called with null, the anchor will be determined by the position.
|
|
29
|
-
*
|
|
30
|
-
* @default specific to the position
|
|
31
|
-
*/
|
|
32
|
-
anchor(value: 'start' | 'middle' | 'end' | null): this {
|
|
33
|
-
if (value === null) {
|
|
34
|
-
this._anchor = undefined;
|
|
35
|
-
return this;
|
|
36
|
-
}
|
|
37
|
-
this._anchor = value;
|
|
38
|
-
return this;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* OPTIONAL. The offset for the axis label from the position that would otherwise be created. Allows for fine-tuning the position of the label.
|
|
43
|
-
*
|
|
44
|
-
* Positive y values will move the label down, positive x values will move the label to the right.
|
|
45
|
-
*
|
|
46
|
-
* If not provided or if called with null, labels parallel to the axis will be placed at the far extent of the margin. Labels perpendicular to the axis will be placed at the axis line. The latter will likely need an offset.
|
|
47
|
-
*
|
|
48
|
-
* @default { x: 0, y: 0 }
|
|
49
|
-
*/
|
|
50
|
-
offset(offset: null): this;
|
|
51
|
-
offset(offset: { x?: number; y?: number }): this;
|
|
52
|
-
offset(offset: { x?: number; y?: number } | null): this {
|
|
53
|
-
if (offset === null) {
|
|
54
|
-
this._offset = DEFAULT._offset;
|
|
55
|
-
return this;
|
|
56
|
-
}
|
|
57
|
-
this._offset = {
|
|
58
|
-
x: offset.x || 0,
|
|
59
|
-
y: offset.y || 0,
|
|
60
|
-
};
|
|
61
|
-
return this;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* OPTIONAL. The position of the axis label relative to the axis.
|
|
66
|
-
*
|
|
67
|
-
* If the axis is horizontal, the options are 'start' is left, 'middle' is center, and 'end' is right.
|
|
68
|
-
*
|
|
69
|
-
* If the axis is vertical, the options are 'start' is top, 'middle' is center, and 'end' is bottom.
|
|
70
|
-
*
|
|
71
|
-
* @default 'middle'
|
|
72
|
-
*/
|
|
73
|
-
position(value: 'start' | 'middle' | 'end'): this {
|
|
74
|
-
this._position = value;
|
|
75
|
-
return this;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* The text for the axis label.
|
|
80
|
-
*/
|
|
81
|
-
text(value: string): this {
|
|
82
|
-
this._text = value;
|
|
83
|
-
return this;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* OPTIONAL. Specifies properties for wrapping the text of the label.
|
|
88
|
-
*
|
|
89
|
-
* To unset the wrap, call with null.
|
|
90
|
-
*/
|
|
91
|
-
wrap(wrap: null): this;
|
|
92
|
-
wrap(wrap: (wrap: SvgTextWrapBuilder) => void): this;
|
|
93
|
-
wrap(wrap: ((wrap: SvgTextWrapBuilder) => void) | null): this {
|
|
94
|
-
if (wrap === null) {
|
|
95
|
-
this.textWrapFunction = undefined;
|
|
96
|
-
return this;
|
|
97
|
-
}
|
|
98
|
-
this.textWrapFunction = wrap;
|
|
99
|
-
return this;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* @internal Not meant to be called by consumers of the library.
|
|
104
|
-
*/
|
|
105
|
-
_build(dimension: 'x' | 'y'): AxisLabel {
|
|
106
|
-
if (this.textWrapFunction) this.createTextWrapBuilder(dimension);
|
|
107
|
-
return new AxisLabel({
|
|
108
|
-
anchor: this.getAnchorForDimension(dimension),
|
|
109
|
-
position: this._position,
|
|
110
|
-
offset: this._offset,
|
|
111
|
-
text: this._text,
|
|
112
|
-
wrap: this.textWrapBuilder?.build(),
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
private createTextWrapBuilder(dimension: 'x' | 'y'): void {
|
|
117
|
-
this.textWrapBuilder = new SvgTextWrapBuilder();
|
|
118
|
-
const isRotatedYLabel = dimension === 'y' && this._position === 'middle';
|
|
119
|
-
// set defaults but let user override setting defaults before calling wrap function
|
|
120
|
-
if (isRotatedYLabel) {
|
|
121
|
-
this.textWrapBuilder.maintainXPosition(false);
|
|
122
|
-
this.textWrapBuilder.maintainYPosition(true);
|
|
123
|
-
}
|
|
124
|
-
this.textWrapFunction(this.textWrapBuilder);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
private getAnchorForDimension(
|
|
128
|
-
dimension: 'x' | 'y'
|
|
129
|
-
): 'start' | 'middle' | 'end' {
|
|
130
|
-
if (this._anchor) return this._anchor;
|
|
131
|
-
switch (this._position) {
|
|
132
|
-
case 'start':
|
|
133
|
-
return dimension === 'x' ? 'start' : 'end';
|
|
134
|
-
case 'middle':
|
|
135
|
-
return 'middle';
|
|
136
|
-
case 'end':
|
|
137
|
-
return 'end';
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { safeAssign } from '@mathstack/app-kit';
|
|
2
|
-
import { SvgTextWrap } from '../../svg-text-wrap';
|
|
3
|
-
import { AxisLabelOptions } from './axis-label-options';
|
|
4
|
-
|
|
5
|
-
export class AxisLabel implements AxisLabelOptions {
|
|
6
|
-
anchor: 'start' | 'middle' | 'end';
|
|
7
|
-
offset: {
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
};
|
|
11
|
-
position: 'start' | 'middle' | 'end';
|
|
12
|
-
text: string;
|
|
13
|
-
wrap: SvgTextWrap;
|
|
14
|
-
|
|
15
|
-
constructor(options: AxisLabelOptions) {
|
|
16
|
-
safeAssign(this, options);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @angular-eslint/prefer-standalone */
|
|
2
|
-
import { Component, Input } from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
ChartConfig,
|
|
5
|
-
LinesConfig,
|
|
6
|
-
VicChartConfigBuilder,
|
|
7
|
-
VicChartModule,
|
|
8
|
-
VicLinesConfigBuilder,
|
|
9
|
-
VicLinesModule,
|
|
10
|
-
VicXQuantitativeAxisConfig,
|
|
11
|
-
VicXQuantitativeAxisConfigBuilder,
|
|
12
|
-
VicXyAxisModule,
|
|
13
|
-
VicXyBackgroundModule,
|
|
14
|
-
VicYQuantitativeAxisConfig,
|
|
15
|
-
VicYQuantitativeAxisConfigBuilder,
|
|
16
|
-
} from '@mathstack/viz';
|
|
17
|
-
import { beforeEach, cy, describe, expect, it } from 'local-cypress';
|
|
18
|
-
import {
|
|
19
|
-
ContinentPopulationNumYearData,
|
|
20
|
-
ContinentPopulationNumYearDatum,
|
|
21
|
-
} from '../../testing/data/continent-population-year-data';
|
|
22
|
-
|
|
23
|
-
// Cypress will get the tick elements before d3 has set the text value of the elements,
|
|
24
|
-
// because d3 creates the elements and sets the text value in a transition).
|
|
25
|
-
// This wait time is necessary to ensure that the text value of the tick elements has been set by d3.
|
|
26
|
-
const axisTickTextWaitTime = 1000;
|
|
27
|
-
|
|
28
|
-
const margin = { top: 60, right: 20, bottom: 40, left: 80 };
|
|
29
|
-
const chartHeight = 400;
|
|
30
|
-
const chartWidth = 600;
|
|
31
|
-
const data = ContinentPopulationNumYearData;
|
|
32
|
-
@Component({
|
|
33
|
-
selector: 'vic-test-axis-labels',
|
|
34
|
-
template: `
|
|
35
|
-
<vic-xy-chart [config]="chartConfig">
|
|
36
|
-
<ng-container svg-elements>
|
|
37
|
-
<svg:g vic-xy-background></svg:g>
|
|
38
|
-
<svg:g
|
|
39
|
-
vic-x-quantitative-axis
|
|
40
|
-
[config]="xQuantitativeAxisConfig"
|
|
41
|
-
></svg:g>
|
|
42
|
-
<svg:g
|
|
43
|
-
vic-y-quantitative-axis
|
|
44
|
-
[config]="yQuantitativeAxisConfig"
|
|
45
|
-
></svg:g>
|
|
46
|
-
<svg:g vic-primary-marks-lines [config]="linesConfig"></svg:g>
|
|
47
|
-
</ng-container>
|
|
48
|
-
</vic-xy-chart>
|
|
49
|
-
`,
|
|
50
|
-
styles: [],
|
|
51
|
-
imports: [
|
|
52
|
-
VicChartModule,
|
|
53
|
-
VicLinesModule,
|
|
54
|
-
VicXyAxisModule,
|
|
55
|
-
VicXyBackgroundModule,
|
|
56
|
-
],
|
|
57
|
-
})
|
|
58
|
-
class TestAxisLabelsComponent<Datum> {
|
|
59
|
-
@Input() linesConfig: LinesConfig<Datum>;
|
|
60
|
-
@Input() yQuantitativeAxisConfig: VicYQuantitativeAxisConfig<number>;
|
|
61
|
-
@Input() xQuantitativeAxisConfig: VicXQuantitativeAxisConfig<number>;
|
|
62
|
-
chartConfig: ChartConfig = new VicChartConfigBuilder()
|
|
63
|
-
.maxHeight(chartHeight)
|
|
64
|
-
.maxWidth(chartWidth)
|
|
65
|
-
.margin(margin)
|
|
66
|
-
.scalingStrategy('responsive-width')
|
|
67
|
-
.getConfig();
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function mountAxisLabelsComponent(
|
|
71
|
-
xAxisConfig: VicXQuantitativeAxisConfig<number>,
|
|
72
|
-
yAxisConfig: VicYQuantitativeAxisConfig<number>
|
|
73
|
-
): void {
|
|
74
|
-
const linesConfig =
|
|
75
|
-
new VicLinesConfigBuilder<ContinentPopulationNumYearDatum>()
|
|
76
|
-
.data(data)
|
|
77
|
-
.xNumeric((dimension) =>
|
|
78
|
-
dimension.valueAccessor((d) => d.year).includeZeroInDomain(false)
|
|
79
|
-
)
|
|
80
|
-
.y((y) => y.valueAccessor((d) => d.population))
|
|
81
|
-
.stroke((stroke) =>
|
|
82
|
-
stroke.color((color) => color.valueAccessor((d) => d.continent))
|
|
83
|
-
)
|
|
84
|
-
.getConfig();
|
|
85
|
-
|
|
86
|
-
cy.mount(TestAxisLabelsComponent<ContinentPopulationNumYearDatum>, {
|
|
87
|
-
componentProperties: {
|
|
88
|
-
linesConfig: linesConfig,
|
|
89
|
-
xQuantitativeAxisConfig: xAxisConfig,
|
|
90
|
-
yQuantitativeAxisConfig: yAxisConfig,
|
|
91
|
-
},
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// ***********************************************************
|
|
96
|
-
// Test that axis labels are visible when various basic config values are used - no custom offsets
|
|
97
|
-
// ***********************************************************
|
|
98
|
-
describe('It creates axis labels that are visible when default values are used', () => {
|
|
99
|
-
beforeEach(() => {
|
|
100
|
-
const xAxisConfig = new VicXQuantitativeAxisConfigBuilder<number>()
|
|
101
|
-
.ticks((ticks) => ticks.format('.0f'))
|
|
102
|
-
.label((label) => label.text('Year'))
|
|
103
|
-
.getConfig();
|
|
104
|
-
const yAxisConfig = new VicYQuantitativeAxisConfigBuilder<number>()
|
|
105
|
-
.label((label) => label.text('Population'))
|
|
106
|
-
.ticks((ticks) => ticks.format('.2s'))
|
|
107
|
-
.getConfig();
|
|
108
|
-
mountAxisLabelsComponent(xAxisConfig, yAxisConfig);
|
|
109
|
-
cy.wait(axisTickTextWaitTime);
|
|
110
|
-
});
|
|
111
|
-
it('should have visible x and y axis labels that are centered on axes', () => {
|
|
112
|
-
cy.get('.vic-axis-x-quantitative .vic-axis-label').should(
|
|
113
|
-
'have.text',
|
|
114
|
-
'Year'
|
|
115
|
-
);
|
|
116
|
-
cy.get('.vic-axis-y-quantitative .vic-axis-label').should(
|
|
117
|
-
'have.text',
|
|
118
|
-
'Population'
|
|
119
|
-
);
|
|
120
|
-
cy.get<SVGGElement>('.vic-xy-background').then((chartBackground) => {
|
|
121
|
-
const chartRect = chartBackground[0].getBBox();
|
|
122
|
-
cy.get<SVGTextElement>('.vic-axis-x-quantitative .vic-axis-label').then(
|
|
123
|
-
(xAxisLabel) => {
|
|
124
|
-
const textRect = xAxisLabel[0].getBoundingClientRect();
|
|
125
|
-
expect(
|
|
126
|
-
textRect.left + (textRect.right - textRect.left) / 2
|
|
127
|
-
).to.be.closeTo(margin.left + chartRect.width / 2, 4);
|
|
128
|
-
}
|
|
129
|
-
);
|
|
130
|
-
cy.get<SVGTextElement>('.vic-axis-y-quantitative .vic-axis-label').then(
|
|
131
|
-
(yAxisLabel) => {
|
|
132
|
-
const textRect = yAxisLabel[0].getBoundingClientRect();
|
|
133
|
-
expect(
|
|
134
|
-
textRect.top + (textRect.bottom - textRect.top) / 2
|
|
135
|
-
).to.be.closeTo(margin.top + chartRect.height / 2, 4);
|
|
136
|
-
}
|
|
137
|
-
);
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
describe('It creates axis labels that correctly positioned when positions are start', () => {
|
|
143
|
-
beforeEach(() => {
|
|
144
|
-
const xAxisConfig = new VicXQuantitativeAxisConfigBuilder<number>()
|
|
145
|
-
.ticks((ticks) => ticks.format('.0f'))
|
|
146
|
-
.label((label) => label.text('Year').position('start'))
|
|
147
|
-
.getConfig();
|
|
148
|
-
const yAxisConfig = new VicYQuantitativeAxisConfigBuilder<number>()
|
|
149
|
-
.label((label) => label.text('Population').position('start'))
|
|
150
|
-
.ticks((ticks) => ticks.format('.2s'))
|
|
151
|
-
.getConfig();
|
|
152
|
-
mountAxisLabelsComponent(xAxisConfig, yAxisConfig);
|
|
153
|
-
cy.wait(axisTickTextWaitTime);
|
|
154
|
-
});
|
|
155
|
-
it('should have visible x and y axis labels that are at the leading edge of axes', () => {
|
|
156
|
-
cy.get<SVGGElement>('.vic-xy-background').then(() => {
|
|
157
|
-
cy.get<SVGTextElement>('.vic-axis-x-quantitative .vic-axis-label').then(
|
|
158
|
-
(xAxisLabel) => {
|
|
159
|
-
const textRect = xAxisLabel[0].getBoundingClientRect();
|
|
160
|
-
expect(textRect.left).to.be.closeTo(margin.left, 4);
|
|
161
|
-
}
|
|
162
|
-
);
|
|
163
|
-
cy.get<SVGTextElement>('.vic-axis-y-quantitative .vic-axis-label').then(
|
|
164
|
-
(yAxisLabel) => {
|
|
165
|
-
const textRect = yAxisLabel[0].getBoundingClientRect();
|
|
166
|
-
expect(textRect.bottom).to.be.closeTo(margin.top, 4);
|
|
167
|
-
}
|
|
168
|
-
);
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
describe('It creates axis labels that are correctly positioned when positions are end', () => {
|
|
174
|
-
beforeEach(() => {
|
|
175
|
-
const xAxisConfig = new VicXQuantitativeAxisConfigBuilder<number>()
|
|
176
|
-
.ticks((ticks) => ticks.format('.0f'))
|
|
177
|
-
.label((label) => label.text('Year').position('end'))
|
|
178
|
-
.getConfig();
|
|
179
|
-
const yAxisConfig = new VicYQuantitativeAxisConfigBuilder<number>()
|
|
180
|
-
.label((label) => label.text('Population').position('end'))
|
|
181
|
-
.ticks((ticks) => ticks.format('.2s'))
|
|
182
|
-
.getConfig();
|
|
183
|
-
mountAxisLabelsComponent(xAxisConfig, yAxisConfig);
|
|
184
|
-
cy.wait(axisTickTextWaitTime);
|
|
185
|
-
});
|
|
186
|
-
it('should have visible x and y axis labels that are at the trailing edge of axes', () => {
|
|
187
|
-
cy.get<SVGGElement>('.vic-xy-background').then((chartBackground) => {
|
|
188
|
-
const chartRect = chartBackground[0].getBoundingClientRect();
|
|
189
|
-
cy.get<SVGTextElement>('.vic-axis-x-quantitative .vic-axis-label').then(
|
|
190
|
-
(xAxisLabel) => {
|
|
191
|
-
const textRect = xAxisLabel[0].getBoundingClientRect();
|
|
192
|
-
expect(textRect.right).to.be.closeTo(chartRect.right, 4);
|
|
193
|
-
}
|
|
194
|
-
);
|
|
195
|
-
cy.get<SVGTextElement>('.vic-axis-y-quantitative .vic-axis-label').then(
|
|
196
|
-
(yAxisLabel) => {
|
|
197
|
-
const textRect = yAxisLabel[0].getBoundingClientRect();
|
|
198
|
-
expect(textRect.bottom).to.be.closeTo(chartRect.bottom, 4);
|
|
199
|
-
}
|
|
200
|
-
);
|
|
201
|
-
});
|
|
202
|
-
});
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
// ***********************************************************
|
|
206
|
-
// Test that axis labels correctly wrap - brittle tests but better than nothing
|
|
207
|
-
// ***********************************************************
|
|
208
|
-
describe('It creates axis labels that are visible when default values are used', () => {
|
|
209
|
-
const wrapWidth = 160;
|
|
210
|
-
beforeEach(() => {
|
|
211
|
-
const xAxisConfig = new VicXQuantitativeAxisConfigBuilder<number>()
|
|
212
|
-
.ticks((ticks) => ticks.format('.0f'))
|
|
213
|
-
.label((label) =>
|
|
214
|
-
label
|
|
215
|
-
.text('Years in which Mathematica operated')
|
|
216
|
-
.wrap((wrap) => wrap.width(wrapWidth))
|
|
217
|
-
)
|
|
218
|
-
.getConfig();
|
|
219
|
-
const yAxisConfig = new VicYQuantitativeAxisConfigBuilder<number>()
|
|
220
|
-
.label((label) =>
|
|
221
|
-
label
|
|
222
|
-
.text(
|
|
223
|
-
'Number of spectacular components tests Mathematica has written as part of frontend work'
|
|
224
|
-
)
|
|
225
|
-
.wrap((wrap) => wrap.width(wrapWidth))
|
|
226
|
-
)
|
|
227
|
-
.ticks((ticks) => ticks.format('.2s'))
|
|
228
|
-
.getConfig();
|
|
229
|
-
mountAxisLabelsComponent(xAxisConfig, yAxisConfig);
|
|
230
|
-
cy.wait(axisTickTextWaitTime);
|
|
231
|
-
});
|
|
232
|
-
it('should have visible x and y axis labels that are correctly wrapped and centered on axes', () => {
|
|
233
|
-
// Ensure that there are multiple tspan elements created for each label.
|
|
234
|
-
cy.get('.vic-axis-x-quantitative .vic-axis-label tspan').should(
|
|
235
|
-
'have.length',
|
|
236
|
-
2
|
|
237
|
-
);
|
|
238
|
-
cy.get('.vic-axis-y-quantitative .vic-axis-label tspan').should(
|
|
239
|
-
'have.length',
|
|
240
|
-
3
|
|
241
|
-
);
|
|
242
|
-
|
|
243
|
-
// Ensure each line is offset vertically.
|
|
244
|
-
cy.get('.vic-axis-x-quantitative .vic-axis-label tspan').then((spans) => {
|
|
245
|
-
const dyValues = Array.from(spans).map((span) => span.getAttribute('dy'));
|
|
246
|
-
expect(new Set(dyValues).size).to.equal(2);
|
|
247
|
-
});
|
|
248
|
-
cy.get('.vic-axis-y-quantitative .vic-axis-label tspan').then((spans) => {
|
|
249
|
-
const dyValues = Array.from(spans).map((span) => span.getAttribute('dy'));
|
|
250
|
-
expect(new Set(dyValues).size).to.equal(3);
|
|
251
|
-
});
|
|
252
|
-
|
|
253
|
-
// dy values are evenly spaced
|
|
254
|
-
cy.get('.vic-axis-y-quantitative .vic-axis-label tspan').then((spans) => {
|
|
255
|
-
const dyValues = Array.from(spans).map((span) => span.getAttribute('dy'));
|
|
256
|
-
const differences = dyValues.reduce((acc, val, i) => {
|
|
257
|
-
if (i === 0) return acc;
|
|
258
|
-
const diff =
|
|
259
|
-
parseFloat(val || '0') - parseFloat(dyValues[i - 1] || '0');
|
|
260
|
-
const diffRoundedToPointOne = Math.round(diff * 10) / 10;
|
|
261
|
-
acc.push(diffRoundedToPointOne);
|
|
262
|
-
return acc;
|
|
263
|
-
}, []);
|
|
264
|
-
expect(new Set(differences).size).to.equal(1);
|
|
265
|
-
});
|
|
266
|
-
|
|
267
|
-
// Ensure that the overall width of the label is less than or equal to the wrap width.
|
|
268
|
-
cy.get('.vic-axis-x-quantitative .vic-axis-label')
|
|
269
|
-
.invoke('width')
|
|
270
|
-
.should('be.lte', wrapWidth);
|
|
271
|
-
cy.get('.vic-axis-y-quantitative .vic-axis-label')
|
|
272
|
-
.invoke('width')
|
|
273
|
-
.should('be.lte', wrapWidth);
|
|
274
|
-
|
|
275
|
-
// Ensure that the label text is split across multiple lines.
|
|
276
|
-
cy.get('.vic-axis-x-quantitative .vic-axis-label tspan').each(($span) => {
|
|
277
|
-
expect($span.text().length).to.be.greaterThan(0);
|
|
278
|
-
});
|
|
279
|
-
cy.get('.vic-axis-y-quantitative .vic-axis-label tspan').each(($span) => {
|
|
280
|
-
expect($span.text().length).to.be.greaterThan(0);
|
|
281
|
-
});
|
|
282
|
-
|
|
283
|
-
cy.get<SVGGElement>('.vic-xy-background').then((chartBackground) => {
|
|
284
|
-
const chartRect = chartBackground[0].getBBox();
|
|
285
|
-
cy.get<SVGTextElement>('.vic-axis-x-quantitative .vic-axis-label').then(
|
|
286
|
-
(xAxisLabel) => {
|
|
287
|
-
const textRect = xAxisLabel[0].getBoundingClientRect();
|
|
288
|
-
expect(
|
|
289
|
-
textRect.left + (textRect.right - textRect.left) / 2
|
|
290
|
-
).to.be.closeTo(margin.left + chartRect.width / 2, 4);
|
|
291
|
-
}
|
|
292
|
-
);
|
|
293
|
-
cy.get<SVGTextElement>('.vic-axis-y-quantitative .vic-axis-label').then(
|
|
294
|
-
(yAxisLabel) => {
|
|
295
|
-
const textRect = yAxisLabel[0].getBoundingClientRect();
|
|
296
|
-
expect(
|
|
297
|
-
textRect.top + (textRect.bottom - textRect.top) / 2
|
|
298
|
-
).to.be.closeTo(margin.top + chartRect.height / 2, 4);
|
|
299
|
-
}
|
|
300
|
-
);
|
|
301
|
-
});
|
|
302
|
-
});
|
|
303
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { safeAssign } from '@mathstack/app-kit';
|
|
2
|
-
import { AbstractConstructor } from '../../core/common-behaviors/constructor';
|
|
3
|
-
import { DataValue } from '../../core/types/values';
|
|
4
|
-
import { XyAxisConfig } from '../base/config/xy-axis-config';
|
|
5
|
-
import { XyAxisBaseOptions } from '../base/config/xy-axis-options';
|
|
6
|
-
import { Ticks } from '../ticks/ticks';
|
|
7
|
-
import { TicksOptions } from '../ticks/ticks-options';
|
|
8
|
-
|
|
9
|
-
export interface VicOrdinalAxisOptions<
|
|
10
|
-
Tick extends DataValue,
|
|
11
|
-
> extends XyAxisBaseOptions {
|
|
12
|
-
ticks: TicksOptions<Tick>;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function mixinOrdinalAxisConfig<
|
|
16
|
-
Tick extends DataValue,
|
|
17
|
-
T extends AbstractConstructor<XyAxisConfig<Tick, Ticks<Tick>>>,
|
|
18
|
-
>(Base: T) {
|
|
19
|
-
abstract class Mixin extends Base implements VicOrdinalAxisOptions<Tick> {
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
-
constructor(...args: any[]) {
|
|
22
|
-
super(...args);
|
|
23
|
-
safeAssign(this, args[0]);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return Mixin;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export abstract class VicOrdinalAxisConfig<
|
|
30
|
-
Tick extends DataValue,
|
|
31
|
-
> extends mixinOrdinalAxisConfig(XyAxisConfig)<Tick, Ticks<Tick>> {}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import { ElementRef } from '@angular/core';
|
|
3
|
-
import { TestBed } from '@angular/core/testing';
|
|
4
|
-
import { XyChartComponent } from '@mathstack/viz';
|
|
5
|
-
import { OrdinalAxisStub } from '../../testing/stubs/ordinal-axis.stub';
|
|
6
|
-
|
|
7
|
-
describe('the OrdinalAxis mixin', () => {
|
|
8
|
-
let abstractClass: OrdinalAxisStub<string>;
|
|
9
|
-
const mockElementRef = {
|
|
10
|
-
nativeElement: {
|
|
11
|
-
querySelector: jasmine.createSpy('querySelector'),
|
|
12
|
-
style: {},
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
TestBed.configureTestingModule({
|
|
18
|
-
providers: [
|
|
19
|
-
OrdinalAxisStub,
|
|
20
|
-
XyChartComponent,
|
|
21
|
-
{ provide: ElementRef, useValue: mockElementRef },
|
|
22
|
-
],
|
|
23
|
-
});
|
|
24
|
-
abstractClass = TestBed.inject(OrdinalAxisStub);
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it('should be created', () => {
|
|
28
|
-
expect(abstractClass).toBeTruthy();
|
|
29
|
-
});
|
|
30
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { format, utcFormat } from 'd3';
|
|
2
|
-
import { AbstractConstructor } from '../../core/common-behaviors/constructor';
|
|
3
|
-
import { DataValue } from '../../core/types/values';
|
|
4
|
-
import { XyAxis } from '../base/xy-axis-base';
|
|
5
|
-
import { Ticks } from '../ticks/ticks';
|
|
6
|
-
import { VicOrdinalAxisConfig as OrdinalAxisConfig } from './ordinal-axis-config';
|
|
7
|
-
|
|
8
|
-
export function ordinalAxisMixin<
|
|
9
|
-
Tick extends DataValue,
|
|
10
|
-
T extends AbstractConstructor<XyAxis<Tick, Ticks<Tick>>>,
|
|
11
|
-
>(Base: T) {
|
|
12
|
-
abstract class Mixin extends Base {
|
|
13
|
-
override config: OrdinalAxisConfig<Tick>;
|
|
14
|
-
|
|
15
|
-
setTicks(tickFormat: string | ((value: Tick) => string)): void {
|
|
16
|
-
this.axis.tickFormat((d) => {
|
|
17
|
-
const formatter = d instanceof Date ? utcFormat : format;
|
|
18
|
-
return typeof tickFormat === 'function'
|
|
19
|
-
? tickFormat(d)
|
|
20
|
-
: formatter(tickFormat)(d);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return Mixin;
|
|
26
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { safeAssign } from '@mathstack/app-kit';
|
|
2
|
-
import { AbstractConstructor } from '../../core/common-behaviors/constructor';
|
|
3
|
-
import { ContinuousValue } from '../../core/types/values';
|
|
4
|
-
import { XyAxisConfig } from '../base/config/xy-axis-config';
|
|
5
|
-
import { XyAxisBaseOptions } from '../base/config/xy-axis-options';
|
|
6
|
-
import { QuantitativeTicks } from '../ticks/ticks';
|
|
7
|
-
import { QuantitativeTicksOptions } from '../ticks/ticks-options';
|
|
8
|
-
|
|
9
|
-
export interface VicQuantitativeAxisOptions<
|
|
10
|
-
Tick extends ContinuousValue,
|
|
11
|
-
> extends XyAxisBaseOptions {
|
|
12
|
-
ticks: QuantitativeTicksOptions<Tick>;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function mixinQuantitativeAxisConfig<
|
|
16
|
-
Tick extends ContinuousValue,
|
|
17
|
-
T extends AbstractConstructor<XyAxisConfig<Tick, QuantitativeTicks<Tick>>>,
|
|
18
|
-
>(Base: T) {
|
|
19
|
-
abstract class Mixin
|
|
20
|
-
extends Base
|
|
21
|
-
implements VicQuantitativeAxisOptions<Tick>
|
|
22
|
-
{
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
|
-
constructor(...args: any[]) {
|
|
25
|
-
super(...args);
|
|
26
|
-
if (args.length > 0) {
|
|
27
|
-
safeAssign(this, args[0]);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return Mixin;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export abstract class VicQuantitativeAxisConfig<
|
|
35
|
-
Tick extends ContinuousValue,
|
|
36
|
-
> extends mixinQuantitativeAxisConfig(XyAxisConfig)<
|
|
37
|
-
Tick,
|
|
38
|
-
QuantitativeTicks<Tick>
|
|
39
|
-
> {}
|