@mathstack/viz 0.0.1-beta.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/LICENSE +21 -0
- package/README.md +0 -0
- package/fesm2022/mathstack-viz.mjs +11049 -0
- package/fesm2022/mathstack-viz.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/axes/base/config/xy-axis-builder.d.ts +38 -0
- package/lib/axes/base/config/xy-axis-config.d.ts +18 -0
- package/lib/axes/base/config/xy-axis-options.d.ts +10 -0
- package/lib/axes/base/xy-axis-base.d.ts +49 -0
- package/lib/axes/baseline/axis-baseline-builder.d.ts +31 -0
- package/lib/axes/baseline/axis-baseline-options.d.ts +7 -0
- package/lib/axes/baseline/axis-baseline.d.ts +9 -0
- package/lib/axes/grid/grid-builder.d.ts +29 -0
- package/lib/axes/grid/grid-config.d.ts +8 -0
- package/lib/axes/grid/grid-options.d.ts +6 -0
- package/lib/axes/index.d.ts +13 -0
- package/lib/axes/label/axis-label-builder.d.ts +63 -0
- package/lib/axes/label/axis-label-options.d.ts +11 -0
- package/lib/axes/label/axis-label.d.ts +13 -0
- package/lib/axes/ordinal/ordinal-axis-config.d.ts +38 -0
- package/lib/axes/ordinal/ordinal-axis.d.ts +43 -0
- package/lib/axes/quantitative/quantitative-axis-config.d.ts +38 -0
- package/lib/axes/quantitative/quantitative-axis.d.ts +51 -0
- package/lib/axes/ticks/tick-wrap/tick-wrap-builder.d.ts +64 -0
- package/lib/axes/ticks/tick-wrap/tick-wrap-options.d.ts +8 -0
- package/lib/axes/ticks/tick-wrap/tick-wrap.d.ts +13 -0
- package/lib/axes/ticks/ticks-builder.d.ts +172 -0
- package/lib/axes/ticks/ticks-options.d.ts +22 -0
- package/lib/axes/ticks/ticks.d.ts +24 -0
- package/lib/axes/x/x-axis-config.d.ts +42 -0
- package/lib/axes/x/x-axis.d.ts +47 -0
- package/lib/axes/x-ordinal/x-ordinal-axis-builder.d.ts +29 -0
- package/lib/axes/x-ordinal/x-ordinal-axis-config.d.ts +25 -0
- package/lib/axes/x-ordinal/x-ordinal-axis.component.d.ts +88 -0
- package/lib/axes/x-quantitative/x-quantitative-axis-builder.d.ts +29 -0
- package/lib/axes/x-quantitative/x-quantitative-axis-config.d.ts +25 -0
- package/lib/axes/x-quantitative/x-quantitative-axis.component.d.ts +53 -0
- package/lib/axes/xy-axis.module.d.ts +10 -0
- package/lib/axes/y/y-axis-config.d.ts +42 -0
- package/lib/axes/y/y-axis.d.ts +53 -0
- package/lib/axes/y-ordinal/y-ordinal-axis-builder.d.ts +29 -0
- package/lib/axes/y-ordinal/y-ordinal-axis-config.d.ts +25 -0
- package/lib/axes/y-ordinal/y-ordinal-axis.component.d.ts +89 -0
- package/lib/axes/y-quantitative-axis/y-quantitative-axis-builder.d.ts +29 -0
- package/lib/axes/y-quantitative-axis/y-quantitative-axis-config.d.ts +25 -0
- package/lib/axes/y-quantitative-axis/y-quantitative-axis.component.d.ts +54 -0
- package/lib/bars/bars.component.d.ts +91 -0
- package/lib/bars/bars.module.d.ts +8 -0
- package/lib/bars/config/backgrounds/bars-backgrounds-builder.d.ts +27 -0
- package/lib/bars/config/backgrounds/bars-backgrounds-options.d.ts +4 -0
- package/lib/bars/config/backgrounds/bars-backgrounds.d.ts +6 -0
- package/lib/bars/config/bars-builder.d.ts +132 -0
- package/lib/bars/config/bars-config.d.ts +27 -0
- package/lib/bars/config/bars-dimensions.d.ts +11 -0
- package/lib/bars/config/bars-options.d.ts +16 -0
- package/lib/bars/config/labels/bars-labels-builder.d.ts +48 -0
- package/lib/bars/config/labels/bars-labels-options.d.ts +9 -0
- package/lib/bars/config/labels/bars-labels.d.ts +11 -0
- package/lib/bars/events/actions/bars-click-actions.d.ts +8 -0
- package/lib/bars/events/actions/bars-hover-actions.d.ts +12 -0
- package/lib/bars/events/actions/bars-hover-move-actions.d.ts +8 -0
- package/lib/bars/events/bars-events.directive.d.ts +38 -0
- package/lib/bars/events/bars-interaction-output.d.ts +16 -0
- package/lib/bars/events/bars-tooltip-positioner.d.ts +13 -0
- package/lib/bars/index.d.ts +12 -0
- package/lib/charts/chart/chart.component.d.ts +73 -0
- package/lib/charts/chart/chart.d.ts +4 -0
- package/lib/charts/chart/chart.token.d.ts +3 -0
- package/lib/charts/chart/config/chart-builder.d.ts +94 -0
- package/lib/charts/chart/config/chart-config.d.ts +16 -0
- package/lib/charts/chart/config/chart-options.d.ts +10 -0
- package/lib/charts/chart.module.d.ts +9 -0
- package/lib/charts/index.d.ts +8 -0
- package/lib/charts/map-chart/map-chart.component.d.ts +40 -0
- package/lib/charts/xy-chart/xy-chart.component.d.ts +40 -0
- package/lib/core/common-behaviors/constructor.d.ts +2 -0
- package/lib/core/index.d.ts +5 -0
- package/lib/core/types/layout.d.ts +24 -0
- package/lib/core/types/scale.d.ts +5 -0
- package/lib/core/types/values.d.ts +7 -0
- package/lib/core/utilities/colors.d.ts +13 -0
- package/lib/core/utilities/fill-utilities.d.ts +7 -0
- package/lib/core/utilities/type-guards.d.ts +6 -0
- package/lib/core/utilities/value-format.d.ts +11 -0
- package/lib/core/utilities/values.d.ts +16 -0
- package/lib/data-dimensions/continuous-quantitative/date-chart-position/date-chart-position-builder.d.ts +39 -0
- package/lib/data-dimensions/continuous-quantitative/date-chart-position/date-chart-position-options.d.ts +18 -0
- package/lib/data-dimensions/continuous-quantitative/date-chart-position/date-chart-position.d.ts +38 -0
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/concrete-domain-padding.d.ts +5 -0
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/domain-padding.d.ts +20 -0
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/percent-over/percent-over-options.d.ts +3 -0
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/percent-over/percent-over.d.ts +9 -0
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/pixel/pixel-options.d.ts +3 -0
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/pixel/pixel.d.ts +10 -0
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-interval/round-to-interval-options.d.ts +3 -0
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-interval/round-to-interval.d.ts +8 -0
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-sig-fig/round-to-sig-fig-options.d.ts +3 -0
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-sig-fig/round-to-sig-fig.d.ts +8 -0
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/number-chart-position-builder.d.ts +71 -0
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/number-chart-position-options.d.ts +5 -0
- package/lib/data-dimensions/continuous-quantitative/number-chart-position/number-chart-position.d.ts +30 -0
- package/lib/data-dimensions/continuous-quantitative/number-dimension/number-dimension-options.d.ts +8 -0
- package/lib/data-dimensions/continuous-quantitative/number-dimension/number-dimension.d.ts +28 -0
- package/lib/data-dimensions/continuous-quantitative/number-visual-value/number-visual-value-builder.d.ts +69 -0
- package/lib/data-dimensions/continuous-quantitative/number-visual-value/number-visual-value-options.d.ts +6 -0
- package/lib/data-dimensions/continuous-quantitative/number-visual-value/number-visual-value.d.ts +29 -0
- package/lib/data-dimensions/dimension-builder.d.ts +21 -0
- package/lib/data-dimensions/dimension-options.d.ts +11 -0
- package/lib/data-dimensions/dimension.d.ts +16 -0
- package/lib/data-dimensions/index.d.ts +9 -0
- package/lib/data-dimensions/ordinal/ordinal-chart-position/ordinal-chart-position-builder.d.ts +53 -0
- package/lib/data-dimensions/ordinal/ordinal-chart-position/ordinal-chart-position-options.d.ts +8 -0
- package/lib/data-dimensions/ordinal/ordinal-chart-position/ordinal-chart-position.d.ts +44 -0
- package/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value-builder.d.ts +45 -0
- package/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value-options.d.ts +7 -0
- package/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value.d.ts +38 -0
- package/lib/data-export/data-export-config.d.ts +50 -0
- package/lib/data-export/data-export.d.ts +7 -0
- package/lib/data-export/index.d.ts +2 -0
- package/lib/dots/config/dots-builder.d.ts +110 -0
- package/lib/dots/config/dots-config.d.ts +26 -0
- package/lib/dots/config/dots-options.d.ts +17 -0
- package/lib/dots/dots.component.d.ts +55 -0
- package/lib/dots/dots.module.d.ts +8 -0
- package/lib/dots/events/actions/dots-hover-actions.d.ts +6 -0
- package/lib/dots/events/actions/dots-hover-move-actions.d.ts +10 -0
- package/lib/dots/events/dots-events.directive.d.ts +37 -0
- package/lib/dots/events/dots-interaction-output.d.ts +14 -0
- package/lib/dots/events/dots-tooltip-positioner.d.ts +13 -0
- package/lib/dots/index.d.ts +9 -0
- package/lib/events/events.directive.d.ts +43 -0
- package/lib/events/events.types.d.ts +34 -0
- package/lib/events/index.d.ts +4 -0
- package/lib/events/interaction-output.d.ts +33 -0
- package/lib/events/tooltip-positioner.d.ts +6 -0
- package/lib/fill-definitions/fill-definitions.d.ts +4 -0
- package/lib/fill-definitions/index.d.ts +1 -0
- package/lib/geographies/config/geographies-builder.d.ts +80 -0
- package/lib/geographies/config/geographies-config.d.ts +19 -0
- package/lib/geographies/config/geographies-options.d.ts +13 -0
- package/lib/geographies/config/layers/attribute-data-layer/attribute-data-layer-builder.d.ts +63 -0
- package/lib/geographies/config/layers/attribute-data-layer/attribute-data-layer-options.d.ts +16 -0
- package/lib/geographies/config/layers/attribute-data-layer/attribute-data-layer.d.ts +30 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data/attribute-data-dimension-builder.d.ts +40 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data/attribute-data-dimension-options.d.ts +8 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data/attribute-data-dimension.d.ts +18 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data-bin-enums.d.ts +10 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data-bin-types.d.ts +8 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/calculated-bins/calculated-bins-builder.d.ts +10 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/calculated-bins/calculated-bins-options.d.ts +4 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/calculated-bins/calculated-bins.d.ts +8 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins-builder.d.ts +14 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins-options.d.ts +4 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins.d.ts +20 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks-bins-builder.d.ts +29 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks-bins-options.d.ts +5 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks-bins.d.ts +23 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins-builder.d.ts +16 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins-options.d.ts +4 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins.d.ts +18 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins-builder.d.ts +21 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins-options.d.ts +5 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins.d.ts +24 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins-builder.d.ts +26 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins-options.d.ts +5 -0
- package/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins.d.ts +12 -0
- package/lib/geographies/config/layers/geographies-layer/geographies-layer-builder.d.ts +52 -0
- package/lib/geographies/config/layers/geographies-layer/geographies-layer-options.d.ts +16 -0
- package/lib/geographies/config/layers/geographies-layer/geographies-layer.d.ts +29 -0
- package/lib/geographies/config/layers/geojson-properties-layer/geojson-properties-layer-builder.d.ts +25 -0
- package/lib/geographies/config/layers/geojson-properties-layer/geojson-properties-layer-options.d.ts +11 -0
- package/lib/geographies/config/layers/geojson-properties-layer/geojson-properties-layer.d.ts +16 -0
- package/lib/geographies/config/layers/labels/geographies-labels-builder.d.ts +97 -0
- package/lib/geographies/config/layers/labels/geographies-labels-options.d.ts +33 -0
- package/lib/geographies/config/layers/labels/geographies-labels.d.ts +20 -0
- package/lib/geographies/events/actions/geographies-click-actions.d.ts +7 -0
- package/lib/geographies/events/actions/geographies-hover-actions.d.ts +7 -0
- package/lib/geographies/events/actions/geographies-hover-move-actions.d.ts +7 -0
- package/lib/geographies/events/geographies-events.directive.d.ts +38 -0
- package/lib/geographies/events/geographies-interaction-output.d.ts +16 -0
- package/lib/geographies/events/geographies-tooltip-positioner.d.ts +13 -0
- package/lib/geographies/geographies-feature.d.ts +5 -0
- package/lib/geographies/geographies.component.d.ts +36 -0
- package/lib/geographies/geographies.module.d.ts +8 -0
- package/lib/geographies/index.d.ts +32 -0
- package/lib/grouped-bars/config/grouped-bars-builder.d.ts +29 -0
- package/lib/grouped-bars/config/grouped-bars-config.d.ts +10 -0
- package/lib/grouped-bars/config/grouped-bars-options.d.ts +5 -0
- package/lib/grouped-bars/events/grouped-bars-events.directive.d.ts +35 -0
- package/lib/grouped-bars/grouped-bars.component.d.ts +19 -0
- package/lib/grouped-bars/grouped-bars.module.d.ts +8 -0
- package/lib/grouped-bars/index.d.ts +7 -0
- package/lib/image-download/image-download-config.d.ts +31 -0
- package/lib/image-download/image-download-enums.d.ts +6 -0
- package/lib/image-download/image-download-options.d.ts +14 -0
- package/lib/image-download/image-download.service.d.ts +16 -0
- package/lib/image-download/index.d.ts +4 -0
- package/lib/lines/config/area-fills/area-fills-builder.d.ts +45 -0
- package/lib/lines/config/area-fills/area-fills-options.d.ts +7 -0
- package/lib/lines/config/area-fills/area-fills.d.ts +9 -0
- package/lib/lines/config/lines-builder.d.ts +101 -0
- package/lib/lines/config/lines-config.d.ts +37 -0
- package/lib/lines/config/lines-options.d.ts +18 -0
- package/lib/lines/config/stroke/lines-stroke-builder.d.ts +59 -0
- package/lib/lines/config/stroke/lines-stroke-options.d.ts +5 -0
- package/lib/lines/config/stroke/lines-stroke.d.ts +7 -0
- package/lib/lines/events/actions/lines-click-actions.d.ts +6 -0
- package/lib/lines/events/actions/lines-hover-move-actions.d.ts +41 -0
- package/lib/lines/events/actions/lines-marker-click-actions.d.ts +6 -0
- package/lib/lines/events/lines-events.directive.d.ts +49 -0
- package/lib/lines/events/lines-interaction-output.d.ts +16 -0
- package/lib/lines/events/lines-tooltip-positioner.d.ts +13 -0
- package/lib/lines/index.d.ts +11 -0
- package/lib/lines/lines.component.d.ts +53 -0
- package/lib/lines/lines.module.d.ts +8 -0
- package/lib/map-legend/continuous-legend/continuous-legend.component.d.ts +18 -0
- package/lib/map-legend/discontinuous-legend/discontinuous-legend.component.d.ts +12 -0
- package/lib/map-legend/index.d.ts +2 -0
- package/lib/map-legend/map-legend-base.d.ts +33 -0
- package/lib/map-legend/map-legend.component.d.ts +27 -0
- package/lib/map-legend/map-legend.module.d.ts +7 -0
- package/lib/marks/aux-marks/aux-marks.d.ts +10 -0
- package/lib/marks/aux-marks/config/aux-marks-builder.d.ts +11 -0
- package/lib/marks/aux-marks/config/aux-marks-config.d.ts +4 -0
- package/lib/marks/config/marks-config.d.ts +9 -0
- package/lib/marks/config/marks-options.d.ts +8 -0
- package/lib/marks/index.d.ts +15 -0
- package/lib/marks/map-marks/map-aux-marks/map-aux-marks.d.ts +17 -0
- package/lib/marks/map-marks/map-primary-marks/map-primary-marks.d.ts +20 -0
- package/lib/marks/marks.d.ts +31 -0
- package/lib/marks/primary-marks/config/primary-marks-builder.d.ts +32 -0
- package/lib/marks/primary-marks/config/primary-marks-config.d.ts +5 -0
- package/lib/marks/primary-marks/primary-marks.d.ts +23 -0
- package/lib/marks/xy-marks/xy-aux-marks/xy-aux-marks.d.ts +16 -0
- package/lib/marks/xy-marks/xy-marks-config.d.ts +4 -0
- package/lib/marks/xy-marks/xy-marks.d.ts +6 -0
- package/lib/marks/xy-marks/xy-primary-marks/xy-primary-marks-config.d.ts +4 -0
- package/lib/marks/xy-marks/xy-primary-marks/xy-primary-marks.d.ts +20 -0
- package/lib/point-markers/index.d.ts +2 -0
- package/lib/point-markers/point-markers-builder.d.ts +47 -0
- package/lib/point-markers/point-markers-options.d.ts +6 -0
- package/lib/point-markers/point-markers.d.ts +8 -0
- package/lib/quantitative-rules/config/labels/quantitative-rules-labels-builder.d.ts +60 -0
- package/lib/quantitative-rules/config/labels/quantitative-rules-labels-options.d.ts +9 -0
- package/lib/quantitative-rules/config/labels/quantitative-rules-labels.d.ts +11 -0
- package/lib/quantitative-rules/config/quantitative-rules-builder.d.ts +52 -0
- package/lib/quantitative-rules/config/quantitative-rules-config.d.ts +12 -0
- package/lib/quantitative-rules/config/quantitative-rules-dimensions.d.ts +8 -0
- package/lib/quantitative-rules/config/quantitative-rules-options.d.ts +10 -0
- package/lib/quantitative-rules/index.d.ts +6 -0
- package/lib/quantitative-rules/quantitative-rules.component.d.ts +27 -0
- package/lib/quantitative-rules/quantitative-rules.module.d.ts +7 -0
- package/lib/stacked-area/config/stacked-area-builder.d.ts +85 -0
- package/lib/stacked-area/config/stacked-area-config.d.ts +36 -0
- package/lib/stacked-area/config/stacked-area-options.d.ts +21 -0
- package/lib/stacked-area/events/actions/stacked-area-hover-move-actions.d.ts +7 -0
- package/lib/stacked-area/events/stacked-area-events.directive.d.ts +38 -0
- package/lib/stacked-area/events/stacked-area-interaction-output.d.ts +28 -0
- package/lib/stacked-area/events/stacked-area-tooltip-positioner.d.ts +16 -0
- package/lib/stacked-area/index.d.ts +7 -0
- package/lib/stacked-area/stacked-area.component.d.ts +51 -0
- package/lib/stacked-area/stacked-area.module.d.ts +8 -0
- package/lib/stacked-bars/config/stacked-bars-builder.d.ts +26 -0
- package/lib/stacked-bars/config/stacked-bars-config.d.ts +16 -0
- package/lib/stacked-bars/config/stacked-bars-options.d.ts +7 -0
- package/lib/stacked-bars/events/actions/stacked-bars-click-actions.d.ts +8 -0
- package/lib/stacked-bars/events/actions/stacked-bars-hover-actions.d.ts +8 -0
- package/lib/stacked-bars/events/actions/stacked-bars-hover-move-actions.d.ts +8 -0
- package/lib/stacked-bars/events/stacked-bars-events.directive.d.ts +39 -0
- package/lib/stacked-bars/index.d.ts +10 -0
- package/lib/stacked-bars/stacked-bars.component.d.ts +26 -0
- package/lib/stacked-bars/stacked-bars.module.d.ts +8 -0
- package/lib/stroke/base/stroke-base-options.d.ts +7 -0
- package/lib/stroke/base/stroke-base.d.ts +8 -0
- package/lib/stroke/index.d.ts +2 -0
- package/lib/stroke/stroke-builder.d.ts +56 -0
- package/lib/stroke/stroke-options.d.ts +4 -0
- package/lib/stroke/stroke.d.ts +6 -0
- package/lib/svg-text-wrap/index.d.ts +2 -0
- package/lib/svg-text-wrap/svg-text-wrap-builder.d.ts +58 -0
- package/lib/svg-text-wrap/svg-text-wrap-options.d.ts +8 -0
- package/lib/svg-text-wrap/svg-text-wrap.d.ts +13 -0
- package/lib/tooltips/config/tooltip.d.ts +5 -0
- package/lib/tooltips/html-tooltip/config/html-tooltip-builder.d.ts +57 -0
- package/lib/tooltips/html-tooltip/config/html-tooltip-config.d.ts +15 -0
- package/lib/tooltips/html-tooltip/config/html-tooltip-options.d.ts +11 -0
- package/lib/tooltips/html-tooltip/config/position/tooltip-position-builder.d.ts +34 -0
- package/lib/tooltips/html-tooltip/config/position/tooltip-position.d.ts +23 -0
- package/lib/tooltips/html-tooltip/config/size/tooltip-size-builder.d.ts +16 -0
- package/lib/tooltips/html-tooltip/config/size/tooltip-size-options.d.ts +8 -0
- package/lib/tooltips/html-tooltip/config/size/tooltip-size.d.ts +10 -0
- package/lib/tooltips/html-tooltip/html-tooltip.directive.d.ts +43 -0
- package/lib/tooltips/html-tooltip/html-tooltip.module.d.ts +10 -0
- package/lib/tooltips/html-tooltip/tooltip-triangle/tooltip-triangle.component.d.ts +7 -0
- package/lib/tooltips/index.d.ts +11 -0
- package/lib/xy-background/index.d.ts +2 -0
- package/lib/xy-background/xy-background.component.d.ts +9 -0
- package/lib/xy-background/xy-background.module.d.ts +7 -0
- package/package.json +40 -0
- package/public-api.d.ts +23 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { BarsLabels } from './bars-labels';
|
|
2
|
+
export declare class BarsLabelsBuilder<Datum> {
|
|
3
|
+
private _color;
|
|
4
|
+
private _display;
|
|
5
|
+
private _noValueFunction;
|
|
6
|
+
private _offset;
|
|
7
|
+
constructor();
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* Sets colors for the labels.
|
|
11
|
+
*
|
|
12
|
+
* The default label color is used for a label positioned outside of a bar. Additionally, if its contrast ratio with the bar color is higher than that of the withinBarAlternative color, it is used for a label positioned within a bar. Otherwise the withinBarAlternative color is used.
|
|
13
|
+
*
|
|
14
|
+
* @default { default: '#000000', withinBarAlternative: '#ffffff' }
|
|
15
|
+
*/
|
|
16
|
+
color(color: {
|
|
17
|
+
default: string;
|
|
18
|
+
withinBarAlternative: string;
|
|
19
|
+
}): this;
|
|
20
|
+
/**
|
|
21
|
+
* Sets whether labels are displayed or not. Labels will be created but not displayed if this is set to false.
|
|
22
|
+
*
|
|
23
|
+
* A user may want to set this to false if they want labels to display on hover, for example.
|
|
24
|
+
*
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
display(display: boolean): this;
|
|
28
|
+
/**
|
|
29
|
+
* Sets the function to set the text of the label when the value of the bar is null or undefined.
|
|
30
|
+
*
|
|
31
|
+
* If called with null, the default function is used.
|
|
32
|
+
*
|
|
33
|
+
* @default (d: Datum) => 'N/A'
|
|
34
|
+
*/
|
|
35
|
+
noValueFunction(noValueFunction: null): this;
|
|
36
|
+
noValueFunction(noValueFunction: (d: Datum) => string): this;
|
|
37
|
+
/**
|
|
38
|
+
* Sets the distance between the label and the end of the bar.
|
|
39
|
+
*
|
|
40
|
+
* @default 4
|
|
41
|
+
*/
|
|
42
|
+
offset(offset: number): this;
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
* This function is for internal use only and should never be called by the user.
|
|
46
|
+
*/
|
|
47
|
+
_build(): BarsLabels<Datum>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BarsLabelsOptions } from './bars-labels-options';
|
|
2
|
+
export declare class BarsLabels<Datum> implements BarsLabelsOptions<Datum> {
|
|
3
|
+
color: {
|
|
4
|
+
default: string;
|
|
5
|
+
withinBarAlternative: string;
|
|
6
|
+
};
|
|
7
|
+
display: boolean;
|
|
8
|
+
noValueFunction: (d: Datum) => string;
|
|
9
|
+
offset: number;
|
|
10
|
+
constructor(options: BarsLabels<Datum>);
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DataValue } from '../../../core/types/values';
|
|
2
|
+
import { EventAction } from '../../../events';
|
|
3
|
+
import { BarsHost } from '../bars-events.directive';
|
|
4
|
+
import { BarsInteractionOutput } from '../bars-interaction-output';
|
|
5
|
+
export declare class BarsClickEmitTooltipDataPauseOtherActions<Datum, TOrdinalValue extends DataValue> implements EventAction<BarsHost<Datum, TOrdinalValue>, BarsInteractionOutput<Datum>> {
|
|
6
|
+
onStart(host: BarsHost<Datum, TOrdinalValue>): void;
|
|
7
|
+
onEnd(host: BarsHost<Datum, TOrdinalValue>): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DataValue } from '../../../core/types/values';
|
|
2
|
+
import { EventAction } from '../../../events';
|
|
3
|
+
import { BarsHost } from '../bars-events.directive';
|
|
4
|
+
import { BarsInteractionOutput } from '../bars-interaction-output';
|
|
5
|
+
export declare class BarsHoverShowLabels<Datum, TOrdinalValue extends DataValue> implements EventAction<BarsHost<Datum, TOrdinalValue>, BarsInteractionOutput<Datum>> {
|
|
6
|
+
onStart(host: BarsHost<Datum, TOrdinalValue>): void;
|
|
7
|
+
onEnd(host: BarsHost<Datum, TOrdinalValue>): void;
|
|
8
|
+
}
|
|
9
|
+
export declare class BarsHoverEmitTooltipData<Datum, TOrdinalValue extends DataValue> implements EventAction<BarsHost<Datum, TOrdinalValue>, BarsInteractionOutput<Datum>> {
|
|
10
|
+
onStart(host: BarsHost<Datum, TOrdinalValue>): void;
|
|
11
|
+
onEnd(host: BarsHost<Datum, TOrdinalValue>): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DataValue } from '../../../core/types/values';
|
|
2
|
+
import { HoverMoveAction } from '../../../events';
|
|
3
|
+
import { BarsHost } from '../bars-events.directive';
|
|
4
|
+
import { BarsInteractionOutput } from '../bars-interaction-output';
|
|
5
|
+
export declare class BarsHoverMoveEmitTooltipData<Datum, TOrdinalValue extends DataValue> implements HoverMoveAction<BarsHost<Datum, TOrdinalValue>, BarsInteractionOutput<Datum>> {
|
|
6
|
+
onStart(host: BarsHost<Datum, TOrdinalValue>): void;
|
|
7
|
+
onEnd(host: BarsHost<Datum, TOrdinalValue>): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { DataValue } from '../../core/types/values';
|
|
4
|
+
import { EventAction, EventsDirective, EventType, HoverMoveAction, InputEventAction, MarksHost, UnlistenFunction } from '../../events';
|
|
5
|
+
import { BarDatum, BarsComponent } from '../bars.component';
|
|
6
|
+
import { BarsInteractionOutput } from './bars-interaction-output';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export interface BarsHost<Datum, TOrdinalValue extends DataValue, TBarsComponent extends BarsComponent<Datum, TOrdinalValue> = BarsComponent<Datum, TOrdinalValue>> extends MarksHost<BarsInteractionOutput<Datum>, TBarsComponent> {
|
|
9
|
+
getBarDatum(): BarDatum<TOrdinalValue> | null;
|
|
10
|
+
}
|
|
11
|
+
export declare class BarsEventsDirective<Datum, TOrdinalValue extends DataValue, TBarsComponent extends BarsComponent<Datum, TOrdinalValue> = BarsComponent<Datum, TOrdinalValue>> extends EventsDirective<BarsHost<Datum, TOrdinalValue>> implements BarsHost<Datum, TOrdinalValue, TBarsComponent> {
|
|
12
|
+
bars: TBarsComponent;
|
|
13
|
+
hoverActions: EventAction<BarsHost<Datum, TOrdinalValue>, BarsInteractionOutput<Datum>>[] | null;
|
|
14
|
+
hoverMoveActions: HoverMoveAction<BarsHost<Datum, TOrdinalValue>, BarsInteractionOutput<Datum>>[] | null;
|
|
15
|
+
clickActions: EventAction<BarsHost<Datum, TOrdinalValue>, BarsInteractionOutput<Datum>>[] | null;
|
|
16
|
+
inputEventActions: InputEventAction<BarsHost<Datum, TOrdinalValue>, BarsInteractionOutput<Datum>>[];
|
|
17
|
+
interactionOutput: EventEmitter<BarsInteractionOutput<Datum>>;
|
|
18
|
+
barDatum: BarDatum<TOrdinalValue>;
|
|
19
|
+
origin: SVGRectElement;
|
|
20
|
+
constructor(bars: TBarsComponent);
|
|
21
|
+
get marks(): TBarsComponent;
|
|
22
|
+
getElements(): Observable<Element[]>;
|
|
23
|
+
getBarDatum(): BarDatum<TOrdinalValue> | null;
|
|
24
|
+
setupListeners(elements: Element[]): UnlistenFunction[];
|
|
25
|
+
onEnter(_: PointerEvent, el: Element): void;
|
|
26
|
+
onMove(event: PointerEvent, _: Element): void;
|
|
27
|
+
onLeave(_: PointerEvent, __: Element): void;
|
|
28
|
+
onClick(event: PointerEvent, el: Element): void;
|
|
29
|
+
onClickRemove(): void;
|
|
30
|
+
onInputEvent(inputValue: unknown): void;
|
|
31
|
+
initFromElement(el: Element): void;
|
|
32
|
+
setPositionsFromElement(): void;
|
|
33
|
+
getInteractionOutput(type: EventType): BarsInteractionOutput<Datum>;
|
|
34
|
+
emitInteractionOutput(output: BarsInteractionOutput<Datum> | null): void;
|
|
35
|
+
private resetDirective;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BarsEventsDirective<any, any, any>, never>;
|
|
37
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BarsEventsDirective<any, any, any>, "[vicBarsEvents]", never, { "hoverActions": { "alias": "hoverActions"; "required": false; }; "hoverMoveActions": { "alias": "hoverMoveActions"; "required": false; }; "clickActions": { "alias": "clickActions"; "required": false; }; "inputEventActions": { "alias": "inputEventActions"; "required": false; }; }, { "interactionOutput": "interactionOutput"; }, never, never, true, never>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { InteractionOutput } from '../../events/interaction-output';
|
|
2
|
+
import { HtmlTooltipCdkManagedPosition } from '../../tooltips';
|
|
3
|
+
import { BarsTooltipDatum } from '../bars.component';
|
|
4
|
+
export interface BarsInteractionOutput<Datum> extends BarsTooltipDatum<Datum>, InteractionOutput {
|
|
5
|
+
/**
|
|
6
|
+
* A method that positions the tooltip with a user specified offset from the tooltip's anchor point.
|
|
7
|
+
*
|
|
8
|
+
* @param offset - Optional offset from the anchor's x and y position.
|
|
9
|
+
* If not provided, defaults to { x: 0, y: 0 }.
|
|
10
|
+
* If provided, the x value is added to the anchor's x position (moves tooltip right) and the y value is subtracted from the anchor's y position (moves tooltip up).
|
|
11
|
+
*/
|
|
12
|
+
fromAnchor: (offset?: Partial<{
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
}>) => HtmlTooltipCdkManagedPosition;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TooltipPositioner } from '../../events/tooltip-positioner';
|
|
2
|
+
import { HtmlTooltipCdkManagedPosition } from '../../tooltips';
|
|
3
|
+
export declare class BarsTooltipPositioner extends TooltipPositioner {
|
|
4
|
+
private anchor;
|
|
5
|
+
constructor(anchor: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
});
|
|
9
|
+
fromAnchor(offset: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
}): HtmlTooltipCdkManagedPosition;
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './bars.component';
|
|
2
|
+
export * from './bars.module';
|
|
3
|
+
export * from './config/bars-builder';
|
|
4
|
+
export * from './config/bars-config';
|
|
5
|
+
export * from './config/bars-options';
|
|
6
|
+
export * from './config/labels/bars-labels';
|
|
7
|
+
export * from './config/labels/bars-labels-options';
|
|
8
|
+
export * from './events/actions/bars-click-actions';
|
|
9
|
+
export * from './events/actions/bars-hover-actions';
|
|
10
|
+
export * from './events/actions/bars-hover-move-actions';
|
|
11
|
+
export * from './events/bars-events.directive';
|
|
12
|
+
export * from './events/bars-interaction-output';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { DestroyRef, ElementRef, NgZone, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ElementSpacing } from '../../core/types/layout';
|
|
4
|
+
import { Chart } from './chart';
|
|
5
|
+
import { ScalingStrategy } from './config/chart-builder';
|
|
6
|
+
import { ChartConfig } from './config/chart-config';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export interface Ranges {
|
|
9
|
+
x: [number, number];
|
|
10
|
+
y: [number, number];
|
|
11
|
+
}
|
|
12
|
+
export interface ChartResizing {
|
|
13
|
+
width: boolean;
|
|
14
|
+
height: boolean;
|
|
15
|
+
useViewbox: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface ReactiveConfig {
|
|
18
|
+
margin: ElementSpacing;
|
|
19
|
+
height: number;
|
|
20
|
+
width: number;
|
|
21
|
+
scalingStrategy: ScalingStrategy;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A base component that can be extended to create specific types of `Chart` components,
|
|
25
|
+
* each of which can serve as a wrapper component for one `PrimaryMarks` component and any
|
|
26
|
+
* other content that is projected into its content projection slots.
|
|
27
|
+
*
|
|
28
|
+
* <p class="comment-slots">Content projection slots</p>
|
|
29
|
+
*
|
|
30
|
+
* `html-elements-before`: Elements that will be projected before the chart's scaled div
|
|
31
|
+
* and scaled svg element in the DOM. USeful for adding elements that require access to chart scales.
|
|
32
|
+
*
|
|
33
|
+
* `svg-defs`: Used to create any required defs for the chart's svg element. For example, patterns or gradients.
|
|
34
|
+
*
|
|
35
|
+
* `svg-elements`: Used for all elements that should be children of the chart's scaled svg element.
|
|
36
|
+
*
|
|
37
|
+
* `html-elements-after`: Elements that will be projected after the chart's scaled div
|
|
38
|
+
* and scaled svg element in the DOM. USeful for adding elements that require access to chart scales.
|
|
39
|
+
*/
|
|
40
|
+
export declare class ChartComponent implements Chart, OnInit, OnChanges {
|
|
41
|
+
private ngZone;
|
|
42
|
+
config: ChartConfig;
|
|
43
|
+
divRef: ElementRef<HTMLDivElement>;
|
|
44
|
+
svgRef: ElementRef<SVGSVGElement>;
|
|
45
|
+
private _config;
|
|
46
|
+
config$: Observable<ChartConfig>;
|
|
47
|
+
protected readonly strategy$: Observable<ScalingStrategy>;
|
|
48
|
+
protected readonly widthCfg$: Observable<number>;
|
|
49
|
+
protected readonly minWidthCfg$: Observable<number>;
|
|
50
|
+
protected readonly heightCfg$: Observable<number>;
|
|
51
|
+
private readonly aspectRatioCfg$;
|
|
52
|
+
private readonly isFixedHeight$;
|
|
53
|
+
protected readonly marginCfg$: Observable<ElementSpacing>;
|
|
54
|
+
private readonly width$;
|
|
55
|
+
private readonly height$;
|
|
56
|
+
protected readonly svgDimensions$: Observable<{
|
|
57
|
+
width: number;
|
|
58
|
+
height: number;
|
|
59
|
+
}>;
|
|
60
|
+
readonly ranges$: Observable<Ranges>;
|
|
61
|
+
protected destroyRef: DestroyRef;
|
|
62
|
+
constructor(ngZone: NgZone);
|
|
63
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
64
|
+
ngOnInit(): void;
|
|
65
|
+
private observeElementWidth;
|
|
66
|
+
private getRangesFromSvgDimensions;
|
|
67
|
+
getViewBoxScale(): {
|
|
68
|
+
x: number;
|
|
69
|
+
y: number;
|
|
70
|
+
};
|
|
71
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartComponent, never>;
|
|
72
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartComponent, "vic-chart", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, ["[html-elements-before]", "[svg-defs]", "[svg-elements]", "[html-elements-after]"], true, never>;
|
|
73
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { ChartConfig } from './chart-config';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export type ScalingStrategy = 'fixed' | 'responsive-width' | 'viewbox';
|
|
4
|
+
export declare const CHART_SIZE: {
|
|
5
|
+
scaledWidth: number;
|
|
6
|
+
viewBoxWidth: number;
|
|
7
|
+
minWidth: number;
|
|
8
|
+
aspectRatio: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Builds a configuration object for a ChartComponent.
|
|
12
|
+
*
|
|
13
|
+
* 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: [VicChartConfigBuilder]` in the component decorator)
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
export declare class VicChartConfigBuilder {
|
|
17
|
+
private _aspectRatio?;
|
|
18
|
+
private _fixedHeight;
|
|
19
|
+
private _height;
|
|
20
|
+
private _margin;
|
|
21
|
+
private _minWidth;
|
|
22
|
+
private _scalingStrategy;
|
|
23
|
+
private _transitionDuration;
|
|
24
|
+
private _width;
|
|
25
|
+
constructor();
|
|
26
|
+
/**
|
|
27
|
+
* OPTIONAL. Explicitly sets the aspect ratio to use when scalingStrategy is 'responsive-width' and fixedHeight is false, or when scalingStrategy is 'viewbox'.
|
|
28
|
+
*
|
|
29
|
+
* @param value - The aspect ratio (width / height) to use. If not called or called with null, a default value of 16/9 will be used. If maxWidth and maxHeight are set, aspect ratio will be derived from those values.
|
|
30
|
+
*/
|
|
31
|
+
aspectRatio(value: number): this;
|
|
32
|
+
/**
|
|
33
|
+
* OPTIONAL. If set to true and used with 'responsive-width' scaling strategy, height will be fixed and not derived from aspect ratio.
|
|
34
|
+
*
|
|
35
|
+
* Has no effect if scaling strategy is 'fixed' or 'viewbox'.
|
|
36
|
+
*/
|
|
37
|
+
fixedHeight(value: boolean): this;
|
|
38
|
+
/**
|
|
39
|
+
* OPTIONAL. Determines the margin that will be established between the edges of the svg and the svg's contents, in px.
|
|
40
|
+
*
|
|
41
|
+
* @param value - The margin that will be established between the edges of the svg and the svg's contents, in px. If called with null, a default value of `{ top: 36, right: 36, bottom: 36, left: 36 }` will be used.
|
|
42
|
+
*/
|
|
43
|
+
margin(value: {
|
|
44
|
+
top: number;
|
|
45
|
+
right: number;
|
|
46
|
+
bottom: number;
|
|
47
|
+
left: number;
|
|
48
|
+
} | null): this;
|
|
49
|
+
/**
|
|
50
|
+
* OPTIONAL. If scaling strategy is 'responsive-width' or 'viewbox', determines the maximum height of the chart. This will override any provided aspect ratio.
|
|
51
|
+
*
|
|
52
|
+
* If scaling strategy is 'fixed', sets the fixed height of the chart.
|
|
53
|
+
*
|
|
54
|
+
* @param value - The maximum height of the chart, in px. If chart size is static, the fixed height of the chart. If not called or called with `null`, chart height will be set via aspect ratio.
|
|
55
|
+
*/
|
|
56
|
+
maxHeight(value: number | null): this;
|
|
57
|
+
/**
|
|
58
|
+
* OPTIONAL. If scaling strategy is responsive-width or viewbox, sets the maximum width of the chart. In this case, this value is also used to determine the aspect ratio of the chart which will be maintained on resizing.
|
|
59
|
+
*
|
|
60
|
+
* If scaling strategy is fixed, sets the fixed width of the chart.
|
|
61
|
+
*
|
|
62
|
+
* @param value - The maximum width of the chart, in px. If chart size is static, the fixed width of the chart.
|
|
63
|
+
*
|
|
64
|
+
* If not called or called with `null`, a default value of 800 will be used.
|
|
65
|
+
*/
|
|
66
|
+
maxWidth(value: number | null): this;
|
|
67
|
+
/**
|
|
68
|
+
* OPTIONAL. If scaling strategy is responsive-width or viewbox, sets the minimum width of the chart. Has no effect if scaling strategy is fixed.
|
|
69
|
+
*
|
|
70
|
+
* @param value - The minimum width of the chart, in px. If not called or called with `null`, a default value of 320 will be used.
|
|
71
|
+
*/
|
|
72
|
+
minWidth(value: number | null): this;
|
|
73
|
+
/**
|
|
74
|
+
* OPTIONAL. Determines how the chart scales in response to container or window size changes.
|
|
75
|
+
*
|
|
76
|
+
* Default value, if not called, is 'responsive-width'.
|
|
77
|
+
*
|
|
78
|
+
* @param value - One of:
|
|
79
|
+
* - 'fixed': Chart dimensions remain constant. Width and height are fixed. Dimensions can be set with maxWidth and maxHeight.
|
|
80
|
+
* - 'responsive-width': Chart width responds to container; height is derived via aspect ratio, unless fixedHeight is true.
|
|
81
|
+
* - 'viewbox': Chart is scaled entirely via SVG viewBox. All resizing behavior is controlled through CSS.
|
|
82
|
+
*/
|
|
83
|
+
scalingStrategy(value: ScalingStrategy): this;
|
|
84
|
+
/**
|
|
85
|
+
* OPTIONAL. A time duration for all transitions in the chart, in ms.
|
|
86
|
+
*
|
|
87
|
+
* @@param value - The time duration for all transitions in the chart, in ms. If not called or called with null, a default value of 250 will be used.
|
|
88
|
+
*/
|
|
89
|
+
transitionDuration(value: number | null): this;
|
|
90
|
+
getConfig(): ChartConfig;
|
|
91
|
+
private validateBuilder;
|
|
92
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VicChartConfigBuilder, never>;
|
|
93
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<VicChartConfigBuilder>;
|
|
94
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ElementSpacing } from '../../../core/types/layout';
|
|
2
|
+
import { ScalingStrategy } from './chart-builder';
|
|
3
|
+
import { ChartOptions } from './chart-options';
|
|
4
|
+
export declare class ChartConfig implements ChartOptions {
|
|
5
|
+
aspectRatio?: number;
|
|
6
|
+
height: number | null;
|
|
7
|
+
isFixedHeight: boolean;
|
|
8
|
+
margin: ElementSpacing;
|
|
9
|
+
minWidth: number | null;
|
|
10
|
+
scalingStrategy: ScalingStrategy;
|
|
11
|
+
transitionDuration: number;
|
|
12
|
+
width: number | null;
|
|
13
|
+
viewBoxX: number;
|
|
14
|
+
viewBoxY: number;
|
|
15
|
+
constructor(config: ChartConfig);
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ElementSpacing } from '../../../core/types/layout';
|
|
2
|
+
import { ScalingStrategy } from './chart-builder';
|
|
3
|
+
export interface ChartOptions {
|
|
4
|
+
aspectRatio?: number;
|
|
5
|
+
height: number;
|
|
6
|
+
margin: ElementSpacing;
|
|
7
|
+
scalingStrategy: ScalingStrategy;
|
|
8
|
+
transitionDuration: number;
|
|
9
|
+
width: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./chart/chart.component";
|
|
3
|
+
import * as i2 from "./xy-chart/xy-chart.component";
|
|
4
|
+
import * as i3 from "./map-chart/map-chart.component";
|
|
5
|
+
export declare class VicChartModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VicChartModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<VicChartModule, never, [typeof i1.ChartComponent, typeof i2.XyChartComponent, typeof i3.MapChartComponent], [typeof i1.ChartComponent, typeof i2.XyChartComponent, typeof i3.MapChartComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<VicChartModule>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './chart.module';
|
|
2
|
+
export * from './chart/chart';
|
|
3
|
+
export * from './chart/chart.component';
|
|
4
|
+
export * from './chart/chart.token';
|
|
5
|
+
export * from './chart/config/chart-builder';
|
|
6
|
+
export * from './chart/config/chart-config';
|
|
7
|
+
export * from './map-chart/map-chart.component';
|
|
8
|
+
export * from './xy-chart/xy-chart.component';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { NgZone } from '@angular/core';
|
|
2
|
+
import { VicAttributeDataDimensionConfig } from '../../geographies/config/layers/attribute-data-layer/dimensions/attribute-data-bin-types';
|
|
3
|
+
import { Chart } from '../chart/chart';
|
|
4
|
+
import { ChartComponent } from '../chart/chart.component';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* A `Chart` component to be used with a `Geographies` `PrimaryMarks` component.
|
|
8
|
+
*
|
|
9
|
+
* This component adds an attribute data scale and config to the base `ChartComponent` that can
|
|
10
|
+
* be used by any components projected into the chart.
|
|
11
|
+
*
|
|
12
|
+
* Components that may use these scales include the `Geographies` component
|
|
13
|
+
* and the `MapLegend` component.
|
|
14
|
+
*
|
|
15
|
+
* <p class="comment-slots">Content projection slots</p>
|
|
16
|
+
*
|
|
17
|
+
* `html-elements-before`: Elements that will be projected before the chart's scaled div
|
|
18
|
+
* and scaled svg element in the DOM. USeful for adding elements that require access to chart scales.
|
|
19
|
+
*
|
|
20
|
+
* `svg-defs`: Used to create any required defs for the chart's svg element. For example, patterns or gradients.
|
|
21
|
+
*
|
|
22
|
+
* `svg-elements`: Used for all elements that should be children of the chart's scaled svg element.
|
|
23
|
+
*
|
|
24
|
+
* `html-elements-after`: Elements that will be projected after the chart's scaled div
|
|
25
|
+
* and scaled svg element in the DOM. USeful for adding elements that require access to chart scales.
|
|
26
|
+
*/
|
|
27
|
+
export declare class MapChartComponent<Datum> extends ChartComponent implements Chart {
|
|
28
|
+
private attributeProperties;
|
|
29
|
+
attributeProperties$: import("rxjs").Observable<{
|
|
30
|
+
config: VicAttributeDataDimensionConfig<Datum>;
|
|
31
|
+
scale: any;
|
|
32
|
+
}>;
|
|
33
|
+
protected zone: NgZone;
|
|
34
|
+
updateAttributeProperties(properties: {
|
|
35
|
+
config: VicAttributeDataDimensionConfig<Datum>;
|
|
36
|
+
scale: any;
|
|
37
|
+
}): void;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MapChartComponent<any>, never>;
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MapChartComponent<any>, "vic-map-chart", never, {}, {}, never, ["[html-elements-before]", "[svg-defs]", "[svg-elements]", "[html-elements-after]"], true, never>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { NgZone, OnInit } from '@angular/core';
|
|
2
|
+
import { GenericScale } from '../../core';
|
|
3
|
+
import { Chart } from '../chart/chart';
|
|
4
|
+
import { ChartComponent } from '../chart/chart.component';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare enum XyContentScale {
|
|
7
|
+
x = "x",
|
|
8
|
+
y = "y"
|
|
9
|
+
}
|
|
10
|
+
export interface XyChartScales {
|
|
11
|
+
[XyContentScale.x]: GenericScale<any, any>;
|
|
12
|
+
[XyContentScale.y]: GenericScale<any, any>;
|
|
13
|
+
useTransition: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A `Chart` component to be used with `PrimaryMarks` components that have X and Y axes, such as `Bars` and `Lines`.
|
|
17
|
+
*
|
|
18
|
+
* This component adds x, y, and categorical scales to the base `ChartComponent` that can
|
|
19
|
+
* be used by any components projected into the chart.
|
|
20
|
+
*
|
|
21
|
+
* <p class="comment-slots">Content projection slots</p>
|
|
22
|
+
*
|
|
23
|
+
* `html-elements-before`: Elements that will be projected before the chart's scaled div
|
|
24
|
+
* and scaled svg element in the DOM. USeful for adding elements that require access to chart scales.
|
|
25
|
+
*
|
|
26
|
+
* `svg-defs`: Used to create any required defs for the chart's svg element. For example, patterns or gradients.
|
|
27
|
+
*
|
|
28
|
+
* `svg-elements`: Used for all elements that should be children of the chart's scaled svg element.
|
|
29
|
+
*
|
|
30
|
+
* `html-elements-after`: Elements that will be projected after the chart's scaled div
|
|
31
|
+
* and scaled svg element in the DOM. USeful for adding elements that require access to chart scales.
|
|
32
|
+
*/
|
|
33
|
+
export declare class XyChartComponent extends ChartComponent implements Chart, OnInit {
|
|
34
|
+
private scales;
|
|
35
|
+
scales$: import("rxjs").Observable<XyChartScales>;
|
|
36
|
+
protected zone: NgZone;
|
|
37
|
+
updateScales(scales: Partial<XyChartScales>): void;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<XyChartComponent, never>;
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<XyChartComponent, "vic-xy-chart", never, {}, {}, never, ["[html-elements-before]", "[svg-defs]", "[svg-elements]", "[html-elements-after]"], true, never>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare enum Orientation {
|
|
2
|
+
horizontal = "horizontal",
|
|
3
|
+
vertical = "vertical"
|
|
4
|
+
}
|
|
5
|
+
export declare enum Side {
|
|
6
|
+
top = "top",
|
|
7
|
+
right = "right",
|
|
8
|
+
bottom = "bottom",
|
|
9
|
+
left = "left"
|
|
10
|
+
}
|
|
11
|
+
export interface ElementSpacing {
|
|
12
|
+
top: number;
|
|
13
|
+
right: number;
|
|
14
|
+
bottom: number;
|
|
15
|
+
left: number;
|
|
16
|
+
}
|
|
17
|
+
export interface Dimensions {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
}
|
|
21
|
+
export interface Position {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as CSSType from 'csstype';
|
|
2
|
+
export declare class ColorUtilities {
|
|
3
|
+
static getContrastRatio(foreground: string, background: string): number;
|
|
4
|
+
static getLuminance(color: string): number;
|
|
5
|
+
static sRGBToLinear(value: number): number;
|
|
6
|
+
/**
|
|
7
|
+
* @param backgroundColor string, provided by getFill
|
|
8
|
+
* @param darkColor
|
|
9
|
+
* @param lightColor
|
|
10
|
+
* @returns label fill color (either dark or light color)
|
|
11
|
+
*/
|
|
12
|
+
static getHigherContrastColorForBackground(backgroundColor: string, darkColor: CSSType.Property.Fill, lightColor: CSSType.Property.Fill): CSSType.Property.Fill;
|
|
13
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function isNumber(x: unknown): x is number;
|
|
2
|
+
export declare function isNumberArray(x: unknown[]): x is number[];
|
|
3
|
+
export declare function isDate(x: unknown): x is Date;
|
|
4
|
+
export declare function isFunction<T, U = unknown>(x: unknown): x is (...args: U[]) => T;
|
|
5
|
+
export declare function isPrimitiveType<T>(x: unknown): x is T;
|
|
6
|
+
export declare function isObject<T>(x: unknown): x is T;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface VicValueFormats {
|
|
2
|
+
integer: string;
|
|
3
|
+
integerNoComma: string;
|
|
4
|
+
percent: (digits: number) => string;
|
|
5
|
+
decimal: (digits: number) => string;
|
|
6
|
+
decimalNoComma: (digits: number) => string;
|
|
7
|
+
fullYear: string;
|
|
8
|
+
monthYear: string;
|
|
9
|
+
monthFullYear: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const valueFormat: VicValueFormats;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ValueExtent } from '../types/values';
|
|
2
|
+
export type VicFormatSpecifier<Datum> = string | ((x: Datum) => string);
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare class ValueUtilities {
|
|
7
|
+
static getValueRoundedToNSignificantFigures(value: number, sigFigures: number, valueExtent: keyof typeof ValueExtent): number;
|
|
8
|
+
private static validateSigFigures;
|
|
9
|
+
private static getRoundedDecimalLessThanOne;
|
|
10
|
+
private static getNewValueForNine;
|
|
11
|
+
private static getRoundingOffset;
|
|
12
|
+
static getValueRoundedToInterval(value: number, interval: number, valueExtent: keyof typeof ValueExtent): number;
|
|
13
|
+
static d3Format(value: Date | number, formatter: string): string;
|
|
14
|
+
static customFormat<Datum>(value: Datum, formatter: (x: Datum) => string): string;
|
|
15
|
+
static formatForHtmlAttribute(value: string): string;
|
|
16
|
+
}
|