@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
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { safeAssign } from '@mathstack/app-kit';
|
|
2
|
-
import { FillDefinition } from '../../../data-dimensions';
|
|
3
|
-
import { AreaFills } from './area-fills';
|
|
4
|
-
|
|
5
|
-
const DEFAULT = {
|
|
6
|
-
_display: () => true,
|
|
7
|
-
_opacity: 0.2,
|
|
8
|
-
_gradient: undefined,
|
|
9
|
-
_color: undefined,
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export class AreaFillsBuilder<Datum> {
|
|
13
|
-
private _display: (category: string) => boolean;
|
|
14
|
-
private _opacity: number;
|
|
15
|
-
private _customFills: FillDefinition<Datum>[];
|
|
16
|
-
private _color: (d: Datum) => string;
|
|
17
|
-
|
|
18
|
-
constructor() {
|
|
19
|
-
safeAssign(this, DEFAULT);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* OPTIONAL. A string which determines color of the fill under line,
|
|
24
|
-
* or a function whose input is the first point in the line and which returns
|
|
25
|
-
* a color string.
|
|
26
|
-
* This string is directly passed to `fill` under the hood.
|
|
27
|
-
*
|
|
28
|
-
* If not set, the color of the line will be used.
|
|
29
|
-
*
|
|
30
|
-
* To unset the color, call with `null`.
|
|
31
|
-
*/
|
|
32
|
-
color(color: null): this;
|
|
33
|
-
color(color: string): this;
|
|
34
|
-
color(color: (d: Datum) => string): this;
|
|
35
|
-
color(color: string | ((d: Datum) => string) | null): this {
|
|
36
|
-
if (color === null) {
|
|
37
|
-
this._color = undefined;
|
|
38
|
-
return this;
|
|
39
|
-
}
|
|
40
|
-
this._color = typeof color === 'string' ? () => color : color;
|
|
41
|
-
return this;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* OPTIONAL. A boolean to determine if fill under line should be displayed.
|
|
46
|
-
*
|
|
47
|
-
* @default true
|
|
48
|
-
*/
|
|
49
|
-
display(display: boolean): this;
|
|
50
|
-
display(display: (category: string) => boolean): this;
|
|
51
|
-
display(display: boolean | ((category: string) => boolean)): this {
|
|
52
|
-
this._display = typeof display === 'boolean' ? () => display : display;
|
|
53
|
-
return this;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* OPTIONAL. A number to determine the opacity of the fill under line.
|
|
58
|
-
*
|
|
59
|
-
* @default 0.2
|
|
60
|
-
*/
|
|
61
|
-
opacity(opacity: number): this {
|
|
62
|
-
this._opacity = opacity;
|
|
63
|
-
return this;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* OPTIONAL. A string to determine the gradient of the fill under line.
|
|
68
|
-
*
|
|
69
|
-
* @default undefined
|
|
70
|
-
*/
|
|
71
|
-
customFills(customFills: FillDefinition<Datum>[]): this {
|
|
72
|
-
this._customFills = customFills;
|
|
73
|
-
return this;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* @internal This function is for internal use only and should never be called by the user.
|
|
78
|
-
*/
|
|
79
|
-
_build(): AreaFills<Datum> {
|
|
80
|
-
return {
|
|
81
|
-
display: this._display,
|
|
82
|
-
opacity: this._opacity,
|
|
83
|
-
customFills: this._customFills,
|
|
84
|
-
color: this._color,
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { safeAssign } from '@mathstack/app-kit';
|
|
2
|
-
import { FillDefinition } from '../../../data-dimensions';
|
|
3
|
-
import { AreaFillsOptions } from './area-fills-options';
|
|
4
|
-
|
|
5
|
-
export class AreaFills<Datum> implements AreaFillsOptions<Datum> {
|
|
6
|
-
readonly display: (category: string) => boolean;
|
|
7
|
-
readonly opacity: number;
|
|
8
|
-
readonly customFills: FillDefinition<Datum>[];
|
|
9
|
-
readonly color: (d: Datum) => string;
|
|
10
|
-
|
|
11
|
-
constructor(options: AreaFillsOptions<Datum>) {
|
|
12
|
-
safeAssign(this, options);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { safeAssign } from '@mathstack/app-kit';
|
|
3
|
-
import { CurveFactory, curveLinear } from 'd3';
|
|
4
|
-
import { DateChartPositionDimensionBuilder } from '../../data-dimensions/continuous-quantitative/date-chart-position/date-chart-position-builder';
|
|
5
|
-
import { NumberChartPositionDimensionBuilder } from '../../data-dimensions/continuous-quantitative/number-chart-position/number-chart-position-builder';
|
|
6
|
-
import { PrimaryMarksBuilder } from '../../marks/primary-marks/config/primary-marks-builder';
|
|
7
|
-
import { PointMarkersBuilder } from '../../point-markers/point-markers-builder';
|
|
8
|
-
import { LinesStrokeBuilder } from '../config/stroke/lines-stroke-builder';
|
|
9
|
-
import { AreaFillsBuilder } from './area-fills/area-fills-builder';
|
|
10
|
-
import { LinesConfig } from './lines-config';
|
|
11
|
-
|
|
12
|
-
const DEFAULT = {
|
|
13
|
-
_curve: curveLinear,
|
|
14
|
-
_pointerDetectionRadius: 80,
|
|
15
|
-
_lineLabelsFormat: (d: string) => d,
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Builds a configuration object for a LinesComponent.
|
|
20
|
-
*
|
|
21
|
-
* Must be added to a providers array in or above the component that consumes it if it is injected via the constructor. (e.g. `providers: [VicLinesBuilder]` in the component decorator)
|
|
22
|
-
*
|
|
23
|
-
* The generic parameter, Datum, is the type of the data that will be used to create the lines.
|
|
24
|
-
*/
|
|
25
|
-
@Injectable()
|
|
26
|
-
export class VicLinesConfigBuilder<Datum> extends PrimaryMarksBuilder<Datum> {
|
|
27
|
-
private _curve: CurveFactory;
|
|
28
|
-
private _labelLines: boolean;
|
|
29
|
-
private _lineLabelsFormat: (d: string) => string;
|
|
30
|
-
private _pointerDetectionRadius: number;
|
|
31
|
-
private pointMarkersBuilder: PointMarkersBuilder<Datum>;
|
|
32
|
-
private strokeBuilder: LinesStrokeBuilder<Datum>;
|
|
33
|
-
private xDimensionBuilder:
|
|
34
|
-
| NumberChartPositionDimensionBuilder<Datum>
|
|
35
|
-
| DateChartPositionDimensionBuilder<Datum>;
|
|
36
|
-
private yDimensionBuilder: NumberChartPositionDimensionBuilder<Datum>;
|
|
37
|
-
private areaFillsBuilder: AreaFillsBuilder<Datum>;
|
|
38
|
-
|
|
39
|
-
constructor() {
|
|
40
|
-
super();
|
|
41
|
-
safeAssign(this, DEFAULT);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* OPTIONAL. A config to set fill underneath lines.
|
|
46
|
-
*
|
|
47
|
-
* If no argument is provided, the default area fills will be created.
|
|
48
|
-
*
|
|
49
|
-
* To unset the area fills, call with `null`.
|
|
50
|
-
*/
|
|
51
|
-
areaFills(): this;
|
|
52
|
-
areaFills(areaFills: null): this;
|
|
53
|
-
areaFills(areaFills: (areaFills: AreaFillsBuilder<Datum>) => void): this;
|
|
54
|
-
areaFills(
|
|
55
|
-
areaFills?: ((areaFills: AreaFillsBuilder<Datum>) => void) | null
|
|
56
|
-
): this {
|
|
57
|
-
if (areaFills === null) {
|
|
58
|
-
this.areaFillsBuilder = undefined;
|
|
59
|
-
return this;
|
|
60
|
-
}
|
|
61
|
-
this.initBelowLinesAreaFillBuilder();
|
|
62
|
-
areaFills?.(this.areaFillsBuilder);
|
|
63
|
-
return this;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
private initBelowLinesAreaFillBuilder(): void {
|
|
67
|
-
this.areaFillsBuilder = new AreaFillsBuilder();
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* OPTIONAL. A function passed to D3's [line.curve()]{@link https://github.com/d3/d3-shape#line_curve}
|
|
72
|
-
* method.
|
|
73
|
-
*
|
|
74
|
-
* @default [curveLinear]{@link https://github.com/d3/d3-shape#curveLinear}.
|
|
75
|
-
*/
|
|
76
|
-
curve(curve: CurveFactory): this {
|
|
77
|
-
this._curve = curve;
|
|
78
|
-
return this;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* OPTIONAL. A boolean to determine if the line will be labeled.
|
|
83
|
-
*/
|
|
84
|
-
labelLines(labelLines: boolean): this {
|
|
85
|
-
this._labelLines = labelLines;
|
|
86
|
-
return this;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* OPTIONAL. A function that returns a string to be used as the label for a line. Can be used to modify the
|
|
91
|
-
* line label string as needed.
|
|
92
|
-
*
|
|
93
|
-
* @default identity function.
|
|
94
|
-
*/
|
|
95
|
-
lineLabelsFormat(lineLabelsFormat: (d: string) => string): this {
|
|
96
|
-
this._lineLabelsFormat = lineLabelsFormat;
|
|
97
|
-
return this;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* OPTIONAL. The distance from a line in which a hover event will trigger a tooltip, in px.
|
|
102
|
-
*
|
|
103
|
-
* This is used to ensure that a tooltip is triggered only when a user's pointer is close to lines.
|
|
104
|
-
*
|
|
105
|
-
* @default 80
|
|
106
|
-
*/
|
|
107
|
-
pointerDetectionRadius(pointerDetectionRadius: number): this {
|
|
108
|
-
this._pointerDetectionRadius = pointerDetectionRadius;
|
|
109
|
-
return this;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* OPTIONAL. A config for the behavior of markers for each datum on the line.
|
|
114
|
-
*
|
|
115
|
-
* Creating this config will create markers on lines. If no argument is provided, the default markers will be created.
|
|
116
|
-
*/
|
|
117
|
-
pointMarkers(): this;
|
|
118
|
-
pointMarkers(pointMarkers: null): this;
|
|
119
|
-
pointMarkers(
|
|
120
|
-
pointMarkers: ((pointMarkers: PointMarkersBuilder<Datum>) => void) | null
|
|
121
|
-
): this;
|
|
122
|
-
pointMarkers(
|
|
123
|
-
pointMarkers?: ((pointMarkers: PointMarkersBuilder<Datum>) => void) | null
|
|
124
|
-
): this {
|
|
125
|
-
if (pointMarkers === null) {
|
|
126
|
-
this.pointMarkersBuilder = undefined;
|
|
127
|
-
return this;
|
|
128
|
-
}
|
|
129
|
-
this.pointMarkersBuilder = new PointMarkersBuilder();
|
|
130
|
-
pointMarkers?.(this.pointMarkersBuilder);
|
|
131
|
-
return this;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* OPTIONAL. A config for the behavior of the line stroke.
|
|
136
|
-
*/
|
|
137
|
-
stroke(stroke: null): this;
|
|
138
|
-
stroke(stroke: (stroke: LinesStrokeBuilder<Datum>) => void): this;
|
|
139
|
-
stroke(stroke: ((stroke: LinesStrokeBuilder<Datum>) => void) | null): this {
|
|
140
|
-
if (stroke === null) {
|
|
141
|
-
this.strokeBuilder = undefined;
|
|
142
|
-
return this;
|
|
143
|
-
}
|
|
144
|
-
this.initStrokeBuilder();
|
|
145
|
-
stroke(this.strokeBuilder);
|
|
146
|
-
return this;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
private initStrokeBuilder(): void {
|
|
150
|
-
this.strokeBuilder = new LinesStrokeBuilder();
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* REQUIRED. A config for the behavior of the chart's x dimension when using numeric data.
|
|
155
|
-
*/
|
|
156
|
-
xNumeric(xNumeric: null): this;
|
|
157
|
-
xNumeric(
|
|
158
|
-
xNumeric: (x: NumberChartPositionDimensionBuilder<Datum>) => void
|
|
159
|
-
): this;
|
|
160
|
-
xNumeric(
|
|
161
|
-
x: ((x: NumberChartPositionDimensionBuilder<Datum>) => void) | null
|
|
162
|
-
): this {
|
|
163
|
-
if (x === null) {
|
|
164
|
-
this.xDimensionBuilder = undefined;
|
|
165
|
-
return this;
|
|
166
|
-
}
|
|
167
|
-
this.xDimensionBuilder = new NumberChartPositionDimensionBuilder<Datum>();
|
|
168
|
-
x(this.xDimensionBuilder);
|
|
169
|
-
return this;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* REQUIRED. A config for the behavior of the chart's x dimension when using Date date.
|
|
174
|
-
*/
|
|
175
|
-
xDate(xDate: null): this;
|
|
176
|
-
xDate(xDate: (x: DateChartPositionDimensionBuilder<Datum>) => void): this;
|
|
177
|
-
xDate(
|
|
178
|
-
x: ((x: DateChartPositionDimensionBuilder<Datum>) => void) | null
|
|
179
|
-
): this {
|
|
180
|
-
if (x === null) {
|
|
181
|
-
this.xDimensionBuilder = undefined;
|
|
182
|
-
return this;
|
|
183
|
-
}
|
|
184
|
-
this.xDimensionBuilder = new DateChartPositionDimensionBuilder<Datum>();
|
|
185
|
-
x(this.xDimensionBuilder);
|
|
186
|
-
return this;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* REQUIRED. A config for the behavior of the chart's y dimension.
|
|
191
|
-
*/
|
|
192
|
-
y(y: null): this;
|
|
193
|
-
y(y: (y: NumberChartPositionDimensionBuilder<Datum>) => void): this;
|
|
194
|
-
y(y: ((y: NumberChartPositionDimensionBuilder<Datum>) => void) | null): this {
|
|
195
|
-
if (y === null) {
|
|
196
|
-
this.yDimensionBuilder = undefined;
|
|
197
|
-
return this;
|
|
198
|
-
}
|
|
199
|
-
this.yDimensionBuilder = new NumberChartPositionDimensionBuilder<Datum>();
|
|
200
|
-
y(this.yDimensionBuilder);
|
|
201
|
-
return this;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* REQUIRED. Builds the configuration object for the LinesComponent.
|
|
206
|
-
*/
|
|
207
|
-
getConfig(): LinesConfig<Datum> {
|
|
208
|
-
this.validateBuilder();
|
|
209
|
-
return new LinesConfig({
|
|
210
|
-
marksClass: 'vic-lines',
|
|
211
|
-
curve: this._curve,
|
|
212
|
-
data: this._data,
|
|
213
|
-
datumClass: this._datumClass,
|
|
214
|
-
labelLines: this._labelLines,
|
|
215
|
-
lineLabelsFormat: this._lineLabelsFormat,
|
|
216
|
-
mixBlendMode: this._mixBlendMode,
|
|
217
|
-
pointerDetectionRadius: this._pointerDetectionRadius,
|
|
218
|
-
pointMarkers: this.pointMarkersBuilder?._build(),
|
|
219
|
-
stroke: this.strokeBuilder._build(),
|
|
220
|
-
x: this.xDimensionBuilder._build('X'),
|
|
221
|
-
y: this.yDimensionBuilder._build('Y'),
|
|
222
|
-
areaFills: this.areaFillsBuilder?._build(),
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
protected override validateBuilder(): void {
|
|
227
|
-
super.validateBuilder('Lines');
|
|
228
|
-
if (this.strokeBuilder === undefined) {
|
|
229
|
-
this.initStrokeBuilder();
|
|
230
|
-
}
|
|
231
|
-
if (!this.xDimensionBuilder) {
|
|
232
|
-
throw new Error(
|
|
233
|
-
'Lines Builder: X dimension is required. Please use method `createXNumericDimension` or `createXDateDimension` to set it.'
|
|
234
|
-
);
|
|
235
|
-
}
|
|
236
|
-
if (!this.yDimensionBuilder) {
|
|
237
|
-
throw new Error(
|
|
238
|
-
'Lines Builder: Y dimension is required. Please use method `createYDimension` to set it.'
|
|
239
|
-
);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import { VicLinesConfigBuilder } from './lines-builder';
|
|
3
|
-
import { LinesConfig } from './lines-config';
|
|
4
|
-
|
|
5
|
-
type Datum = { date: Date; value: number; category: string };
|
|
6
|
-
const data = [
|
|
7
|
-
{ date: new Date('2020-01-01'), value: 1, category: 'a' },
|
|
8
|
-
{ date: new Date('2020-01-02'), value: 2, category: 'a' },
|
|
9
|
-
{ date: new Date('2020-01-03'), value: 3, category: 'a' },
|
|
10
|
-
{ date: new Date('2020-01-01'), value: 4, category: 'b' },
|
|
11
|
-
{ date: new Date('2020-01-02'), value: 5, category: 'b' },
|
|
12
|
-
{ date: new Date('2020-01-03'), value: 6, category: 'b' },
|
|
13
|
-
];
|
|
14
|
-
|
|
15
|
-
function createConfig(): LinesConfig<Datum> {
|
|
16
|
-
return new VicLinesConfigBuilder<Datum>()
|
|
17
|
-
.data(data)
|
|
18
|
-
.xDate((dimension) => dimension.valueAccessor((d) => d.date))
|
|
19
|
-
.y((dimension) => dimension.valueAccessor((d) => d.value))
|
|
20
|
-
.stroke((stroke) =>
|
|
21
|
-
stroke.color((dimension) => dimension.valueAccessor((d) => d.category))
|
|
22
|
-
)
|
|
23
|
-
.getConfig();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
describe('LinesConfig', () => {
|
|
27
|
-
let config: LinesConfig<Datum>;
|
|
28
|
-
|
|
29
|
-
describe('initPropertiesFromData()', () => {
|
|
30
|
-
beforeEach(() => {
|
|
31
|
-
spyOn(LinesConfig.prototype as any, 'setDimensionPropertiesFromData');
|
|
32
|
-
spyOn(LinesConfig.prototype as any, 'setValueIndices');
|
|
33
|
-
spyOn(LinesConfig.prototype as any, 'setLinesD3Data');
|
|
34
|
-
spyOn(LinesConfig.prototype as any, 'setLinesKeyFunction');
|
|
35
|
-
config = createConfig();
|
|
36
|
-
});
|
|
37
|
-
it('calls setDimensionPropertiesFromData once', () => {
|
|
38
|
-
expect(
|
|
39
|
-
(config as any).setDimensionPropertiesFromData
|
|
40
|
-
).toHaveBeenCalledTimes(1);
|
|
41
|
-
});
|
|
42
|
-
it('calls setValueIndices once', () => {
|
|
43
|
-
expect((config as any).setValueIndices).toHaveBeenCalledTimes(1);
|
|
44
|
-
});
|
|
45
|
-
it('calls setLinesD3Data once', () => {
|
|
46
|
-
expect((config as any).setLinesD3Data).toHaveBeenCalledTimes(1);
|
|
47
|
-
});
|
|
48
|
-
it('calls setLinesKeyFunction once', () => {
|
|
49
|
-
expect((config as any).setLinesKeyFunction).toHaveBeenCalledTimes(1);
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
});
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { safeAssign } from '@mathstack/app-kit';
|
|
2
|
-
import { CurveFactory, group, range } from 'd3';
|
|
3
|
-
import { DateChartPositionDimension } from '../../data-dimensions/continuous-quantitative/date-chart-position/date-chart-position';
|
|
4
|
-
import { NumberChartPositionDimension } from '../../data-dimensions/continuous-quantitative/number-chart-position/number-chart-position';
|
|
5
|
-
import { XyPrimaryMarksConfig } from '../../marks/xy-marks/xy-primary-marks/xy-primary-marks-config';
|
|
6
|
-
import { PointMarkers } from '../../point-markers/point-markers';
|
|
7
|
-
import { LinesGroupSelectionDatum } from '../lines.component';
|
|
8
|
-
import { AreaFills } from './area-fills/area-fills';
|
|
9
|
-
import { LinesOptions } from './lines-options';
|
|
10
|
-
import { LinesStroke } from './stroke/lines-stroke';
|
|
11
|
-
|
|
12
|
-
export interface LinesMarkerDatum {
|
|
13
|
-
key: string;
|
|
14
|
-
index: number;
|
|
15
|
-
category: string;
|
|
16
|
-
display: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export class LinesConfig<Datum>
|
|
20
|
-
extends XyPrimaryMarksConfig<Datum>
|
|
21
|
-
implements LinesOptions<Datum>
|
|
22
|
-
{
|
|
23
|
-
readonly curve: CurveFactory;
|
|
24
|
-
readonly labelLines: boolean;
|
|
25
|
-
readonly lineLabelsFormat: (d: string) => string;
|
|
26
|
-
linesD3Data;
|
|
27
|
-
linesKeyFunction: (d: LinesGroupSelectionDatum) => string;
|
|
28
|
-
readonly areaFills: AreaFills<Datum>;
|
|
29
|
-
readonly pointerDetectionRadius: number;
|
|
30
|
-
readonly pointMarkers: PointMarkers<Datum>;
|
|
31
|
-
readonly stroke: LinesStroke<Datum>;
|
|
32
|
-
readonly x:
|
|
33
|
-
| DateChartPositionDimension<Datum>
|
|
34
|
-
| NumberChartPositionDimension<Datum>;
|
|
35
|
-
readonly y: NumberChartPositionDimension<Datum>;
|
|
36
|
-
|
|
37
|
-
constructor(options: LinesOptions<Datum>) {
|
|
38
|
-
super();
|
|
39
|
-
safeAssign(this, options);
|
|
40
|
-
this.initPropertiesFromData();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
protected initPropertiesFromData(): void {
|
|
44
|
-
this.setDimensionPropertiesFromData();
|
|
45
|
-
this.setValueIndices();
|
|
46
|
-
this.setLinesD3Data();
|
|
47
|
-
this.setLinesKeyFunction();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
private setDimensionPropertiesFromData(): void {
|
|
51
|
-
this.x.setPropertiesFromData(this.data);
|
|
52
|
-
this.y.setPropertiesFromData(this.data);
|
|
53
|
-
this.stroke.color.setPropertiesFromData(this.data);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
private setValueIndices(): void {
|
|
57
|
-
this.valueIndices = range(this.x.values.length).filter((i) =>
|
|
58
|
-
this.stroke.color.domainIncludes(this.stroke.color.values[i])
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
private setLinesD3Data(): void {
|
|
63
|
-
const definedIndices = this.valueIndices.filter(
|
|
64
|
-
(i) =>
|
|
65
|
-
this.x.isValidValue(this.x.values[i]) &&
|
|
66
|
-
this.y.isValidValue(this.y.values[i])
|
|
67
|
-
);
|
|
68
|
-
this.linesD3Data = group(
|
|
69
|
-
definedIndices,
|
|
70
|
-
(i) => this.stroke.color.values[i]
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
getDataFromCategory(category: string): Datum[] {
|
|
75
|
-
return this.linesD3Data.get(category).map((i) => this.data[i]);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
private setLinesKeyFunction(): void {
|
|
79
|
-
this.linesKeyFunction = (d): string => d[0];
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
getPointMarkersData(indices: number[]): LinesMarkerDatum[] {
|
|
83
|
-
return indices.map((i) => {
|
|
84
|
-
return {
|
|
85
|
-
key: this.getMarkerKey(i),
|
|
86
|
-
index: i,
|
|
87
|
-
category: this.stroke.color.values[i],
|
|
88
|
-
display: this.pointMarkers.display(this.data[i]) ? 'block' : 'none',
|
|
89
|
-
};
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
private getMarkerKey(i: number): string {
|
|
94
|
-
return `${this.stroke.color.values[i]}-${this.x.values[i]}`;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { CurveFactory } from 'd3';
|
|
2
|
-
import { DateChartPositionDimension } from '../../data-dimensions/continuous-quantitative/date-chart-position/date-chart-position';
|
|
3
|
-
import { NumberChartPositionDimension } from '../../data-dimensions/continuous-quantitative/number-chart-position/number-chart-position';
|
|
4
|
-
import { DataMarksOptions } from '../../marks/config/marks-options';
|
|
5
|
-
import { PointMarkers } from '../../point-markers/point-markers';
|
|
6
|
-
import { AreaFills } from './area-fills/area-fills';
|
|
7
|
-
import { LinesStrokeOptions } from './stroke/lines-stroke-options';
|
|
8
|
-
|
|
9
|
-
export interface LinesOptions<Datum> extends DataMarksOptions<Datum> {
|
|
10
|
-
areaFills: AreaFills<Datum>;
|
|
11
|
-
curve: CurveFactory;
|
|
12
|
-
labelLines: boolean;
|
|
13
|
-
lineLabelsFormat: (d: string) => string;
|
|
14
|
-
pointerDetectionRadius: number;
|
|
15
|
-
pointMarkers: PointMarkers<Datum>;
|
|
16
|
-
stroke: LinesStrokeOptions<Datum>;
|
|
17
|
-
x: DateChartPositionDimension<Datum> | NumberChartPositionDimension<Datum>;
|
|
18
|
-
y: NumberChartPositionDimension<Datum>;
|
|
19
|
-
}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { safeAssign } from '@mathstack/app-kit';
|
|
2
|
-
import { OrdinalVisualValueDimensionBuilder } from '../../../data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value-builder';
|
|
3
|
-
import { LinesStroke } from './lines-stroke';
|
|
4
|
-
|
|
5
|
-
const DEFAULT = {
|
|
6
|
-
_dasharray: 'none',
|
|
7
|
-
_linecap: 'round',
|
|
8
|
-
_linejoin: 'round',
|
|
9
|
-
_opacity: 1,
|
|
10
|
-
_width: 2,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export class LinesStrokeBuilder<Datum> {
|
|
14
|
-
private colorDimensionBuilder: OrdinalVisualValueDimensionBuilder<
|
|
15
|
-
Datum,
|
|
16
|
-
string,
|
|
17
|
-
string
|
|
18
|
-
>;
|
|
19
|
-
private _dasharray: string;
|
|
20
|
-
private _linecap: string;
|
|
21
|
-
private _linejoin: string;
|
|
22
|
-
private _opacity: number;
|
|
23
|
-
private _width: number;
|
|
24
|
-
|
|
25
|
-
constructor() {
|
|
26
|
-
safeAssign(this, DEFAULT);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* OPTIONAL. Creates a dimension that will control the color of the lines.
|
|
31
|
-
*
|
|
32
|
-
* If not provided, all lines will be colored with the first color in `d3.schemeTableau10`, the default `range` for the dimension.
|
|
33
|
-
*/
|
|
34
|
-
color(color: null): this;
|
|
35
|
-
color(
|
|
36
|
-
color: (
|
|
37
|
-
dimension: OrdinalVisualValueDimensionBuilder<Datum, string, string>
|
|
38
|
-
) => void
|
|
39
|
-
): this;
|
|
40
|
-
color(
|
|
41
|
-
color:
|
|
42
|
-
| ((
|
|
43
|
-
dimension: OrdinalVisualValueDimensionBuilder<Datum, string, string>
|
|
44
|
-
) => void)
|
|
45
|
-
| null
|
|
46
|
-
): this {
|
|
47
|
-
if (color === null) {
|
|
48
|
-
this.colorDimensionBuilder = undefined;
|
|
49
|
-
return this;
|
|
50
|
-
}
|
|
51
|
-
this.initColorDimensionBuilder();
|
|
52
|
-
color(this.colorDimensionBuilder);
|
|
53
|
-
return this;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
private initColorDimensionBuilder() {
|
|
57
|
-
this.colorDimensionBuilder = new OrdinalVisualValueDimensionBuilder();
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* OPTIONAL. A value for the line's [stroke-dasharray]{@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray}
|
|
62
|
-
* attribute.
|
|
63
|
-
*
|
|
64
|
-
* @default 'none'
|
|
65
|
-
*/
|
|
66
|
-
dasharray(dasharray: string): this {
|
|
67
|
-
this._dasharray = dasharray;
|
|
68
|
-
return this;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* OPTIONAL. A value for the line's [stroke-linecap]{@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap}
|
|
73
|
-
* attribute.
|
|
74
|
-
*
|
|
75
|
-
* @default 'round'
|
|
76
|
-
*/
|
|
77
|
-
linecap(linecap: string): this {
|
|
78
|
-
this._linecap = linecap;
|
|
79
|
-
return this;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* OPTIONAL. A value for the line's [stroke-linejoin]{@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linejoin}
|
|
84
|
-
* attribute.
|
|
85
|
-
*
|
|
86
|
-
* @default 'round'
|
|
87
|
-
*/
|
|
88
|
-
linejoin(linejoin: string): this {
|
|
89
|
-
this._linejoin = linejoin;
|
|
90
|
-
return this;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* OPTIONAL. A value for the line's [stroke-opacity]{@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-opacity}
|
|
95
|
-
* attribute.
|
|
96
|
-
*
|
|
97
|
-
* @default 1
|
|
98
|
-
*/
|
|
99
|
-
opacity(opacity: number): this {
|
|
100
|
-
this._opacity = opacity;
|
|
101
|
-
return this;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* OPTIONAL. A value for the line's [stroke-width]{@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width}
|
|
106
|
-
* attribute, in px.
|
|
107
|
-
*
|
|
108
|
-
* @default 2
|
|
109
|
-
*/
|
|
110
|
-
width(width: number): this {
|
|
111
|
-
this._width = width;
|
|
112
|
-
return this;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* @internal This function is for internal use only and should never be called by the user.
|
|
117
|
-
*/
|
|
118
|
-
_build(): LinesStroke<Datum> {
|
|
119
|
-
this.validateBuilder();
|
|
120
|
-
return new LinesStroke<Datum>({
|
|
121
|
-
color: this.colorDimensionBuilder._build('Lines Stroke Color'),
|
|
122
|
-
dasharray: this._dasharray,
|
|
123
|
-
linecap: this._linecap,
|
|
124
|
-
linejoin: this._linejoin,
|
|
125
|
-
opacity: this._opacity,
|
|
126
|
-
width: this._width,
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
validateBuilder(): void {
|
|
131
|
-
if (!this.colorDimensionBuilder) {
|
|
132
|
-
this.initColorDimensionBuilder();
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { OrdinalVisualValueDimension } from '../../../data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value';
|
|
2
|
-
import { StrokeBase } from '../../../stroke/base/stroke-base';
|
|
3
|
-
|
|
4
|
-
export interface LinesStrokeOptions<Datum> extends StrokeBase {
|
|
5
|
-
color: OrdinalVisualValueDimension<Datum, string, string>;
|
|
6
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { safeAssign } from '@mathstack/app-kit';
|
|
2
|
-
import { OrdinalVisualValueDimension } from '../../../data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value';
|
|
3
|
-
import { StrokeBase } from '../../../stroke/base/stroke-base';
|
|
4
|
-
import { LinesStrokeOptions } from './lines-stroke-options';
|
|
5
|
-
export class LinesStroke<Datum>
|
|
6
|
-
extends StrokeBase
|
|
7
|
-
implements LinesStrokeOptions<Datum>
|
|
8
|
-
{
|
|
9
|
-
color: OrdinalVisualValueDimension<Datum, string, string>;
|
|
10
|
-
|
|
11
|
-
constructor(options: Partial<LinesStrokeOptions<Datum>>) {
|
|
12
|
-
super();
|
|
13
|
-
safeAssign(this, options);
|
|
14
|
-
}
|
|
15
|
-
}
|