@mathstack/viz 2.1.0 → 2.2.1
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/LICENSE +21 -21
- package/README.md +11 -11
- package/fesm2022/mathstack-viz.mjs +11024 -0
- package/fesm2022/mathstack-viz.mjs.map +1 -0
- package/package.json +18 -6
- 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 -305
- 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
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
import 'cypress-real-events';
|
|
3
|
-
import type { RealClickOptions } from 'cypress-real-events/commands/realClick';
|
|
4
|
-
import type { RealHoverOptions } from 'cypress-real-events/commands/realHover';
|
|
5
|
-
import type { RealPressOptions } from 'cypress-real-events/commands/realPress';
|
|
6
|
-
import type { keyCodeDefinitions } from 'cypress-real-events/keyCodeDefinitions';
|
|
7
|
-
|
|
8
|
-
// ***********************************************
|
|
9
|
-
// This example commands.ts shows you how to
|
|
10
|
-
// create various custom commands and overwrite
|
|
11
|
-
// existing commands.
|
|
12
|
-
//
|
|
13
|
-
// For more comprehensive examples of custom
|
|
14
|
-
// commands please read more here:
|
|
15
|
-
// https://on.cypress.io/custom-commands
|
|
16
|
-
// ***********************************************
|
|
17
|
-
|
|
18
|
-
declare const Cypress: Cypress.Cypress;
|
|
19
|
-
declare const cy: Cypress.cy;
|
|
20
|
-
|
|
21
|
-
type Key = keyof typeof keyCodeDefinitions;
|
|
22
|
-
type KeyOrShortcut = Key | Array<Key>;
|
|
23
|
-
|
|
24
|
-
declare global {
|
|
25
|
-
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
26
|
-
namespace Cypress {
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28
|
-
interface Chainable<Subject = any> {
|
|
29
|
-
/**
|
|
30
|
-
* Performs a real click and waits for Angular change detection.
|
|
31
|
-
* Use this instead of realClick() in Angular tests.
|
|
32
|
-
* @example cy.get('.button').realClickAndWait()
|
|
33
|
-
*/
|
|
34
|
-
realClickAndWait(options?: RealClickOptions): Chainable<Subject>;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Performs a real hover and waits for Angular change detection.
|
|
38
|
-
* Use this instead of realHover() in Angular tests.
|
|
39
|
-
* @example cy.get('.element').realHoverAndWait()
|
|
40
|
-
*/
|
|
41
|
-
realHoverAndWait(options?: RealHoverOptions): Chainable<Subject>;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Performs a real key press and waits for Angular change detection.
|
|
45
|
-
* Use this instead of realPress() in Angular tests.
|
|
46
|
-
* @example cy.realPressAndWait('Tab')
|
|
47
|
-
*/
|
|
48
|
-
realPressAndWait(
|
|
49
|
-
keyOrShortcut: KeyOrShortcut,
|
|
50
|
-
options?: RealPressOptions
|
|
51
|
-
): Chainable<Subject>;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Custom command that wraps realClick with automatic Angular change detection wait.
|
|
58
|
-
* This ensures observables have time to emit and async pipes update the DOM
|
|
59
|
-
* after interactions with Angular 21's new control flow.
|
|
60
|
-
*/
|
|
61
|
-
Cypress.Commands.add(
|
|
62
|
-
'realClickAndWait',
|
|
63
|
-
{ prevSubject: 'element' },
|
|
64
|
-
function (subject, options) {
|
|
65
|
-
cy.wrap(subject).realClick(options);
|
|
66
|
-
return cy.wait(500).then(() => subject);
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Custom command that wraps realHover with automatic Angular change detection wait.
|
|
72
|
-
* This ensures observables have time to emit and async pipes update the DOM
|
|
73
|
-
* after hover interactions with Angular 21's new control flow.
|
|
74
|
-
*/
|
|
75
|
-
Cypress.Commands.add(
|
|
76
|
-
'realHoverAndWait',
|
|
77
|
-
{ prevSubject: 'element' },
|
|
78
|
-
function (subject, options) {
|
|
79
|
-
cy.wrap(subject).realHover(options);
|
|
80
|
-
return cy.wait(500).then(() => subject);
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Custom command that wraps realPress with automatic Angular change detection wait.
|
|
86
|
-
* This ensures observables have time to emit and async pipes update the DOM
|
|
87
|
-
* after keyboard interactions with Angular 21's new control flow.
|
|
88
|
-
*/
|
|
89
|
-
Cypress.Commands.add('realPressAndWait', function (keyOrShortcut, options) {
|
|
90
|
-
cy.realPress(keyOrShortcut, options);
|
|
91
|
-
return cy.wait(500);
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
//
|
|
95
|
-
// -- This is a child command --
|
|
96
|
-
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
// -- This is a dual command --
|
|
100
|
-
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
// -- This will overwrite an existing command --
|
|
104
|
-
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
-
<title>viz Components App</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div data-cy-root></div>
|
|
11
|
-
</body>
|
|
12
|
-
</html>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { mount } from 'cypress/angular';
|
|
2
|
-
// ***********************************************************
|
|
3
|
-
// This example support/component.ts is processed and
|
|
4
|
-
// loaded automatically before your test files.
|
|
5
|
-
//
|
|
6
|
-
// This is a great place to put global configuration and
|
|
7
|
-
// behavior that modifies Cypress.
|
|
8
|
-
//
|
|
9
|
-
// You can change the location of this file or turn off
|
|
10
|
-
// automatically serving support files with the
|
|
11
|
-
// 'supportFile' configuration option.
|
|
12
|
-
//
|
|
13
|
-
// You can read more here:
|
|
14
|
-
// https://on.cypress.io/configuration
|
|
15
|
-
// ***********************************************************
|
|
16
|
-
|
|
17
|
-
// Import commands.ts using ES2015 syntax:
|
|
18
|
-
import './commands';
|
|
19
|
-
|
|
20
|
-
// add component testing only related command here, such as mount
|
|
21
|
-
declare global {
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
23
|
-
namespace Cypress {
|
|
24
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
25
|
-
interface Chainable<Subject> {
|
|
26
|
-
mount: typeof mount;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
declare const Cypress: Cypress.Cypress;
|
|
32
|
-
|
|
33
|
-
Cypress.Commands.add('mount', mount);
|
package/cypress.config.ts
DELETED
package/karma.conf.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
// Karma configuration file, see link for more information
|
|
2
|
-
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
3
|
-
|
|
4
|
-
module.exports = function (config) {
|
|
5
|
-
config.set({
|
|
6
|
-
basePath: '',
|
|
7
|
-
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
8
|
-
plugins: [
|
|
9
|
-
require('karma-jasmine'),
|
|
10
|
-
require('karma-chrome-launcher'),
|
|
11
|
-
require('karma-jasmine-html-reporter'),
|
|
12
|
-
require('karma-coverage'),
|
|
13
|
-
require('karma-junit-reporter'),
|
|
14
|
-
require('@angular-devkit/build-angular/plugins/karma'),
|
|
15
|
-
],
|
|
16
|
-
client: {
|
|
17
|
-
jasmine: {
|
|
18
|
-
// you can add configuration options for Jasmine here
|
|
19
|
-
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
20
|
-
// for example, you can disable the random execution with `random: false`
|
|
21
|
-
// or set a specific seed with `seed: 4321`
|
|
22
|
-
},
|
|
23
|
-
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
24
|
-
},
|
|
25
|
-
jasmineHtmlReporter: {
|
|
26
|
-
suppressAll: true, // removes the duplicated traces
|
|
27
|
-
},
|
|
28
|
-
junitReporter: {
|
|
29
|
-
outputFile: 'test-results.xml',
|
|
30
|
-
useBrowserName: false,
|
|
31
|
-
},
|
|
32
|
-
coverageReporter: {
|
|
33
|
-
dir: require('path').join(__dirname, '../../coverage/viz'),
|
|
34
|
-
subdir: '.',
|
|
35
|
-
reporters: [
|
|
36
|
-
{ type: 'html' },
|
|
37
|
-
{ type: 'text-summary' },
|
|
38
|
-
{ type: 'cobertura', subdir: '.', file: 'cobertura.xml' },
|
|
39
|
-
],
|
|
40
|
-
},
|
|
41
|
-
reporters: ['progress', 'kjhtml', 'junit'],
|
|
42
|
-
port: 9876,
|
|
43
|
-
colors: true,
|
|
44
|
-
logLevel: config.LOG_INFO,
|
|
45
|
-
autoWatch: true,
|
|
46
|
-
browsers: ['ChromeHeadlessNoSandbox', 'Chrome'],
|
|
47
|
-
customLaunchers: {
|
|
48
|
-
ChromeHeadlessNoSandbox: {
|
|
49
|
-
base: 'ChromeHeadless',
|
|
50
|
-
flags: [
|
|
51
|
-
'--headless',
|
|
52
|
-
'--no-sandbox',
|
|
53
|
-
'--password-store=basic',
|
|
54
|
-
'--enable-logging',
|
|
55
|
-
'--v=1',
|
|
56
|
-
],
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
singleRun: false,
|
|
60
|
-
restartOnFileChange: true,
|
|
61
|
-
});
|
|
62
|
-
};
|
package/ng-package.json
DELETED
package/project.json
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "viz",
|
|
3
|
-
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
-
"projectType": "library",
|
|
5
|
-
"sourceRoot": "libs/viz/src",
|
|
6
|
-
"prefix": "vic",
|
|
7
|
-
"generators": {
|
|
8
|
-
"@schematics/angular:component": {
|
|
9
|
-
"style": "scss"
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
"targets": {
|
|
13
|
-
"build": {
|
|
14
|
-
"executor": "@angular-devkit/build-angular:ng-packagr",
|
|
15
|
-
"options": {
|
|
16
|
-
"project": "libs/viz/ng-package.json"
|
|
17
|
-
},
|
|
18
|
-
"configurations": {
|
|
19
|
-
"production": {
|
|
20
|
-
"tsConfig": "libs/viz/tsconfig.lib.prod.json"
|
|
21
|
-
},
|
|
22
|
-
"development": {
|
|
23
|
-
"tsConfig": "libs/viz/tsconfig.lib.json"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"defaultConfiguration": "production",
|
|
27
|
-
"outputs": ["{workspaceRoot}/dist/viz"]
|
|
28
|
-
},
|
|
29
|
-
"build-release": {
|
|
30
|
-
"executor": "nx:run-commands",
|
|
31
|
-
"options": {
|
|
32
|
-
"command": "npx nx build viz"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"publish": {
|
|
36
|
-
"executor": "nx:run-commands",
|
|
37
|
-
"options": {
|
|
38
|
-
"command": "cd ./dist/viz && npm publish --access public && git push --tags"
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"github-release": {
|
|
42
|
-
"executor": "@jscutlery/semver:github",
|
|
43
|
-
"options": {
|
|
44
|
-
"tag": "{tag}",
|
|
45
|
-
"notes": "{notes}"
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
"test": {
|
|
49
|
-
"executor": "@angular-devkit/build-angular:karma",
|
|
50
|
-
"options": {
|
|
51
|
-
"main": "libs/viz/src/test.ts",
|
|
52
|
-
"tsConfig": "libs/viz/tsconfig.spec.json",
|
|
53
|
-
"karmaConfig": "libs/viz/karma.conf.js",
|
|
54
|
-
"browsers": "ChromeHeadlessNoSandbox",
|
|
55
|
-
"watch": false
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"lint": {
|
|
59
|
-
"executor": "@angular-eslint/builder:lint",
|
|
60
|
-
"options": {
|
|
61
|
-
"lintFilePatterns": ["libs/viz/**/*.ts", "libs/viz/**/*.html"]
|
|
62
|
-
},
|
|
63
|
-
"outputs": ["{options.outputFile}"]
|
|
64
|
-
},
|
|
65
|
-
"component-test": {
|
|
66
|
-
"executor": "@nx/cypress:cypress",
|
|
67
|
-
"options": {
|
|
68
|
-
"cypressConfig": "libs/viz/cypress.config.ts",
|
|
69
|
-
"testingType": "component",
|
|
70
|
-
"skipServe": true,
|
|
71
|
-
"devServerTarget": "demo-app:build:devleopment"
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
"cypress-local": {
|
|
75
|
-
"executor": "nx:run-commands",
|
|
76
|
-
"options": {
|
|
77
|
-
"command": "cd libs/viz && npx cypress open"
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
"create-changelog": {
|
|
81
|
-
"executor": "nx:run-commands",
|
|
82
|
-
"options": {
|
|
83
|
-
"command": "touch libs/viz/CHANGELOG.md"
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
"version": {
|
|
87
|
-
"executor": "@jscutlery/semver:version",
|
|
88
|
-
"options": {
|
|
89
|
-
"preset": "angular",
|
|
90
|
-
"skipCommit": true,
|
|
91
|
-
"skipRootChangelog": true,
|
|
92
|
-
"postTargets": ["build-release", "publish", "github-release"],
|
|
93
|
-
"skipCommitTypes": ["build", "ci", "docs", "refactor", "style", "test"]
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
package/src/.eslintrc.json
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": false,
|
|
3
|
-
"overrides": [
|
|
4
|
-
{
|
|
5
|
-
"files": ["*.ts"],
|
|
6
|
-
"parserOptions": {
|
|
7
|
-
"project": [
|
|
8
|
-
"libs/viz/tsconfig.lib.json",
|
|
9
|
-
"libs/viz/tsconfig.spec.json",
|
|
10
|
-
"libs/viz/tsconfig.json"
|
|
11
|
-
],
|
|
12
|
-
"createDefaultProgram": true
|
|
13
|
-
},
|
|
14
|
-
"rules": {
|
|
15
|
-
"@angular-eslint/directive-selector": [
|
|
16
|
-
"error",
|
|
17
|
-
{
|
|
18
|
-
"type": "attribute",
|
|
19
|
-
"prefix": "vic",
|
|
20
|
-
"style": "camelCase"
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"@angular-eslint/component-selector": [
|
|
24
|
-
"error",
|
|
25
|
-
{
|
|
26
|
-
"type": "element",
|
|
27
|
-
"prefix": "vic",
|
|
28
|
-
"style": "kebab-case"
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"@angular-eslint/no-inputs-metadata-property": "warn"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
}
|
package/src/.prettierrc
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"tabWidth": 2,
|
|
3
|
-
"useTabs": false,
|
|
4
|
-
"semi": true,
|
|
5
|
-
"singleQuote": true,
|
|
6
|
-
"quoteProps": "as-needed",
|
|
7
|
-
"trailingComma": "es5",
|
|
8
|
-
"bracketSpacing": true,
|
|
9
|
-
"arrowParens": "always",
|
|
10
|
-
"overrides": [
|
|
11
|
-
{
|
|
12
|
-
"files": "*.component.html",
|
|
13
|
-
"options": {
|
|
14
|
-
"parser": "angular"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"files": "*.html",
|
|
19
|
-
"options": {
|
|
20
|
-
"parser": "html"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"files": "*.scss",
|
|
25
|
-
"options": {
|
|
26
|
-
"parser": "scss"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
],
|
|
30
|
-
"htmlWhitespaceSensitivity": "strict"
|
|
31
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { VicAuxMarksBuilder } from '../../../marks';
|
|
2
|
-
import { AxisBaselineBuilder } from '../../baseline/axis-baseline-builder';
|
|
3
|
-
import { GridBuilder } from '../../grid/grid-builder';
|
|
4
|
-
import { AxisLabelBuilder } from '../../label/axis-label-builder';
|
|
5
|
-
|
|
6
|
-
export abstract class XyAxisBaseBuilder extends VicAuxMarksBuilder<void> {
|
|
7
|
-
protected _axis: 'x' | 'y';
|
|
8
|
-
protected _dimension: 'ordinal' | 'quantitative';
|
|
9
|
-
protected baselineBuilder: AxisBaselineBuilder = new AxisBaselineBuilder();
|
|
10
|
-
protected gridBuilder: GridBuilder;
|
|
11
|
-
protected labelBuilder: AxisLabelBuilder;
|
|
12
|
-
protected marksClass: string;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* OPTIONAL. Specifies the configuration for the axis baseline. The baseline is the line that typically runs along the edge of the chart, from which tick marks and labels are drawn.
|
|
16
|
-
*
|
|
17
|
-
* @param baseline - A function that specifies properties for the axis baseline, or `null` to unset the baseline.
|
|
18
|
-
*
|
|
19
|
-
* If called with null, the default values of the baseline will be used.
|
|
20
|
-
*/
|
|
21
|
-
baseline(baseline: (baseline: AxisBaselineBuilder) => void): this;
|
|
22
|
-
baseline(baseline: null): this;
|
|
23
|
-
baseline(baseline: (baseline: AxisBaselineBuilder) => void): this {
|
|
24
|
-
this.baselineBuilder = new AxisBaselineBuilder();
|
|
25
|
-
if (baseline === null) {
|
|
26
|
-
return this;
|
|
27
|
-
}
|
|
28
|
-
baseline?.(this.baselineBuilder);
|
|
29
|
-
return this;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* OPTIONAL. Specifies the configuration of grid lines for the axis. Grid lines are the lines that run perpendicular to the axis and intersect with tick marks.
|
|
34
|
-
*
|
|
35
|
-
* @param grid - A function that specifies properties for the grid lines, or `null` to unset the grid.
|
|
36
|
-
*
|
|
37
|
-
* If called with no argument, the default values of the grid will be used.
|
|
38
|
-
*/
|
|
39
|
-
grid(grid: (grid: GridBuilder) => void): this;
|
|
40
|
-
grid(): this;
|
|
41
|
-
grid(grid: null): this;
|
|
42
|
-
grid(grid?: ((grid: GridBuilder) => void) | null): this {
|
|
43
|
-
if (grid === null) {
|
|
44
|
-
this.gridBuilder = undefined;
|
|
45
|
-
return this;
|
|
46
|
-
}
|
|
47
|
-
this.gridBuilder = new GridBuilder();
|
|
48
|
-
grid?.(this.gridBuilder);
|
|
49
|
-
return this;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* OPTIONAL. Specifies properties for an axis label.
|
|
54
|
-
*
|
|
55
|
-
* @param label - A function that specifies properties for an axis label, or `null` to unset the label.
|
|
56
|
-
*/
|
|
57
|
-
label(label: (label: AxisLabelBuilder) => void): this;
|
|
58
|
-
label(label: null): this;
|
|
59
|
-
label(label: ((label: AxisLabelBuilder) => void) | null): this {
|
|
60
|
-
if (label === null) {
|
|
61
|
-
this.labelBuilder = undefined;
|
|
62
|
-
return this;
|
|
63
|
-
}
|
|
64
|
-
this.labelBuilder = new AxisLabelBuilder();
|
|
65
|
-
label(this.labelBuilder);
|
|
66
|
-
return this;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { DataValue } from '../../../core/types/values';
|
|
2
|
-
import { AuxMarksConfig } from '../../../marks';
|
|
3
|
-
import { AxisBaseline } from '../../baseline/axis-baseline';
|
|
4
|
-
import { Grid } from '../../grid/grid-config';
|
|
5
|
-
import { AxisLabel } from '../../label/axis-label';
|
|
6
|
-
import { Ticks } from '../../ticks/ticks';
|
|
7
|
-
import { XyAxisBaseOptions } from './xy-axis-options';
|
|
8
|
-
|
|
9
|
-
export abstract class XyAxisConfig<
|
|
10
|
-
Tick extends DataValue,
|
|
11
|
-
TicksConfig extends Ticks<Tick>,
|
|
12
|
-
>
|
|
13
|
-
extends AuxMarksConfig
|
|
14
|
-
implements XyAxisBaseOptions
|
|
15
|
-
{
|
|
16
|
-
baseline: AxisBaseline;
|
|
17
|
-
grid: Grid;
|
|
18
|
-
label: AxisLabel;
|
|
19
|
-
ticks: TicksConfig;
|
|
20
|
-
|
|
21
|
-
abstract getNumTicksBySpacing(
|
|
22
|
-
spacing: number,
|
|
23
|
-
dimensions: {
|
|
24
|
-
height: number;
|
|
25
|
-
width: number;
|
|
26
|
-
}
|
|
27
|
-
): number;
|
|
28
|
-
|
|
29
|
-
getValidatedNumTicks(numTicks: number): number {
|
|
30
|
-
if (numTicks < 1) {
|
|
31
|
-
return 1;
|
|
32
|
-
}
|
|
33
|
-
return Math.floor(numTicks);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { MarksOptions } from '../../../marks';
|
|
2
|
-
import { AxisBaselineOptions } from '../../baseline/axis-baseline-options';
|
|
3
|
-
import { Grid } from '../../grid/grid-config';
|
|
4
|
-
import { AxisLabelOptions } from '../../label/axis-label-options';
|
|
5
|
-
|
|
6
|
-
export interface XyAxisBaseOptions extends MarksOptions {
|
|
7
|
-
baseline: AxisBaselineOptions;
|
|
8
|
-
grid: Grid;
|
|
9
|
-
label: AxisLabelOptions;
|
|
10
|
-
marksClass: string;
|
|
11
|
-
}
|
|
@@ -1,114 +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 { XyAxisStub } from '../../testing/stubs/xy-axis.stub';
|
|
6
|
-
import { Ticks } from '../ticks/ticks';
|
|
7
|
-
import { VicXOrdinalAxisConfigBuilder } from '../x-ordinal/x-ordinal-axis-builder';
|
|
8
|
-
import { VicXQuantitativeAxisConfigBuilder } from '../x-quantitative/x-quantitative-axis-builder';
|
|
9
|
-
|
|
10
|
-
describe('the XyAxis abstract class', () => {
|
|
11
|
-
let abstractClass: XyAxisStub<number, Ticks<number>>;
|
|
12
|
-
const mockElementRef = {
|
|
13
|
-
nativeElement: {
|
|
14
|
-
querySelector: jasmine.createSpy('querySelector'),
|
|
15
|
-
style: {},
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
beforeEach(() => {
|
|
20
|
-
TestBed.configureTestingModule({
|
|
21
|
-
providers: [
|
|
22
|
-
XyAxisStub,
|
|
23
|
-
XyChartComponent,
|
|
24
|
-
{ provide: ElementRef, useValue: mockElementRef },
|
|
25
|
-
],
|
|
26
|
-
});
|
|
27
|
-
abstractClass = TestBed.inject(XyAxisStub);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
describe('initFromConfig', () => {
|
|
31
|
-
beforeEach(() => {
|
|
32
|
-
spyOn(abstractClass, 'drawMarks');
|
|
33
|
-
});
|
|
34
|
-
it('calls drawMarks once', () => {
|
|
35
|
-
abstractClass.initFromConfig();
|
|
36
|
-
expect(abstractClass.drawMarks).toHaveBeenCalledTimes(1);
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
describe('setAxisFromScaleAndConfig', () => {
|
|
41
|
-
let tickSizeOuterSpy: jasmine.Spy;
|
|
42
|
-
beforeEach(() => {
|
|
43
|
-
tickSizeOuterSpy = jasmine
|
|
44
|
-
.createSpy('tickSizeOuter')
|
|
45
|
-
.and.returnValue('tick size' as any);
|
|
46
|
-
abstractClass.axisFunction = () => {
|
|
47
|
-
return {
|
|
48
|
-
tickSizeOuter: tickSizeOuterSpy,
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
spyOn(abstractClass, 'setTicks');
|
|
52
|
-
abstractClass.scale = 'class scale' as any;
|
|
53
|
-
});
|
|
54
|
-
it('calls tickSizeOuter once with the correct value if tickSizeOuter is defined', () => {
|
|
55
|
-
abstractClass.config = new VicXOrdinalAxisConfigBuilder()
|
|
56
|
-
.ticks((t) => t.sizeOuter(3))
|
|
57
|
-
.getConfig();
|
|
58
|
-
abstractClass.setAxisFromScaleAndConfig();
|
|
59
|
-
expect(tickSizeOuterSpy).toHaveBeenCalledOnceWith(3);
|
|
60
|
-
});
|
|
61
|
-
it('does not call tickSizeOuter if tickSizeOuter is undefined', () => {
|
|
62
|
-
tickSizeOuterSpy.calls.reset();
|
|
63
|
-
abstractClass.config =
|
|
64
|
-
new VicXQuantitativeAxisConfigBuilder().getConfig();
|
|
65
|
-
abstractClass.setAxisFromScaleAndConfig();
|
|
66
|
-
expect(tickSizeOuterSpy).not.toHaveBeenCalled();
|
|
67
|
-
});
|
|
68
|
-
it('calls setTicks once with tickFormat if tickFormat is truthy', () => {
|
|
69
|
-
abstractClass.config = new VicXOrdinalAxisConfigBuilder()
|
|
70
|
-
.ticks((t) => t.format('.1f'))
|
|
71
|
-
.getConfig();
|
|
72
|
-
abstractClass.setAxisFromScaleAndConfig();
|
|
73
|
-
expect(abstractClass.setTicks).toHaveBeenCalledOnceWith('.1f');
|
|
74
|
-
});
|
|
75
|
-
it('does not call setTicks if tickFormat is falsy', () => {
|
|
76
|
-
abstractClass.config = new VicXOrdinalAxisConfigBuilder().getConfig();
|
|
77
|
-
abstractClass.setAxisFromScaleAndConfig();
|
|
78
|
-
expect(abstractClass.setTicks).not.toHaveBeenCalled();
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
describe('drawMarks', () => {
|
|
83
|
-
beforeEach(() => {
|
|
84
|
-
spyOn(abstractClass, 'setAxisFunction');
|
|
85
|
-
spyOn(abstractClass, 'setTranslate');
|
|
86
|
-
spyOn(abstractClass, 'setScale');
|
|
87
|
-
spyOn(abstractClass, 'setAxisFromScaleAndConfig');
|
|
88
|
-
spyOn(abstractClass, 'drawAxis');
|
|
89
|
-
abstractClass.config = {
|
|
90
|
-
grid: true,
|
|
91
|
-
} as any;
|
|
92
|
-
});
|
|
93
|
-
it('calls setAxisFunction once', () => {
|
|
94
|
-
abstractClass.initFromConfig();
|
|
95
|
-
expect(abstractClass.setAxisFunction).toHaveBeenCalledTimes(1);
|
|
96
|
-
});
|
|
97
|
-
it('calls setTranslate once', () => {
|
|
98
|
-
abstractClass.initFromConfig();
|
|
99
|
-
expect(abstractClass.setTranslate).toHaveBeenCalledTimes(1);
|
|
100
|
-
});
|
|
101
|
-
it('calls setScale once', () => {
|
|
102
|
-
abstractClass.drawMarks();
|
|
103
|
-
expect(abstractClass.setScale).toHaveBeenCalledTimes(1);
|
|
104
|
-
});
|
|
105
|
-
it('calls setAxisFromScaleAndConfig once', () => {
|
|
106
|
-
abstractClass.drawMarks();
|
|
107
|
-
expect(abstractClass.setAxisFromScaleAndConfig).toHaveBeenCalledTimes(1);
|
|
108
|
-
});
|
|
109
|
-
it('calls drawAxis once', () => {
|
|
110
|
-
abstractClass.drawMarks();
|
|
111
|
-
expect(abstractClass.drawAxis).toHaveBeenCalledTimes(1);
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
});
|