@formant/ava 3.4.1-formant
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -0
- package/dist/ava.min.js +1 -0
- package/esm/advisor/advise-pipeline/advicesForChart.js +68 -0
- package/esm/advisor/advise-pipeline/data-to-advices.js +241 -0
- package/esm/advisor/advise-pipeline/index.js +1 -0
- package/esm/advisor/advise-pipeline/spec-mapping.js +500 -0
- package/esm/advisor/advisor.js +35 -0
- package/esm/advisor/constants.js +13 -0
- package/esm/advisor/index.js +2 -0
- package/esm/advisor/lint-pipeline/check-rules.js +43 -0
- package/esm/advisor/lint-pipeline/getChartType.js +109 -0
- package/esm/advisor/lint-pipeline/index.js +0 -0
- package/esm/advisor/lint-pipeline/lintRules.js +32 -0
- package/esm/advisor/ruler/index.js +74 -0
- package/esm/advisor/ruler/rules/aggregation-single-row.js +21 -0
- package/esm/advisor/ruler/rules/all-can-be-table.js +17 -0
- package/esm/advisor/ruler/rules/bar-series-qty.js +36 -0
- package/esm/advisor/ruler/rules/bar-without-axis-min.js +41 -0
- package/esm/advisor/ruler/rules/constants.js +6 -0
- package/esm/advisor/ruler/rules/data-check.js +40 -0
- package/esm/advisor/ruler/rules/data-field-qty.js +26 -0
- package/esm/advisor/ruler/rules/diff-pie-sector.js +33 -0
- package/esm/advisor/ruler/rules/index.js +68 -0
- package/esm/advisor/ruler/rules/landscape-or-portrait.js +40 -0
- package/esm/advisor/ruler/rules/limit-series.js +47 -0
- package/esm/advisor/ruler/rules/line-field-time-ordinal.js +25 -0
- package/esm/advisor/ruler/rules/no-redundant-field.js +32 -0
- package/esm/advisor/ruler/rules/nominal-enum-combinatorial.js +54 -0
- package/esm/advisor/ruler/rules/purpose-check.js +27 -0
- package/esm/advisor/ruler/rules/series-qty-limit.js +34 -0
- package/esm/advisor/ruler/rules/x-axis-line-fading.js +41 -0
- package/esm/advisor/ruler/types.js +1 -0
- package/esm/advisor/ruler/utils.js +54 -0
- package/esm/advisor/types.js +1 -0
- package/esm/advisor/utils/clone.js +32 -0
- package/esm/advisor/utils/compare.js +14 -0
- package/esm/advisor/utils/computeScore.js +25 -0
- package/esm/advisor/utils/deep-mix.js +76 -0
- package/esm/advisor/utils/hasSubset.js +3 -0
- package/esm/advisor/utils/index.js +8 -0
- package/esm/advisor/utils/inferDataType.js +70 -0
- package/esm/advisor/utils/intersects.js +3 -0
- package/esm/advisor/utils/isNil.js +4 -0
- package/esm/ckb/base.js +1310 -0
- package/esm/ckb/ckb.js +55 -0
- package/esm/ckb/constants.js +197 -0
- package/esm/ckb/i18n/index.js +23 -0
- package/esm/ckb/i18n/types.js +1 -0
- package/esm/ckb/i18n/zh-CN.js +525 -0
- package/esm/ckb/index.js +14 -0
- package/esm/ckb/types.js +1 -0
- package/esm/common/types.js +1 -0
- package/esm/data/analysis/field/index.js +336 -0
- package/esm/data/analysis/field/types.js +1 -0
- package/esm/data/analysis/graph/index.js +170 -0
- package/esm/data/analysis/graph/types.js +1 -0
- package/esm/data/analysis/index.js +1 -0
- package/esm/data/analysis/types.js +1 -0
- package/esm/data/dataset/field/baseFrame.js +76 -0
- package/esm/data/dataset/field/dataFrame.js +556 -0
- package/esm/data/dataset/field/index.js +3 -0
- package/esm/data/dataset/field/series.js +149 -0
- package/esm/data/dataset/field/types.js +1 -0
- package/esm/data/dataset/field/utils.js +58 -0
- package/esm/data/dataset/graph/index.js +186 -0
- package/esm/data/dataset/graph/types.js +1 -0
- package/esm/data/dataset/graph/utils.js +15 -0
- package/esm/data/dataset/index.js +1 -0
- package/esm/data/dataset/types.js +1 -0
- package/esm/data/index.js +5 -0
- package/esm/data/statistics/IQR.js +49 -0
- package/esm/data/statistics/base.js +248 -0
- package/esm/data/statistics/bayesian.js +25 -0
- package/esm/data/statistics/buishand-u.js +19 -0
- package/esm/data/statistics/caches.js +28 -0
- package/esm/data/statistics/cdf.js +25 -0
- package/esm/data/statistics/constants.js +12 -0
- package/esm/data/statistics/index.js +7 -0
- package/esm/data/statistics/lowess.js +80 -0
- package/esm/data/statistics/mannkendall-test.js +50 -0
- package/esm/data/statistics/maxabs.js +9 -0
- package/esm/data/statistics/pcorrtest.js +76 -0
- package/esm/data/statistics/pettitt-test.js +33 -0
- package/esm/data/statistics/quantile.js +56 -0
- package/esm/data/statistics/types.js +1 -0
- package/esm/data/statistics/vector.js +67 -0
- package/esm/data/statistics/window.js +55 -0
- package/esm/data/types.js +2 -0
- package/esm/data/utils/common.js +58 -0
- package/esm/data/utils/index.js +5 -0
- package/esm/data/utils/isType/constants.js +24 -0
- package/esm/data/utils/isType/index.js +2 -0
- package/esm/data/utils/isType/isDateString.js +104 -0
- package/esm/data/utils/isType/isType.js +78 -0
- package/esm/index.js +11 -0
- package/esm/insight/algorithms/base/compare.js +40 -0
- package/esm/insight/algorithms/categoryOutlier.js +4 -0
- package/esm/insight/algorithms/changePoint.js +10 -0
- package/esm/insight/algorithms/index.js +3 -0
- package/esm/insight/algorithms/trendDirection.js +4 -0
- package/esm/insight/chart/constants.js +25 -0
- package/esm/insight/chart/generator/homogeneous.js +70 -0
- package/esm/insight/chart/generator/index.js +2 -0
- package/esm/insight/chart/generator/insights.js +16 -0
- package/esm/insight/chart/index.js +4 -0
- package/esm/insight/chart/strategy/augmentedMarks/categoryOutlier.js +30 -0
- package/esm/insight/chart/strategy/augmentedMarks/changePoint.js +42 -0
- package/esm/insight/chart/strategy/augmentedMarks/correlation.js +6 -0
- package/esm/insight/chart/strategy/augmentedMarks/homogeneous.js +5 -0
- package/esm/insight/chart/strategy/augmentedMarks/index.js +8 -0
- package/esm/insight/chart/strategy/augmentedMarks/lowVariance.js +23 -0
- package/esm/insight/chart/strategy/augmentedMarks/majority.js +5 -0
- package/esm/insight/chart/strategy/augmentedMarks/timeSeriesOutlier.js +82 -0
- package/esm/insight/chart/strategy/augmentedMarks/trend.js +26 -0
- package/esm/insight/chart/strategy/chart.js +45 -0
- package/esm/insight/chart/strategy/commonMarks/areaMark.js +12 -0
- package/esm/insight/chart/strategy/commonMarks/index.js +5 -0
- package/esm/insight/chart/strategy/commonMarks/intervalMark.js +14 -0
- package/esm/insight/chart/strategy/commonMarks/lineMark.js +34 -0
- package/esm/insight/chart/strategy/commonMarks/pointMark.js +17 -0
- package/esm/insight/chart/strategy/commonMarks/textMark.js +28 -0
- package/esm/insight/chart/strategy/index.js +4 -0
- package/esm/insight/chart/strategy/viewSpec.js +16 -0
- package/esm/insight/chart/types.js +1 -0
- package/esm/insight/chart/utils.js +4 -0
- package/esm/insight/constant.js +21 -0
- package/esm/insight/index.js +5 -0
- package/esm/insight/insights/checkers.js +97 -0
- package/esm/insight/insights/extractors/categoryOutlier.js +90 -0
- package/esm/insight/insights/extractors/changePoint.js +55 -0
- package/esm/insight/insights/extractors/correlation.js +38 -0
- package/esm/insight/insights/extractors/homogeneous.js +98 -0
- package/esm/insight/insights/extractors/lowVariance.js +49 -0
- package/esm/insight/insights/extractors/majority.js +66 -0
- package/esm/insight/insights/extractors/timeSeriesOutlier.js +61 -0
- package/esm/insight/insights/extractors/trend.js +49 -0
- package/esm/insight/insights/index.js +28 -0
- package/esm/insight/insights/util.js +77 -0
- package/esm/insight/narrative/factory.js +22 -0
- package/esm/insight/narrative/index.js +14 -0
- package/esm/insight/narrative/strategy/base.js +6 -0
- package/esm/insight/narrative/strategy/categoryOutlier.js +74 -0
- package/esm/insight/narrative/strategy/changePoint.js +52 -0
- package/esm/insight/narrative/strategy/commonness.js +45 -0
- package/esm/insight/narrative/strategy/correlation.js +51 -0
- package/esm/insight/narrative/strategy/exception.js +70 -0
- package/esm/insight/narrative/strategy/helpers.js +25 -0
- package/esm/insight/narrative/strategy/index.js +13 -0
- package/esm/insight/narrative/strategy/lowVariance.js +48 -0
- package/esm/insight/narrative/strategy/majority.js +62 -0
- package/esm/insight/narrative/strategy/timeSeriesOutlier.js +92 -0
- package/esm/insight/narrative/strategy/trend.js +57 -0
- package/esm/insight/pipeline/extract.js +236 -0
- package/esm/insight/pipeline/index.js +11 -0
- package/esm/insight/pipeline/insight.js +81 -0
- package/esm/insight/pipeline/preprocess.js +33 -0
- package/esm/insight/pipeline/specificInsight.js +71 -0
- package/esm/insight/pipeline/util.js +14 -0
- package/esm/insight/pipeline/visualize.js +41 -0
- package/esm/insight/types.js +1 -0
- package/esm/insight/utils/aggregate.js +87 -0
- package/esm/insight/utils/common.js +35 -0
- package/esm/ntv/generate/generateTextSpec.js +157 -0
- package/esm/ntv/generate/index.js +5 -0
- package/esm/ntv/generate/types.js +1 -0
- package/esm/ntv/generate/utils.js +86 -0
- package/esm/ntv/index.js +4 -0
- package/esm/ntv/schema/common.js +1 -0
- package/esm/ntv/schema/index.js +4 -0
- package/esm/ntv/schema/paragraph.js +1 -0
- package/esm/ntv/schema/phrase.js +52 -0
- package/esm/ntv/schema/structure.js +1 -0
- package/esm/ntv/types.js +1 -0
- package/esm/ntv/utils/index.js +1 -0
- package/esm/ntv/utils/isSpecType.js +58 -0
- package/esm/utils/arr2map.js +7 -0
- package/esm/utils/dataFormat.js +32 -0
- package/esm/utils/index.js +3 -0
- package/esm/utils/isType.js +14 -0
- package/lib/advisor/advise-pipeline/advicesForChart.d.ts +13 -0
- package/lib/advisor/advise-pipeline/advicesForChart.js +73 -0
- package/lib/advisor/advise-pipeline/data-to-advices.d.ts +22 -0
- package/lib/advisor/advise-pipeline/data-to-advices.js +245 -0
- package/lib/advisor/advise-pipeline/index.d.ts +1 -0
- package/lib/advisor/advise-pipeline/index.js +5 -0
- package/lib/advisor/advise-pipeline/spec-mapping.d.ts +14 -0
- package/lib/advisor/advise-pipeline/spec-mapping.js +504 -0
- package/lib/advisor/advisor.d.ts +18 -0
- package/lib/advisor/advisor.js +38 -0
- package/lib/advisor/constants.d.ts +1 -0
- package/lib/advisor/constants.js +16 -0
- package/lib/advisor/index.d.ts +2 -0
- package/lib/advisor/index.js +7 -0
- package/lib/advisor/lint-pipeline/check-rules.d.ts +4 -0
- package/lib/advisor/lint-pipeline/check-rules.js +47 -0
- package/lib/advisor/lint-pipeline/getChartType.d.ts +7 -0
- package/lib/advisor/lint-pipeline/getChartType.js +113 -0
- package/lib/advisor/lint-pipeline/index.d.ts +0 -0
- package/lib/advisor/lint-pipeline/index.js +0 -0
- package/lib/advisor/lint-pipeline/lintRules.d.ts +5 -0
- package/lib/advisor/lint-pipeline/lintRules.js +36 -0
- package/lib/advisor/ruler/index.d.ts +21 -0
- package/lib/advisor/ruler/index.js +80 -0
- package/lib/advisor/ruler/rules/aggregation-single-row.d.ts +2 -0
- package/lib/advisor/ruler/rules/aggregation-single-row.js +24 -0
- package/lib/advisor/ruler/rules/all-can-be-table.d.ts +2 -0
- package/lib/advisor/ruler/rules/all-can-be-table.js +20 -0
- package/lib/advisor/ruler/rules/bar-series-qty.d.ts +2 -0
- package/lib/advisor/ruler/rules/bar-series-qty.js +39 -0
- package/lib/advisor/ruler/rules/bar-without-axis-min.d.ts +2 -0
- package/lib/advisor/ruler/rules/bar-without-axis-min.js +44 -0
- package/lib/advisor/ruler/rules/constants.d.ts +6 -0
- package/lib/advisor/ruler/rules/constants.js +9 -0
- package/lib/advisor/ruler/rules/data-check.d.ts +2 -0
- package/lib/advisor/ruler/rules/data-check.js +43 -0
- package/lib/advisor/ruler/rules/data-field-qty.d.ts +2 -0
- package/lib/advisor/ruler/rules/data-field-qty.js +29 -0
- package/lib/advisor/ruler/rules/diff-pie-sector.d.ts +2 -0
- package/lib/advisor/ruler/rules/diff-pie-sector.js +36 -0
- package/lib/advisor/ruler/rules/index.d.ts +19 -0
- package/lib/advisor/ruler/rules/index.js +71 -0
- package/lib/advisor/ruler/rules/landscape-or-portrait.d.ts +2 -0
- package/lib/advisor/ruler/rules/landscape-or-portrait.js +43 -0
- package/lib/advisor/ruler/rules/limit-series.d.ts +2 -0
- package/lib/advisor/ruler/rules/limit-series.js +50 -0
- package/lib/advisor/ruler/rules/line-field-time-ordinal.d.ts +2 -0
- package/lib/advisor/ruler/rules/line-field-time-ordinal.js +28 -0
- package/lib/advisor/ruler/rules/no-redundant-field.d.ts +2 -0
- package/lib/advisor/ruler/rules/no-redundant-field.js +35 -0
- package/lib/advisor/ruler/rules/nominal-enum-combinatorial.d.ts +2 -0
- package/lib/advisor/ruler/rules/nominal-enum-combinatorial.js +57 -0
- package/lib/advisor/ruler/rules/purpose-check.d.ts +2 -0
- package/lib/advisor/ruler/rules/purpose-check.js +30 -0
- package/lib/advisor/ruler/rules/series-qty-limit.d.ts +2 -0
- package/lib/advisor/ruler/rules/series-qty-limit.js +37 -0
- package/lib/advisor/ruler/rules/x-axis-line-fading.d.ts +2 -0
- package/lib/advisor/ruler/rules/x-axis-line-fading.js +44 -0
- package/lib/advisor/ruler/types.d.ts +125 -0
- package/lib/advisor/ruler/types.js +2 -0
- package/lib/advisor/ruler/utils.d.ts +10 -0
- package/lib/advisor/ruler/utils.js +61 -0
- package/lib/advisor/types.d.ts +218 -0
- package/lib/advisor/types.js +4 -0
- package/lib/advisor/utils/clone.d.ts +2 -0
- package/lib/advisor/utils/clone.js +34 -0
- package/lib/advisor/utils/compare.d.ts +3 -0
- package/lib/advisor/utils/compare.js +17 -0
- package/lib/advisor/utils/computeScore.d.ts +7 -0
- package/lib/advisor/utils/computeScore.js +27 -0
- package/lib/advisor/utils/deep-mix.d.ts +2 -0
- package/lib/advisor/utils/deep-mix.js +78 -0
- package/lib/advisor/utils/hasSubset.d.ts +1 -0
- package/lib/advisor/utils/hasSubset.js +7 -0
- package/lib/advisor/utils/index.d.ts +5 -0
- package/lib/advisor/utils/index.js +19 -0
- package/lib/advisor/utils/inferDataType.d.ts +6 -0
- package/lib/advisor/utils/inferDataType.js +75 -0
- package/lib/advisor/utils/intersects.d.ts +1 -0
- package/lib/advisor/utils/intersects.js +7 -0
- package/lib/advisor/utils/isNil.d.ts +2 -0
- package/lib/advisor/utils/isNil.js +6 -0
- package/lib/ckb/base.d.ts +2 -0
- package/lib/ckb/base.js +1313 -0
- package/lib/ckb/ckb.d.ts +8 -0
- package/lib/ckb/ckb.js +59 -0
- package/lib/ckb/constants.d.ts +79 -0
- package/lib/ckb/constants.js +200 -0
- package/lib/ckb/i18n/index.d.ts +10 -0
- package/lib/ckb/i18n/index.js +27 -0
- package/lib/ckb/i18n/types.d.ts +52 -0
- package/lib/ckb/i18n/types.js +2 -0
- package/lib/ckb/i18n/zh-CN.d.ts +7 -0
- package/lib/ckb/i18n/zh-CN.js +528 -0
- package/lib/ckb/index.d.ts +4 -0
- package/lib/ckb/index.js +20 -0
- package/lib/ckb/types.d.ts +185 -0
- package/lib/ckb/types.js +2 -0
- package/lib/common/types.d.ts +14 -0
- package/lib/common/types.js +2 -0
- package/lib/data/analysis/field/index.d.ts +79 -0
- package/lib/data/analysis/field/index.js +355 -0
- package/lib/data/analysis/field/types.d.ts +99 -0
- package/lib/data/analysis/field/types.js +2 -0
- package/lib/data/analysis/graph/index.d.ts +28 -0
- package/lib/data/analysis/graph/index.js +178 -0
- package/lib/data/analysis/graph/types.d.ts +62 -0
- package/lib/data/analysis/graph/types.js +2 -0
- package/lib/data/analysis/index.d.ts +1 -0
- package/lib/data/analysis/index.js +5 -0
- package/lib/data/analysis/types.d.ts +1 -0
- package/lib/data/analysis/types.js +2 -0
- package/lib/data/dataset/field/baseFrame.d.ts +30 -0
- package/lib/data/dataset/field/baseFrame.js +78 -0
- package/lib/data/dataset/field/dataFrame.d.ts +35 -0
- package/lib/data/dataset/field/dataFrame.js +558 -0
- package/lib/data/dataset/field/index.d.ts +3 -0
- package/lib/data/dataset/field/index.js +8 -0
- package/lib/data/dataset/field/series.d.ts +18 -0
- package/lib/data/dataset/field/series.js +151 -0
- package/lib/data/dataset/field/types.d.ts +54 -0
- package/lib/data/dataset/field/types.js +2 -0
- package/lib/data/dataset/field/utils.d.ts +13 -0
- package/lib/data/dataset/field/utils.js +68 -0
- package/lib/data/dataset/graph/index.d.ts +18 -0
- package/lib/data/dataset/graph/index.js +188 -0
- package/lib/data/dataset/graph/types.d.ts +35 -0
- package/lib/data/dataset/graph/types.js +2 -0
- package/lib/data/dataset/graph/utils.d.ts +1 -0
- package/lib/data/dataset/graph/utils.js +19 -0
- package/lib/data/dataset/index.d.ts +1 -0
- package/lib/data/dataset/index.js +4 -0
- package/lib/data/dataset/types.d.ts +1 -0
- package/lib/data/dataset/types.js +4 -0
- package/lib/data/index.d.ts +5 -0
- package/lib/data/index.js +8 -0
- package/lib/data/statistics/IQR.d.ts +21 -0
- package/lib/data/statistics/IQR.js +53 -0
- package/lib/data/statistics/base.d.ts +106 -0
- package/lib/data/statistics/base.js +271 -0
- package/lib/data/statistics/bayesian.d.ts +5 -0
- package/lib/data/statistics/bayesian.js +30 -0
- package/lib/data/statistics/buishand-u.d.ts +7 -0
- package/lib/data/statistics/buishand-u.js +23 -0
- package/lib/data/statistics/caches.d.ts +13 -0
- package/lib/data/statistics/caches.js +33 -0
- package/lib/data/statistics/cdf.d.ts +7 -0
- package/lib/data/statistics/cdf.js +29 -0
- package/lib/data/statistics/constants.d.ts +5 -0
- package/lib/data/statistics/constants.js +15 -0
- package/lib/data/statistics/index.d.ts +7 -0
- package/lib/data/statistics/index.js +14 -0
- package/lib/data/statistics/lowess.d.ts +10 -0
- package/lib/data/statistics/lowess.js +87 -0
- package/lib/data/statistics/mannkendall-test.d.ts +15 -0
- package/lib/data/statistics/mannkendall-test.js +54 -0
- package/lib/data/statistics/maxabs.d.ts +5 -0
- package/lib/data/statistics/maxabs.js +13 -0
- package/lib/data/statistics/pcorrtest.d.ts +3 -0
- package/lib/data/statistics/pcorrtest.js +80 -0
- package/lib/data/statistics/pettitt-test.d.ts +9 -0
- package/lib/data/statistics/pettitt-test.js +38 -0
- package/lib/data/statistics/quantile.d.ts +16 -0
- package/lib/data/statistics/quantile.js +61 -0
- package/lib/data/statistics/types.d.ts +70 -0
- package/lib/data/statistics/types.js +2 -0
- package/lib/data/statistics/vector.d.ts +15 -0
- package/lib/data/statistics/vector.js +78 -0
- package/lib/data/statistics/window.d.ts +12 -0
- package/lib/data/statistics/window.js +60 -0
- package/lib/data/types.d.ts +2 -0
- package/lib/data/types.js +5 -0
- package/lib/data/utils/common.d.ts +26 -0
- package/lib/data/utils/common.js +67 -0
- package/lib/data/utils/index.d.ts +2 -0
- package/lib/data/utils/index.js +8 -0
- package/lib/data/utils/isType/constants.d.ts +15 -0
- package/lib/data/utils/isType/constants.js +27 -0
- package/lib/data/utils/isType/index.d.ts +2 -0
- package/lib/data/utils/isType/index.js +5 -0
- package/lib/data/utils/isType/isDateString.d.ts +18 -0
- package/lib/data/utils/isType/isDateString.js +111 -0
- package/lib/data/utils/isType/isType.d.ts +13 -0
- package/lib/data/utils/isType/isType.js +94 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.js +75 -0
- package/lib/insight/algorithms/base/compare.d.ts +14 -0
- package/lib/insight/algorithms/base/compare.js +45 -0
- package/lib/insight/algorithms/categoryOutlier.d.ts +4 -0
- package/lib/insight/algorithms/categoryOutlier.js +7 -0
- package/lib/insight/algorithms/changePoint.d.ts +10 -0
- package/lib/insight/algorithms/changePoint.js +13 -0
- package/lib/insight/algorithms/index.d.ts +3 -0
- package/lib/insight/algorithms/index.js +6 -0
- package/lib/insight/algorithms/trendDirection.d.ts +4 -0
- package/lib/insight/algorithms/trendDirection.js +7 -0
- package/lib/insight/chart/constants.d.ts +13 -0
- package/lib/insight/chart/constants.js +28 -0
- package/lib/insight/chart/generator/homogeneous.d.ts +3 -0
- package/lib/insight/chart/generator/homogeneous.js +75 -0
- package/lib/insight/chart/generator/index.d.ts +2 -0
- package/lib/insight/chart/generator/index.js +5 -0
- package/lib/insight/chart/generator/insights.d.ts +3 -0
- package/lib/insight/chart/generator/insights.js +20 -0
- package/lib/insight/chart/index.d.ts +4 -0
- package/lib/insight/chart/index.js +7 -0
- package/lib/insight/chart/strategy/augmentedMarks/categoryOutlier.d.ts +5 -0
- package/lib/insight/chart/strategy/augmentedMarks/categoryOutlier.js +35 -0
- package/lib/insight/chart/strategy/augmentedMarks/changePoint.d.ts +5 -0
- package/lib/insight/chart/strategy/augmentedMarks/changePoint.js +47 -0
- package/lib/insight/chart/strategy/augmentedMarks/correlation.d.ts +3 -0
- package/lib/insight/chart/strategy/augmentedMarks/correlation.js +10 -0
- package/lib/insight/chart/strategy/augmentedMarks/homogeneous.d.ts +3 -0
- package/lib/insight/chart/strategy/augmentedMarks/homogeneous.js +9 -0
- package/lib/insight/chart/strategy/augmentedMarks/index.d.ts +8 -0
- package/lib/insight/chart/strategy/augmentedMarks/index.js +24 -0
- package/lib/insight/chart/strategy/augmentedMarks/lowVariance.d.ts +5 -0
- package/lib/insight/chart/strategy/augmentedMarks/lowVariance.js +28 -0
- package/lib/insight/chart/strategy/augmentedMarks/majority.d.ts +3 -0
- package/lib/insight/chart/strategy/augmentedMarks/majority.js +9 -0
- package/lib/insight/chart/strategy/augmentedMarks/timeSeriesOutlier.d.ts +5 -0
- package/lib/insight/chart/strategy/augmentedMarks/timeSeriesOutlier.js +87 -0
- package/lib/insight/chart/strategy/augmentedMarks/trend.d.ts +5 -0
- package/lib/insight/chart/strategy/augmentedMarks/trend.js +31 -0
- package/lib/insight/chart/strategy/chart.d.ts +7 -0
- package/lib/insight/chart/strategy/chart.js +49 -0
- package/lib/insight/chart/strategy/commonMarks/areaMark.d.ts +3 -0
- package/lib/insight/chart/strategy/commonMarks/areaMark.js +16 -0
- package/lib/insight/chart/strategy/commonMarks/index.d.ts +5 -0
- package/lib/insight/chart/strategy/commonMarks/index.js +13 -0
- package/lib/insight/chart/strategy/commonMarks/intervalMark.d.ts +5 -0
- package/lib/insight/chart/strategy/commonMarks/intervalMark.js +18 -0
- package/lib/insight/chart/strategy/commonMarks/lineMark.d.ts +3 -0
- package/lib/insight/chart/strategy/commonMarks/lineMark.js +38 -0
- package/lib/insight/chart/strategy/commonMarks/pointMark.d.ts +5 -0
- package/lib/insight/chart/strategy/commonMarks/pointMark.js +21 -0
- package/lib/insight/chart/strategy/commonMarks/textMark.d.ts +5 -0
- package/lib/insight/chart/strategy/commonMarks/textMark.js +32 -0
- package/lib/insight/chart/strategy/index.d.ts +4 -0
- package/lib/insight/chart/strategy/index.js +10 -0
- package/lib/insight/chart/strategy/viewSpec.d.ts +3 -0
- package/lib/insight/chart/strategy/viewSpec.js +20 -0
- package/lib/insight/chart/types.d.ts +60 -0
- package/lib/insight/chart/types.js +2 -0
- package/lib/insight/chart/utils.d.ts +3 -0
- package/lib/insight/chart/utils.js +8 -0
- package/lib/insight/constant.d.ts +12 -0
- package/lib/insight/constant.js +24 -0
- package/lib/insight/index.d.ts +6 -0
- package/lib/insight/index.js +13 -0
- package/lib/insight/insights/checkers.d.ts +16 -0
- package/lib/insight/insights/checkers.js +107 -0
- package/lib/insight/insights/extractors/categoryOutlier.d.ts +12 -0
- package/lib/insight/insights/extractors/categoryOutlier.js +95 -0
- package/lib/insight/insights/extractors/changePoint.d.ts +8 -0
- package/lib/insight/insights/extractors/changePoint.js +60 -0
- package/lib/insight/insights/extractors/correlation.d.ts +9 -0
- package/lib/insight/insights/extractors/correlation.js +43 -0
- package/lib/insight/insights/extractors/homogeneous.d.ts +4 -0
- package/lib/insight/insights/extractors/homogeneous.js +103 -0
- package/lib/insight/insights/extractors/lowVariance.d.ts +8 -0
- package/lib/insight/insights/extractors/lowVariance.js +54 -0
- package/lib/insight/insights/extractors/majority.d.ts +10 -0
- package/lib/insight/insights/extractors/majority.js +71 -0
- package/lib/insight/insights/extractors/timeSeriesOutlier.d.ts +2 -0
- package/lib/insight/insights/extractors/timeSeriesOutlier.js +65 -0
- package/lib/insight/insights/extractors/trend.d.ts +9 -0
- package/lib/insight/insights/extractors/trend.js +54 -0
- package/lib/insight/insights/index.d.ts +12 -0
- package/lib/insight/insights/index.js +32 -0
- package/lib/insight/insights/util.d.ts +13 -0
- package/lib/insight/insights/util.js +87 -0
- package/lib/insight/narrative/factory.d.ts +6 -0
- package/lib/insight/narrative/factory.js +25 -0
- package/lib/insight/narrative/index.d.ts +3 -0
- package/lib/insight/narrative/index.js +18 -0
- package/lib/insight/narrative/strategy/base.d.ts +9 -0
- package/lib/insight/narrative/strategy/base.js +9 -0
- package/lib/insight/narrative/strategy/categoryOutlier.d.ts +9 -0
- package/lib/insight/narrative/strategy/categoryOutlier.js +76 -0
- package/lib/insight/narrative/strategy/changePoint.d.ts +8 -0
- package/lib/insight/narrative/strategy/changePoint.js +54 -0
- package/lib/insight/narrative/strategy/commonness.d.ts +9 -0
- package/lib/insight/narrative/strategy/commonness.js +47 -0
- package/lib/insight/narrative/strategy/correlation.d.ts +8 -0
- package/lib/insight/narrative/strategy/correlation.js +53 -0
- package/lib/insight/narrative/strategy/exception.d.ts +10 -0
- package/lib/insight/narrative/strategy/exception.js +72 -0
- package/lib/insight/narrative/strategy/helpers.d.ts +5 -0
- package/lib/insight/narrative/strategy/helpers.js +31 -0
- package/lib/insight/narrative/strategy/index.d.ts +9 -0
- package/lib/insight/narrative/strategy/index.js +28 -0
- package/lib/insight/narrative/strategy/lowVariance.d.ts +8 -0
- package/lib/insight/narrative/strategy/lowVariance.js +50 -0
- package/lib/insight/narrative/strategy/majority.d.ts +8 -0
- package/lib/insight/narrative/strategy/majority.js +64 -0
- package/lib/insight/narrative/strategy/timeSeriesOutlier.d.ts +8 -0
- package/lib/insight/narrative/strategy/timeSeriesOutlier.js +94 -0
- package/lib/insight/narrative/strategy/trend.d.ts +8 -0
- package/lib/insight/narrative/strategy/trend.js +59 -0
- package/lib/insight/pipeline/extract.d.ts +13 -0
- package/lib/insight/pipeline/extract.js +243 -0
- package/lib/insight/pipeline/index.d.ts +2 -0
- package/lib/insight/pipeline/index.js +15 -0
- package/lib/insight/pipeline/insight.d.ts +10 -0
- package/lib/insight/pipeline/insight.js +86 -0
- package/lib/insight/pipeline/preprocess.d.ts +6 -0
- package/lib/insight/pipeline/preprocess.js +39 -0
- package/lib/insight/pipeline/specificInsight.d.ts +11 -0
- package/lib/insight/pipeline/specificInsight.js +79 -0
- package/lib/insight/pipeline/util.d.ts +5 -0
- package/lib/insight/pipeline/util.js +20 -0
- package/lib/insight/pipeline/visualize.d.ts +3 -0
- package/lib/insight/pipeline/visualize.js +46 -0
- package/lib/insight/types.d.ts +238 -0
- package/lib/insight/types.js +2 -0
- package/lib/insight/utils/aggregate.d.ts +7 -0
- package/lib/insight/utils/aggregate.js +93 -0
- package/lib/insight/utils/common.d.ts +3 -0
- package/lib/insight/utils/common.js +41 -0
- package/lib/ntv/generate/generateTextSpec.d.ts +9 -0
- package/lib/ntv/generate/generateTextSpec.js +160 -0
- package/lib/ntv/generate/index.d.ts +2 -0
- package/lib/ntv/generate/index.js +12 -0
- package/lib/ntv/generate/types.d.ts +58 -0
- package/lib/ntv/generate/types.js +2 -0
- package/lib/ntv/generate/utils.d.ts +29 -0
- package/lib/ntv/generate/utils.js +96 -0
- package/lib/ntv/index.d.ts +4 -0
- package/lib/ntv/index.js +10 -0
- package/lib/ntv/schema/common.d.ts +17 -0
- package/lib/ntv/schema/common.js +2 -0
- package/lib/ntv/schema/index.d.ts +4 -0
- package/lib/ntv/schema/index.js +7 -0
- package/lib/ntv/schema/paragraph.d.ts +34 -0
- package/lib/ntv/schema/paragraph.js +2 -0
- package/lib/ntv/schema/phrase.d.ts +70 -0
- package/lib/ntv/schema/phrase.js +55 -0
- package/lib/ntv/schema/structure.d.ts +18 -0
- package/lib/ntv/schema/structure.js +2 -0
- package/lib/ntv/types.d.ts +2 -0
- package/lib/ntv/types.js +2 -0
- package/lib/ntv/utils/index.d.ts +1 -0
- package/lib/ntv/utils/index.js +4 -0
- package/lib/ntv/utils/isSpecType.d.ts +17 -0
- package/lib/ntv/utils/isSpecType.js +76 -0
- package/lib/utils/arr2map.d.ts +1 -0
- package/lib/utils/arr2map.js +11 -0
- package/lib/utils/dataFormat.d.ts +11 -0
- package/lib/utils/dataFormat.js +35 -0
- package/lib/utils/index.d.ts +3 -0
- package/lib/utils/index.js +8 -0
- package/lib/utils/isType.d.ts +4 -0
- package/lib/utils/isType.js +21 -0
- package/package.json +88 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PIE_RADIUS_STYLE = exports.ChartTypeMap = exports.TEXT_STYLE = exports.BOLD_FONT_WEIGHT = exports.INSIGHT_COLOR_PLATTE = void 0;
|
|
4
|
+
exports.INSIGHT_COLOR_PLATTE = {
|
|
5
|
+
highlight: '#E09322',
|
|
6
|
+
outlier: '#CB5140',
|
|
7
|
+
font: '#2C3542',
|
|
8
|
+
defaultPointColor: '#fff',
|
|
9
|
+
};
|
|
10
|
+
exports.BOLD_FONT_WEIGHT = 500;
|
|
11
|
+
exports.TEXT_STYLE = {
|
|
12
|
+
textAlign: 'center',
|
|
13
|
+
fill: exports.INSIGHT_COLOR_PLATTE.font,
|
|
14
|
+
opacity: 0.65,
|
|
15
|
+
};
|
|
16
|
+
exports.ChartTypeMap = {
|
|
17
|
+
category_outlier: 'column_chart',
|
|
18
|
+
trend: 'line_chart',
|
|
19
|
+
change_point: 'line_chart',
|
|
20
|
+
time_series_outlier: 'line_chart',
|
|
21
|
+
majority: 'pie_chart',
|
|
22
|
+
low_variance: 'column_chart',
|
|
23
|
+
correlation: 'scatter_plot',
|
|
24
|
+
};
|
|
25
|
+
exports.PIE_RADIUS_STYLE = {
|
|
26
|
+
innerRadius: 0.25,
|
|
27
|
+
outerRadius: 0.8,
|
|
28
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { HomogeneousPatternInfo, InsightInfo, InsightVisualizationSpec } from '../../types';
|
|
2
|
+
export declare function generateHomogeneousInsightAugmentedMarks(pattern: HomogeneousPatternInfo): any[];
|
|
3
|
+
export declare function generateHomogeneousInsightChartSpec(insight: InsightInfo<HomogeneousPatternInfo>, pattern: HomogeneousPatternInfo): InsightVisualizationSpec[];
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateHomogeneousInsightChartSpec = exports.generateHomogeneousInsightAugmentedMarks = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var constants_1 = require("../constants");
|
|
6
|
+
function generateHomogeneousInsightAugmentedMarks(pattern) {
|
|
7
|
+
var annotations = [];
|
|
8
|
+
var insightType = pattern.insightType, childPatterns = pattern.childPatterns;
|
|
9
|
+
if (['change_point', 'time_series_outlier'].includes(insightType)) {
|
|
10
|
+
var x_1 = childPatterns[0].x;
|
|
11
|
+
var text = insightType === 'change_point' ? 'Abrupt Change' : 'Outlier';
|
|
12
|
+
var color_1 = insightType === 'change_point' ? constants_1.INSIGHT_COLOR_PLATTE.highlight : constants_1.INSIGHT_COLOR_PLATTE.outlier;
|
|
13
|
+
// draw line
|
|
14
|
+
var line = {
|
|
15
|
+
type: 'line',
|
|
16
|
+
start: [x_1, 'min'],
|
|
17
|
+
end: [x_1, 'max'],
|
|
18
|
+
text: {
|
|
19
|
+
content: text,
|
|
20
|
+
position: 'left',
|
|
21
|
+
offsetY: 15,
|
|
22
|
+
offsetX: 5,
|
|
23
|
+
rotate: 0,
|
|
24
|
+
autoRotate: false,
|
|
25
|
+
style: {
|
|
26
|
+
textAlign: 'left',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
annotations.push(line);
|
|
31
|
+
// draw circle
|
|
32
|
+
var circles = childPatterns.map(function (pattern) {
|
|
33
|
+
var y = pattern.y;
|
|
34
|
+
return {
|
|
35
|
+
type: 'dataMarker',
|
|
36
|
+
position: [x_1, y],
|
|
37
|
+
point: {
|
|
38
|
+
style: {
|
|
39
|
+
fill: '#fff',
|
|
40
|
+
stroke: color_1,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
line: {
|
|
44
|
+
length: 20,
|
|
45
|
+
},
|
|
46
|
+
autoAdjust: false,
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
annotations.push.apply(annotations, tslib_1.__spreadArray([], tslib_1.__read(circles), false));
|
|
50
|
+
}
|
|
51
|
+
return annotations;
|
|
52
|
+
}
|
|
53
|
+
exports.generateHomogeneousInsightAugmentedMarks = generateHomogeneousInsightAugmentedMarks;
|
|
54
|
+
function generateHomogeneousInsightChartSpec(insight, pattern) {
|
|
55
|
+
var dimensions = insight.dimensions, measures = insight.measures;
|
|
56
|
+
var plotSchema;
|
|
57
|
+
if (measures.length > 1) {
|
|
58
|
+
plotSchema = {
|
|
59
|
+
xField: dimensions[0],
|
|
60
|
+
yField: 'value',
|
|
61
|
+
seriesField: 'measureName',
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
plotSchema = {
|
|
66
|
+
xField: dimensions[1],
|
|
67
|
+
yField: measures[0].fieldName,
|
|
68
|
+
seriesField: dimensions[0],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
var annotationConfig = generateHomogeneousInsightAugmentedMarks(pattern);
|
|
72
|
+
var chartSchema = tslib_1.__assign(tslib_1.__assign({}, plotSchema), { annotations: annotationConfig });
|
|
73
|
+
return chartSchema;
|
|
74
|
+
}
|
|
75
|
+
exports.generateHomogeneousInsightChartSpec = generateHomogeneousInsightChartSpec;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateInsightChartSpec = void 0;
|
|
4
|
+
var strategy_1 = require("../strategy");
|
|
5
|
+
function generateInsightChartSpec(insight) {
|
|
6
|
+
var _a;
|
|
7
|
+
var insightType = insight.patterns[0].type;
|
|
8
|
+
var insightType2Strategy = {
|
|
9
|
+
trend: strategy_1.trendStrategy,
|
|
10
|
+
time_series_outlier: strategy_1.timeSeriesOutlierStrategy,
|
|
11
|
+
category_outlier: strategy_1.categoryOutlierStrategy,
|
|
12
|
+
change_point: strategy_1.changePointStrategy,
|
|
13
|
+
low_variance: strategy_1.lowVarianceStrategy,
|
|
14
|
+
majority: strategy_1.majorityStrategy,
|
|
15
|
+
correlation: strategy_1.correlationStrategy,
|
|
16
|
+
};
|
|
17
|
+
var marks = (_a = insightType2Strategy[insightType]) === null || _a === void 0 ? void 0 : _a.call(insightType2Strategy, insight);
|
|
18
|
+
return (0, strategy_1.viewSpecStrategy)(marks, insight);
|
|
19
|
+
}
|
|
20
|
+
exports.generateInsightChartSpec = generateInsightChartSpec;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./generator/homogeneous"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./generator/insights"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./strategy/augmentedMarks"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Mark } from '@antv/g2';
|
|
2
|
+
import { InsightInfo, CategoryOutlierInfo } from '../../../types';
|
|
3
|
+
import { CategoryOutlierMark } from '../../types';
|
|
4
|
+
export declare const categoryOutlierAugmentedMarksStrategy: (insight: InsightInfo<CategoryOutlierInfo>) => CategoryOutlierMark[];
|
|
5
|
+
export declare const categoryOutlierStrategy: (insight: InsightInfo<CategoryOutlierInfo>) => Mark[];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.categoryOutlierStrategy = exports.categoryOutlierAugmentedMarksStrategy = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var lodash_1 = require("lodash");
|
|
6
|
+
var utils_1 = require("../../../../utils");
|
|
7
|
+
var constants_1 = require("../../constants");
|
|
8
|
+
var chart_1 = require("../chart");
|
|
9
|
+
var commonMarks_1 = require("../commonMarks");
|
|
10
|
+
var utils_2 = require("../../utils");
|
|
11
|
+
var categoryOutlierAugmentedMarksStrategy = function (insight) {
|
|
12
|
+
var patterns = insight.patterns;
|
|
13
|
+
if (!(0, lodash_1.size)(patterns))
|
|
14
|
+
return [];
|
|
15
|
+
var categoryOutlierMarks = [];
|
|
16
|
+
patterns.forEach(function (pattern) {
|
|
17
|
+
var rectMark = (0, commonMarks_1.intervalMarkStrategy)([pattern]);
|
|
18
|
+
var textMark = (0, commonMarks_1.textMarkStrategy)([pattern], {
|
|
19
|
+
style: { fontWeight: constants_1.BOLD_FONT_WEIGHT, dy: -8 },
|
|
20
|
+
formatter: utils_1.dataFormat,
|
|
21
|
+
});
|
|
22
|
+
categoryOutlierMarks.push({
|
|
23
|
+
categoryOutlier: [rectMark, textMark],
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
return categoryOutlierMarks;
|
|
27
|
+
};
|
|
28
|
+
exports.categoryOutlierAugmentedMarksStrategy = categoryOutlierAugmentedMarksStrategy;
|
|
29
|
+
var categoryOutlierStrategy = function (insight) {
|
|
30
|
+
var chart = (0, chart_1.insight2ChartStrategy)(insight);
|
|
31
|
+
var categoryOutlierMarks = (0, exports.categoryOutlierAugmentedMarksStrategy)(insight);
|
|
32
|
+
var marks = (0, utils_2.augmentedMarks2Marks)(categoryOutlierMarks);
|
|
33
|
+
return tslib_1.__spreadArray([chart], tslib_1.__read(marks), false);
|
|
34
|
+
};
|
|
35
|
+
exports.categoryOutlierStrategy = categoryOutlierStrategy;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Mark } from '@antv/g2';
|
|
2
|
+
import { ChangePointInfo, InsightInfo } from '../../../types';
|
|
3
|
+
import { ChangePointMark } from '../../types';
|
|
4
|
+
export declare const changePointAugmentedMarksStrategy: (insight: InsightInfo<ChangePointInfo>) => ChangePointMark[];
|
|
5
|
+
export declare const changePointStrategy: (insight: InsightInfo<ChangePointInfo>) => Mark[];
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.changePointStrategy = exports.changePointAugmentedMarksStrategy = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var lodash_1 = require("lodash");
|
|
6
|
+
var constants_1 = require("../../constants");
|
|
7
|
+
var utils_1 = require("../../../../utils");
|
|
8
|
+
var pointMark_1 = require("../commonMarks/pointMark");
|
|
9
|
+
var textMark_1 = require("../commonMarks/textMark");
|
|
10
|
+
var chart_1 = require("../chart");
|
|
11
|
+
var utils_2 = require("../../utils");
|
|
12
|
+
var changePointAugmentedMarksStrategy = function (insight) {
|
|
13
|
+
var patterns = insight.patterns;
|
|
14
|
+
var color = constants_1.INSIGHT_COLOR_PLATTE.highlight;
|
|
15
|
+
if (!(0, lodash_1.size)(patterns))
|
|
16
|
+
return [];
|
|
17
|
+
var measure = patterns[0].measure;
|
|
18
|
+
var changePointMarks = [];
|
|
19
|
+
patterns.forEach(function (pattern) {
|
|
20
|
+
var pointMark = (0, pointMark_1.pointMarkStrategy)([pattern], { style: { fill: color } });
|
|
21
|
+
var textMark = (0, textMark_1.textMarkStrategy)([pattern], {
|
|
22
|
+
formatter: utils_1.dataFormat,
|
|
23
|
+
label: function (pt) { return "".concat(pt.x, ", ").concat(measure, ": ").concat(pt.y); },
|
|
24
|
+
style: {
|
|
25
|
+
dy: -20,
|
|
26
|
+
background: true,
|
|
27
|
+
backgroundRadius: 2,
|
|
28
|
+
connector: true,
|
|
29
|
+
startMarker: true,
|
|
30
|
+
startMarkerFill: '#2C3542',
|
|
31
|
+
startMarkerFillOpacity: 0.65,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
changePointMarks.push({
|
|
35
|
+
changePoint: [pointMark, textMark],
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
return changePointMarks;
|
|
39
|
+
};
|
|
40
|
+
exports.changePointAugmentedMarksStrategy = changePointAugmentedMarksStrategy;
|
|
41
|
+
var changePointStrategy = function (insight) {
|
|
42
|
+
var chart = (0, chart_1.insight2ChartStrategy)(insight);
|
|
43
|
+
var changePointMarks = (0, exports.changePointAugmentedMarksStrategy)(insight);
|
|
44
|
+
var marks = (0, utils_2.augmentedMarks2Marks)(changePointMarks);
|
|
45
|
+
return tslib_1.__spreadArray([chart], tslib_1.__read(marks), false);
|
|
46
|
+
};
|
|
47
|
+
exports.changePointStrategy = changePointStrategy;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.correlationStrategy = void 0;
|
|
4
|
+
var chart_1 = require("../chart");
|
|
5
|
+
var correlationStrategy = function (insight) {
|
|
6
|
+
// todo add correlation regression line and value
|
|
7
|
+
var chartMark = (0, chart_1.insight2ChartStrategy)(insight);
|
|
8
|
+
return [chartMark];
|
|
9
|
+
};
|
|
10
|
+
exports.correlationStrategy = correlationStrategy;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.homogeneousStrategy = void 0;
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5
|
+
var homogeneousStrategy = function (_insight) {
|
|
6
|
+
// colorField: string
|
|
7
|
+
return {};
|
|
8
|
+
};
|
|
9
|
+
exports.homogeneousStrategy = homogeneousStrategy;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { trendStrategy, trendAugmentedMarksStrategy } from './trend';
|
|
2
|
+
export { lowVarianceStrategy, lowVarianceAugmentedMarkStrategy } from './lowVariance';
|
|
3
|
+
export { categoryOutlierStrategy, categoryOutlierAugmentedMarksStrategy } from './categoryOutlier';
|
|
4
|
+
export { changePointStrategy, changePointAugmentedMarksStrategy } from './changePoint';
|
|
5
|
+
export { majorityStrategy } from './majority';
|
|
6
|
+
export { correlationStrategy } from './correlation';
|
|
7
|
+
export { homogeneousStrategy } from './homogeneous';
|
|
8
|
+
export { timeSeriesOutlierStrategy, timeSeriesOutlierStrategyAugmentedMarksStrategy } from './timeSeriesOutlier';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.timeSeriesOutlierStrategyAugmentedMarksStrategy = exports.timeSeriesOutlierStrategy = exports.homogeneousStrategy = exports.correlationStrategy = exports.majorityStrategy = exports.changePointAugmentedMarksStrategy = exports.changePointStrategy = exports.categoryOutlierAugmentedMarksStrategy = exports.categoryOutlierStrategy = exports.lowVarianceAugmentedMarkStrategy = exports.lowVarianceStrategy = exports.trendAugmentedMarksStrategy = exports.trendStrategy = void 0;
|
|
4
|
+
var trend_1 = require("./trend");
|
|
5
|
+
Object.defineProperty(exports, "trendStrategy", { enumerable: true, get: function () { return trend_1.trendStrategy; } });
|
|
6
|
+
Object.defineProperty(exports, "trendAugmentedMarksStrategy", { enumerable: true, get: function () { return trend_1.trendAugmentedMarksStrategy; } });
|
|
7
|
+
var lowVariance_1 = require("./lowVariance");
|
|
8
|
+
Object.defineProperty(exports, "lowVarianceStrategy", { enumerable: true, get: function () { return lowVariance_1.lowVarianceStrategy; } });
|
|
9
|
+
Object.defineProperty(exports, "lowVarianceAugmentedMarkStrategy", { enumerable: true, get: function () { return lowVariance_1.lowVarianceAugmentedMarkStrategy; } });
|
|
10
|
+
var categoryOutlier_1 = require("./categoryOutlier");
|
|
11
|
+
Object.defineProperty(exports, "categoryOutlierStrategy", { enumerable: true, get: function () { return categoryOutlier_1.categoryOutlierStrategy; } });
|
|
12
|
+
Object.defineProperty(exports, "categoryOutlierAugmentedMarksStrategy", { enumerable: true, get: function () { return categoryOutlier_1.categoryOutlierAugmentedMarksStrategy; } });
|
|
13
|
+
var changePoint_1 = require("./changePoint");
|
|
14
|
+
Object.defineProperty(exports, "changePointStrategy", { enumerable: true, get: function () { return changePoint_1.changePointStrategy; } });
|
|
15
|
+
Object.defineProperty(exports, "changePointAugmentedMarksStrategy", { enumerable: true, get: function () { return changePoint_1.changePointAugmentedMarksStrategy; } });
|
|
16
|
+
var majority_1 = require("./majority");
|
|
17
|
+
Object.defineProperty(exports, "majorityStrategy", { enumerable: true, get: function () { return majority_1.majorityStrategy; } });
|
|
18
|
+
var correlation_1 = require("./correlation");
|
|
19
|
+
Object.defineProperty(exports, "correlationStrategy", { enumerable: true, get: function () { return correlation_1.correlationStrategy; } });
|
|
20
|
+
var homogeneous_1 = require("./homogeneous");
|
|
21
|
+
Object.defineProperty(exports, "homogeneousStrategy", { enumerable: true, get: function () { return homogeneous_1.homogeneousStrategy; } });
|
|
22
|
+
var timeSeriesOutlier_1 = require("./timeSeriesOutlier");
|
|
23
|
+
Object.defineProperty(exports, "timeSeriesOutlierStrategy", { enumerable: true, get: function () { return timeSeriesOutlier_1.timeSeriesOutlierStrategy; } });
|
|
24
|
+
Object.defineProperty(exports, "timeSeriesOutlierStrategyAugmentedMarksStrategy", { enumerable: true, get: function () { return timeSeriesOutlier_1.timeSeriesOutlierStrategyAugmentedMarksStrategy; } });
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Mark } from '@antv/g2';
|
|
2
|
+
import { LowVarianceInfo, InsightInfo } from '../../../types';
|
|
3
|
+
import { LowVarianceMark } from '../../types';
|
|
4
|
+
export declare const lowVarianceAugmentedMarkStrategy: (insight: InsightInfo<LowVarianceInfo>) => LowVarianceMark[];
|
|
5
|
+
export declare const lowVarianceStrategy: (insight: InsightInfo<LowVarianceInfo>) => Mark[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lowVarianceStrategy = exports.lowVarianceAugmentedMarkStrategy = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var commonMarks_1 = require("../commonMarks");
|
|
6
|
+
var chart_1 = require("../chart");
|
|
7
|
+
var utils_1 = require("../../utils");
|
|
8
|
+
var utils_2 = require("../../../../utils");
|
|
9
|
+
var lowVarianceAugmentedMarkStrategy = function (insight) {
|
|
10
|
+
var patterns = insight.patterns;
|
|
11
|
+
var marks = [];
|
|
12
|
+
patterns.forEach(function (pattern) {
|
|
13
|
+
var mean = pattern.mean;
|
|
14
|
+
var meanLineMark = (0, commonMarks_1.lineMarkStrategy)({ y: mean }, { label: "mean: ".concat((0, utils_2.dataFormat)(mean)) });
|
|
15
|
+
marks.push({
|
|
16
|
+
meanLine: [meanLineMark],
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
return marks;
|
|
20
|
+
};
|
|
21
|
+
exports.lowVarianceAugmentedMarkStrategy = lowVarianceAugmentedMarkStrategy;
|
|
22
|
+
var lowVarianceStrategy = function (insight) {
|
|
23
|
+
var chartMark = (0, chart_1.insight2ChartStrategy)(insight);
|
|
24
|
+
var lowVarianceMarks = (0, exports.lowVarianceAugmentedMarkStrategy)(insight);
|
|
25
|
+
var marks = (0, utils_1.augmentedMarks2Marks)(lowVarianceMarks);
|
|
26
|
+
return tslib_1.__spreadArray([chartMark], tslib_1.__read(marks), false);
|
|
27
|
+
};
|
|
28
|
+
exports.lowVarianceStrategy = lowVarianceStrategy;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.majorityStrategy = void 0;
|
|
4
|
+
var chart_1 = require("../chart");
|
|
5
|
+
var majorityStrategy = function (insight) {
|
|
6
|
+
var chartMark = (0, chart_1.insight2ChartStrategy)(insight);
|
|
7
|
+
return [chartMark];
|
|
8
|
+
};
|
|
9
|
+
exports.majorityStrategy = majorityStrategy;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Mark } from '@antv/g2';
|
|
2
|
+
import { TimeSeriesOutlierInfo, InsightInfo } from '../../../types';
|
|
3
|
+
import { TimeSeriesOutlierMark } from '../../types';
|
|
4
|
+
export declare const timeSeriesOutlierStrategyAugmentedMarksStrategy: (insight: InsightInfo<TimeSeriesOutlierInfo>) => TimeSeriesOutlierMark[];
|
|
5
|
+
export declare const timeSeriesOutlierStrategy: (insight: InsightInfo<TimeSeriesOutlierInfo>) => Mark[];
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.timeSeriesOutlierStrategy = exports.timeSeriesOutlierStrategyAugmentedMarksStrategy = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var chart_1 = require("../chart");
|
|
6
|
+
var commonMarks_1 = require("../commonMarks");
|
|
7
|
+
var BASELINE = 'baseline';
|
|
8
|
+
var INTERVAL = 'interval';
|
|
9
|
+
var OUTLIER = 'outlier';
|
|
10
|
+
var timeSeriesOutlierStrategyAugmentedMarksStrategy = function (insight) {
|
|
11
|
+
var chartData = insight.data, _a = tslib_1.__read(insight.dimensions, 1), dimensionName = _a[0].fieldName, patterns = insight.patterns;
|
|
12
|
+
var _b = patterns[0], baselines = _b.baselines, thresholds = _b.thresholds;
|
|
13
|
+
var data = chartData.map(function (datum, index) {
|
|
14
|
+
var baseline = baselines[index];
|
|
15
|
+
var interval = [baseline - Math.abs(thresholds[0]), baseline + thresholds[1]];
|
|
16
|
+
return {
|
|
17
|
+
baseline: {
|
|
18
|
+
x: datum[dimensionName],
|
|
19
|
+
y: baseline,
|
|
20
|
+
},
|
|
21
|
+
interval: {
|
|
22
|
+
x: datum[dimensionName],
|
|
23
|
+
y: interval,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
var intervalData = data.map(function (datum) { return datum[INTERVAL]; });
|
|
28
|
+
var intervalMark = (0, commonMarks_1.areaMarkStrategy)(intervalData, {
|
|
29
|
+
encode: {
|
|
30
|
+
shape: 'smooth',
|
|
31
|
+
},
|
|
32
|
+
style: {
|
|
33
|
+
fillOpacity: 0.3,
|
|
34
|
+
fill: '#ffd8b8',
|
|
35
|
+
},
|
|
36
|
+
tooltip: {
|
|
37
|
+
title: '',
|
|
38
|
+
items: [
|
|
39
|
+
function (_d, i, _data, column) { return ({
|
|
40
|
+
name: INTERVAL,
|
|
41
|
+
value: "".concat(column.y.value[i], "-").concat(column.y1.value[i]),
|
|
42
|
+
color: '#ffd8b8',
|
|
43
|
+
}); },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
var baselineData = data.map(function (datum) { return datum[BASELINE]; });
|
|
48
|
+
var baselineMark = (0, commonMarks_1.lineMarkStrategy)({ points: baselineData }, {
|
|
49
|
+
encode: {
|
|
50
|
+
shape: 'smooth',
|
|
51
|
+
},
|
|
52
|
+
style: {
|
|
53
|
+
lineWidth: 1,
|
|
54
|
+
stroke: '#ffa45c',
|
|
55
|
+
lineDash: undefined,
|
|
56
|
+
},
|
|
57
|
+
tooltip: {
|
|
58
|
+
title: '',
|
|
59
|
+
items: [{ name: BASELINE, channel: 'y' }],
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
var outlierMark = (0, commonMarks_1.pointMarkStrategy)(patterns, {
|
|
63
|
+
style: {
|
|
64
|
+
fill: '#f4664a',
|
|
65
|
+
stroke: '#f4664a',
|
|
66
|
+
},
|
|
67
|
+
tooltip: {
|
|
68
|
+
title: '',
|
|
69
|
+
items: [{ name: OUTLIER, channel: 'y' }],
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
return [
|
|
73
|
+
{
|
|
74
|
+
trendLine: [baselineMark],
|
|
75
|
+
anomalyArea: [intervalMark],
|
|
76
|
+
outliers: [outlierMark],
|
|
77
|
+
},
|
|
78
|
+
];
|
|
79
|
+
};
|
|
80
|
+
exports.timeSeriesOutlierStrategyAugmentedMarksStrategy = timeSeriesOutlierStrategyAugmentedMarksStrategy;
|
|
81
|
+
var timeSeriesOutlierStrategy = function (insight) {
|
|
82
|
+
// Should to support marks free combination
|
|
83
|
+
var chartMark = (0, chart_1.insight2ChartStrategy)(insight);
|
|
84
|
+
var _a = (0, exports.timeSeriesOutlierStrategyAugmentedMarksStrategy)(insight)[0] || {}, _b = _a.trendLine, trendLine = _b === void 0 ? [] : _b, _c = _a.anomalyArea, anomalyArea = _c === void 0 ? [] : _c, _e = _a.outliers, outliers = _e === void 0 ? [] : _e;
|
|
85
|
+
return tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read(anomalyArea), false), tslib_1.__read(trendLine), false), [chartMark], false), tslib_1.__read(outliers), false);
|
|
86
|
+
};
|
|
87
|
+
exports.timeSeriesOutlierStrategy = timeSeriesOutlierStrategy;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Mark } from '@antv/g2';
|
|
2
|
+
import { InsightInfo, TrendInfo } from '../../../types';
|
|
3
|
+
import { TrendMark } from '../../types';
|
|
4
|
+
export declare const trendAugmentedMarksStrategy: (insight: InsightInfo<TrendInfo>) => TrendMark[];
|
|
5
|
+
export declare const trendStrategy: (insight: InsightInfo<TrendInfo>) => Mark[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.trendStrategy = exports.trendAugmentedMarksStrategy = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var commonMarks_1 = require("../commonMarks");
|
|
6
|
+
var chart_1 = require("../chart");
|
|
7
|
+
var utils_1 = require("../../../../utils");
|
|
8
|
+
var trendAugmentedMarksStrategy = function (insight) {
|
|
9
|
+
var chartData = insight.data, _a = tslib_1.__read(insight.dimensions, 1), dimensionName = _a[0].fieldName, patterns = insight.patterns;
|
|
10
|
+
var points = chartData.map(function (datum, index) {
|
|
11
|
+
var points = patterns[0].regression.points;
|
|
12
|
+
var point = points[index];
|
|
13
|
+
return [datum[dimensionName], point];
|
|
14
|
+
});
|
|
15
|
+
var _b = tslib_1.__read(patterns[0].regression.equation, 2), m = _b[0], c = _b[1];
|
|
16
|
+
var lineData = points.map(function (point) { return ({ x: point[0], y: point[1] }); });
|
|
17
|
+
var regressionLineMark = (0, commonMarks_1.lineMarkStrategy)({ points: lineData }, { label: "y=".concat((0, utils_1.dataFormat)(m), "x").concat(c < 0 ? '' : '+').concat((0, utils_1.dataFormat)(c)) });
|
|
18
|
+
return [
|
|
19
|
+
{
|
|
20
|
+
trendLine: [regressionLineMark],
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
};
|
|
24
|
+
exports.trendAugmentedMarksStrategy = trendAugmentedMarksStrategy;
|
|
25
|
+
var trendStrategy = function (insight) {
|
|
26
|
+
var _a, _b;
|
|
27
|
+
var chart = (0, chart_1.insight2ChartStrategy)(insight);
|
|
28
|
+
var trendMarks = (0, exports.trendAugmentedMarksStrategy)(insight);
|
|
29
|
+
return tslib_1.__spreadArray([chart], tslib_1.__read(((_b = (_a = trendMarks[0]) === null || _a === void 0 ? void 0 : _a.trendLine) !== null && _b !== void 0 ? _b : [])), false);
|
|
30
|
+
};
|
|
31
|
+
exports.trendStrategy = trendStrategy;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Mark } from '@antv/g2';
|
|
2
|
+
import { InsightInfo, InsightType } from '../../types';
|
|
3
|
+
export declare const insight2ChartStrategy: (insight: Omit<InsightInfo<import("../../types").PatternInfo>, "patterns" | "visualizationSpecs"> & {
|
|
4
|
+
patterns: {
|
|
5
|
+
type: InsightType;
|
|
6
|
+
}[];
|
|
7
|
+
}) => Mark;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.insight2ChartStrategy = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var constants_1 = require("../constants");
|
|
6
|
+
var insight2ChartStrategy = function (insight) {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
var data = insight.data, patterns = insight.patterns, dimensions = insight.dimensions, measures = insight.measures;
|
|
9
|
+
var insightType = patterns[0].type;
|
|
10
|
+
var commonSpec = {
|
|
11
|
+
data: data,
|
|
12
|
+
encode: {
|
|
13
|
+
x: dimensions[0].fieldName,
|
|
14
|
+
y: measures[0].fieldName,
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
// pie
|
|
18
|
+
if (insightType === 'majority') {
|
|
19
|
+
return tslib_1.__assign(tslib_1.__assign({}, commonSpec), { type: 'interval', encode: {
|
|
20
|
+
color: dimensions[0].fieldName,
|
|
21
|
+
y: measures[0].fieldName,
|
|
22
|
+
}, transform: [{ type: 'stackY' }], coordinate: {
|
|
23
|
+
type: 'theta',
|
|
24
|
+
innerRadius: constants_1.PIE_RADIUS_STYLE.innerRadius,
|
|
25
|
+
outerRadius: constants_1.PIE_RADIUS_STYLE.outerRadius,
|
|
26
|
+
}, tooltip: {
|
|
27
|
+
items: [{ field: dimensions[0].fieldName }, { field: measures[0].fieldName }],
|
|
28
|
+
} });
|
|
29
|
+
}
|
|
30
|
+
// line
|
|
31
|
+
if (insightType === 'trend' || insightType === 'time_series_outlier' || insightType === 'change_point') {
|
|
32
|
+
return tslib_1.__assign(tslib_1.__assign({}, commonSpec), { type: 'line', style: {
|
|
33
|
+
lineWidth: 2,
|
|
34
|
+
} });
|
|
35
|
+
}
|
|
36
|
+
// bar
|
|
37
|
+
if (insightType === 'category_outlier' || insightType === 'low_variance') {
|
|
38
|
+
return tslib_1.__assign(tslib_1.__assign({}, commonSpec), { type: 'interval' });
|
|
39
|
+
}
|
|
40
|
+
// scatter
|
|
41
|
+
if (insightType === 'correlation') {
|
|
42
|
+
return tslib_1.__assign(tslib_1.__assign({}, commonSpec), { type: 'point', encode: {
|
|
43
|
+
x: (_a = measures[0]) === null || _a === void 0 ? void 0 : _a.fieldName,
|
|
44
|
+
y: (_b = measures[1]) === null || _b === void 0 ? void 0 : _b.fieldName,
|
|
45
|
+
} });
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
};
|
|
49
|
+
exports.insight2ChartStrategy = insight2ChartStrategy;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.areaMarkStrategy = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var areaMarkStrategy = function (data, _a) {
|
|
6
|
+
var encode = _a.encode, style = _a.style, tooltip = _a.tooltip;
|
|
7
|
+
var common = {
|
|
8
|
+
style: style,
|
|
9
|
+
tooltip: tooltip,
|
|
10
|
+
};
|
|
11
|
+
if (data) {
|
|
12
|
+
return tslib_1.__assign(tslib_1.__assign({}, common), { type: 'area', data: data, encode: tslib_1.__assign({ x: 'x', y: 'y' }, encode) });
|
|
13
|
+
}
|
|
14
|
+
return null;
|
|
15
|
+
};
|
|
16
|
+
exports.areaMarkStrategy = areaMarkStrategy;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.intervalMarkStrategy = exports.areaMarkStrategy = exports.textMarkStrategy = exports.pointMarkStrategy = exports.lineMarkStrategy = void 0;
|
|
4
|
+
var lineMark_1 = require("./lineMark");
|
|
5
|
+
Object.defineProperty(exports, "lineMarkStrategy", { enumerable: true, get: function () { return lineMark_1.lineMarkStrategy; } });
|
|
6
|
+
var pointMark_1 = require("./pointMark");
|
|
7
|
+
Object.defineProperty(exports, "pointMarkStrategy", { enumerable: true, get: function () { return pointMark_1.pointMarkStrategy; } });
|
|
8
|
+
var textMark_1 = require("./textMark");
|
|
9
|
+
Object.defineProperty(exports, "textMarkStrategy", { enumerable: true, get: function () { return textMark_1.textMarkStrategy; } });
|
|
10
|
+
var areaMark_1 = require("./areaMark");
|
|
11
|
+
Object.defineProperty(exports, "areaMarkStrategy", { enumerable: true, get: function () { return areaMark_1.areaMarkStrategy; } });
|
|
12
|
+
var intervalMark_1 = require("./intervalMark");
|
|
13
|
+
Object.defineProperty(exports, "intervalMarkStrategy", { enumerable: true, get: function () { return intervalMark_1.intervalMarkStrategy; } });
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RectMark } from '@antv/g2';
|
|
2
|
+
import { PointPatternInfo } from '../../../types';
|
|
3
|
+
import { IntervalMarkConfig } from '../../types';
|
|
4
|
+
/** get mark for point patterns, the patterns should have same dimension and measure */
|
|
5
|
+
export declare const intervalMarkStrategy: (patterns: PointPatternInfo[], config?: IntervalMarkConfig) => RectMark;
|