@formant/ava 3.4.20-formant → 3.5.0-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/dist/ava.min.js +1 -1
- package/esm/insight/chart/constants.js +2 -23
- package/esm/insight/chart/generator/index.js +0 -1
- package/esm/insight/chart/generator/insights.js +2 -2
- package/esm/insight/chart/index.js +0 -1
- package/esm/insight/chart/strategy/augmentedMarks/categoryOutlier.js +5 -11
- package/esm/insight/chart/strategy/augmentedMarks/changePoint.js +11 -27
- package/esm/insight/chart/strategy/augmentedMarks/correlation.js +1 -2
- package/esm/insight/chart/strategy/augmentedMarks/index.js +0 -1
- package/esm/insight/chart/strategy/augmentedMarks/lowVariance.js +6 -11
- package/esm/insight/chart/strategy/augmentedMarks/majority.js +1 -2
- package/esm/insight/chart/strategy/augmentedMarks/timeSeriesOutlier.js +10 -67
- package/esm/insight/chart/strategy/augmentedMarks/trend.js +9 -9
- package/esm/insight/chart/strategy/chart.js +16 -27
- package/esm/insight/chart/strategy/commonMarks/areaMark.js +1 -11
- package/esm/insight/chart/strategy/commonMarks/barMark.js +6 -0
- package/esm/insight/chart/strategy/commonMarks/index.js +2 -2
- package/esm/insight/chart/strategy/commonMarks/lineMark.js +1 -33
- package/esm/insight/chart/strategy/commonMarks/pointMark.js +8 -12
- package/esm/insight/chart/strategy/commonMarks/ruleMark.js +2 -0
- package/esm/insight/chart/strategy/viewSpec.js +19 -13
- package/esm/insight/chart/types.js +7 -0
- package/esm/insight/narrative/strategy/categoryOutlier.js +2 -2
- package/esm/insight/narrative/strategy/timeSeriesOutlier.js +2 -2
- package/esm/insight/narrative/strategy/trend.js +1 -1
- package/esm/insight/pipeline/specificInsight.js +2 -6
- package/esm/insight/pipeline/visualize.js +0 -2
- package/lib/index.d.ts +1 -1
- package/lib/insight/chart/constants.d.ts +2 -11
- package/lib/insight/chart/constants.js +3 -24
- package/lib/insight/chart/generator/index.d.ts +0 -1
- package/lib/insight/chart/generator/index.js +0 -1
- package/lib/insight/chart/generator/insights.d.ts +2 -2
- package/lib/insight/chart/generator/insights.js +2 -2
- package/lib/insight/chart/index.d.ts +0 -1
- package/lib/insight/chart/index.js +0 -1
- package/lib/insight/chart/strategy/augmentedMarks/categoryOutlier.d.ts +2 -3
- package/lib/insight/chart/strategy/augmentedMarks/categoryOutlier.js +4 -10
- package/lib/insight/chart/strategy/augmentedMarks/changePoint.d.ts +2 -3
- package/lib/insight/chart/strategy/augmentedMarks/changePoint.js +11 -27
- package/lib/insight/chart/strategy/augmentedMarks/correlation.d.ts +2 -2
- package/lib/insight/chart/strategy/augmentedMarks/correlation.js +1 -2
- package/lib/insight/chart/strategy/augmentedMarks/index.d.ts +0 -1
- package/lib/insight/chart/strategy/augmentedMarks/index.js +1 -3
- package/lib/insight/chart/strategy/augmentedMarks/lowVariance.d.ts +2 -3
- package/lib/insight/chart/strategy/augmentedMarks/lowVariance.js +5 -10
- package/lib/insight/chart/strategy/augmentedMarks/majority.d.ts +2 -2
- package/lib/insight/chart/strategy/augmentedMarks/majority.js +1 -2
- package/lib/insight/chart/strategy/augmentedMarks/timeSeriesOutlier.d.ts +2 -3
- package/lib/insight/chart/strategy/augmentedMarks/timeSeriesOutlier.js +10 -67
- package/lib/insight/chart/strategy/augmentedMarks/trend.d.ts +2 -3
- package/lib/insight/chart/strategy/augmentedMarks/trend.js +9 -9
- package/lib/insight/chart/strategy/chart.d.ts +6 -3
- package/lib/insight/chart/strategy/chart.js +15 -26
- package/lib/insight/chart/strategy/commonMarks/areaMark.d.ts +2 -3
- package/lib/insight/chart/strategy/commonMarks/areaMark.js +1 -11
- package/lib/insight/chart/strategy/commonMarks/barMark.d.ts +4 -0
- package/lib/insight/chart/strategy/commonMarks/barMark.js +10 -0
- package/lib/insight/chart/strategy/commonMarks/index.d.ts +2 -2
- package/lib/insight/chart/strategy/commonMarks/index.js +5 -5
- package/lib/insight/chart/strategy/commonMarks/lineMark.d.ts +2 -3
- package/lib/insight/chart/strategy/commonMarks/lineMark.js +1 -33
- package/lib/insight/chart/strategy/commonMarks/pointMark.d.ts +5 -4
- package/lib/insight/chart/strategy/commonMarks/pointMark.js +7 -11
- package/lib/insight/chart/strategy/commonMarks/ruleMark.d.ts +2 -0
- package/lib/insight/chart/strategy/commonMarks/ruleMark.js +6 -0
- package/lib/insight/chart/strategy/viewSpec.d.ts +9 -3
- package/lib/insight/chart/strategy/viewSpec.js +19 -13
- package/lib/insight/chart/types.d.ts +99 -42
- package/lib/insight/chart/types.js +7 -0
- package/lib/insight/chart/utils.d.ts +2 -3
- package/lib/insight/index.d.ts +1 -1
- package/lib/insight/narrative/strategy/categoryOutlier.js +2 -2
- package/lib/insight/narrative/strategy/timeSeriesOutlier.js +1 -1
- package/lib/insight/narrative/strategy/trend.js +1 -1
- package/lib/insight/pipeline/specificInsight.d.ts +2 -3
- package/lib/insight/pipeline/specificInsight.js +2 -6
- package/lib/insight/pipeline/visualize.js +0 -2
- package/lib/insight/types.d.ts +3 -3
- package/package.json +1 -1
- package/esm/insight/chart/generator/homogeneous.js +0 -70
- package/esm/insight/chart/strategy/augmentedMarks/homogeneous.js +0 -5
- package/esm/insight/chart/strategy/commonMarks/intervalMark.js +0 -14
- package/esm/insight/chart/strategy/commonMarks/textMark.js +0 -28
- package/lib/insight/chart/generator/homogeneous.d.ts +0 -3
- package/lib/insight/chart/generator/homogeneous.js +0 -75
- package/lib/insight/chart/strategy/augmentedMarks/homogeneous.d.ts +0 -3
- package/lib/insight/chart/strategy/augmentedMarks/homogeneous.js +0 -9
- package/lib/insight/chart/strategy/commonMarks/intervalMark.d.ts +0 -5
- package/lib/insight/chart/strategy/commonMarks/intervalMark.js +0 -18
- package/lib/insight/chart/strategy/commonMarks/textMark.d.ts +0 -5
- package/lib/insight/chart/strategy/commonMarks/textMark.js +0 -32
|
@@ -1,9 +0,0 @@
|
|
|
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;
|
|
@@ -1,5 +0,0 @@
|
|
|
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;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.intervalMarkStrategy = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var constants_1 = require("../../constants");
|
|
6
|
-
/** get mark for point patterns, the patterns should have same dimension and measure */
|
|
7
|
-
var intervalMarkStrategy = function (patterns, config) {
|
|
8
|
-
var data = patterns.map(function (_a) {
|
|
9
|
-
var x = _a.x, y = _a.y;
|
|
10
|
-
return ({ x: x, y: y });
|
|
11
|
-
});
|
|
12
|
-
var intervalMark = tslib_1.__assign(tslib_1.__assign({ type: 'interval', data: data, encode: {
|
|
13
|
-
x: 'x',
|
|
14
|
-
y: 'y',
|
|
15
|
-
} }, config), { style: tslib_1.__assign(tslib_1.__assign({}, config === null || config === void 0 ? void 0 : config.style), { fill: constants_1.INSIGHT_COLOR_PLATTE.outlier }) });
|
|
16
|
-
return intervalMark;
|
|
17
|
-
};
|
|
18
|
-
exports.intervalMarkStrategy = intervalMarkStrategy;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { TextMark } from '@antv/g2';
|
|
2
|
-
import { PointPatternInfo } from '../../../types';
|
|
3
|
-
import { TextMarkConfig } from '../../types';
|
|
4
|
-
/** get mark for point patterns, the patterns should have same dimension and measure */
|
|
5
|
-
export declare const textMarkStrategy: (patterns: PointPatternInfo[], textConfig?: TextMarkConfig) => TextMark;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.textMarkStrategy = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var lodash_1 = require("lodash");
|
|
6
|
-
var constants_1 = require("../../constants");
|
|
7
|
-
/** get mark for point patterns, the patterns should have same dimension and measure */
|
|
8
|
-
var textMarkStrategy = function (patterns, textConfig) {
|
|
9
|
-
var _a = textConfig || {}, style = _a.style, label = _a.label, formatter = _a.formatter;
|
|
10
|
-
var _b = patterns[0], measure = _b.measure, dimension = _b.dimension;
|
|
11
|
-
var data = patterns.map(function (pattern) {
|
|
12
|
-
var _a;
|
|
13
|
-
var customLabel = (0, lodash_1.isFunction)(label) ? label(pattern) : label;
|
|
14
|
-
var value = (0, lodash_1.isFunction)(formatter) ? formatter(pattern.y) : pattern.y;
|
|
15
|
-
return _a = {},
|
|
16
|
-
_a[dimension] = pattern.x,
|
|
17
|
-
_a[measure] = pattern.y,
|
|
18
|
-
_a.label = customLabel !== null && customLabel !== void 0 ? customLabel : "".concat(pattern.x, "\n").concat(value),
|
|
19
|
-
_a;
|
|
20
|
-
});
|
|
21
|
-
return {
|
|
22
|
-
type: 'text',
|
|
23
|
-
data: data,
|
|
24
|
-
encode: {
|
|
25
|
-
x: dimension,
|
|
26
|
-
y: measure,
|
|
27
|
-
text: 'label',
|
|
28
|
-
},
|
|
29
|
-
style: tslib_1.__assign(tslib_1.__assign({}, constants_1.TEXT_STYLE), style),
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
exports.textMarkStrategy = textMarkStrategy;
|