@visactor/vchart 1.6.1 → 1.6.2
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/build/es5/index.js +1 -1
- package/build/index.js +32 -14
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/compile/compilable-base.js +1 -2
- package/cjs/compile/grammar-item.js +2 -1
- package/cjs/component/tooltip/handler/dom/model/content-column-model.js +4 -2
- package/cjs/component/tooltip/handler/dom/model/content-column-model.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/util.js +2 -2
- package/cjs/component/tooltip/handler/dom/util.js.map +1 -1
- package/cjs/component/tooltip/handler/utils/attribute.js +1 -2
- package/cjs/component/tooltip/handler/utils/attribute.js.map +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/theme/builtin/dark/color-scheme.js +1 -3
- package/cjs/theme/builtin/dark/color-scheme.js.map +1 -1
- package/cjs/theme/builtin/light/color-scheme.js +1 -3
- package/cjs/theme/builtin/light/color-scheme.js.map +1 -1
- package/cjs/theme/color-scheme/builtin/interface.d.ts +0 -2
- package/cjs/theme/color-scheme/builtin/interface.js.map +1 -1
- package/cjs/theme/color-scheme/legacy.d.ts +5 -0
- package/cjs/theme/color-scheme/legacy.js +21 -0
- package/cjs/theme/color-scheme/legacy.js.map +1 -0
- package/cjs/theme/color-scheme/util.js +5 -6
- package/cjs/theme/color-scheme/util.js.map +1 -1
- package/esm/compile/compilable-base.js +1 -2
- package/esm/compile/grammar-item.js +2 -1
- package/esm/component/tooltip/handler/dom/model/content-column-model.js +4 -2
- package/esm/component/tooltip/handler/dom/model/content-column-model.js.map +1 -1
- package/esm/component/tooltip/handler/dom/util.js +2 -2
- package/esm/component/tooltip/handler/dom/util.js.map +1 -1
- package/esm/component/tooltip/handler/utils/attribute.js +1 -2
- package/esm/component/tooltip/handler/utils/attribute.js.map +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/theme/builtin/dark/color-scheme.js +1 -3
- package/esm/theme/builtin/dark/color-scheme.js.map +1 -1
- package/esm/theme/builtin/light/color-scheme.js +1 -3
- package/esm/theme/builtin/light/color-scheme.js.map +1 -1
- package/esm/theme/color-scheme/builtin/interface.d.ts +0 -2
- package/esm/theme/color-scheme/builtin/interface.js.map +1 -1
- package/esm/theme/color-scheme/legacy.d.ts +5 -0
- package/esm/theme/color-scheme/legacy.js +18 -0
- package/esm/theme/color-scheme/legacy.js.map +1 -0
- package/esm/theme/color-scheme/util.js +7 -5
- package/esm/theme/color-scheme/util.js.map +1 -1
- package/package.json +4 -4
package/build/index.js
CHANGED
|
@@ -6904,9 +6904,7 @@
|
|
|
6904
6904
|
dataZoomSelectedColor: '#0040ff',
|
|
6905
6905
|
scrollBarSliderColor: '#000000',
|
|
6906
6906
|
tooltipBackgroundColor: '#ffffff',
|
|
6907
|
-
markLabelBackgroundColor: '#ffc528'
|
|
6908
|
-
titleFontColor: '#21252c',
|
|
6909
|
-
labelFontColor: '#89909d'
|
|
6907
|
+
markLabelBackgroundColor: '#ffc528'
|
|
6910
6908
|
}
|
|
6911
6909
|
}
|
|
6912
6910
|
};
|
|
@@ -49815,6 +49813,29 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
49815
49813
|
return (_b = spec.direction) !== null && _b !== void 0 ? _b : 'vertical';
|
|
49816
49814
|
}
|
|
49817
49815
|
|
|
49816
|
+
const newTokenToLegacyToken = {
|
|
49817
|
+
primaryFontColor: 'titleFontColor',
|
|
49818
|
+
secondaryFontColor: 'labelFontColor'
|
|
49819
|
+
};
|
|
49820
|
+
const legacyTokenToNewToken = {
|
|
49821
|
+
titleFontColor: 'primaryFontColor',
|
|
49822
|
+
labelFontColor: 'secondaryFontColor'
|
|
49823
|
+
};
|
|
49824
|
+
function getUpgradedTokenValue(palette, key) {
|
|
49825
|
+
const legacyKey = newTokenToLegacyToken[key];
|
|
49826
|
+
if (legacyKey && palette[legacyKey]) {
|
|
49827
|
+
return palette[legacyKey];
|
|
49828
|
+
}
|
|
49829
|
+
if (palette[key]) {
|
|
49830
|
+
return palette[key];
|
|
49831
|
+
}
|
|
49832
|
+
const newKey = legacyTokenToNewToken[key];
|
|
49833
|
+
if (newKey) {
|
|
49834
|
+
return palette[newKey];
|
|
49835
|
+
}
|
|
49836
|
+
return undefined;
|
|
49837
|
+
}
|
|
49838
|
+
|
|
49818
49839
|
function getDataScheme(colorScheme, seriesSpec) {
|
|
49819
49840
|
var _a;
|
|
49820
49841
|
if (!colorScheme) {
|
|
@@ -49877,12 +49898,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
49877
49898
|
let color;
|
|
49878
49899
|
const { palette } = scheme;
|
|
49879
49900
|
if (isObject$2(palette)) {
|
|
49880
|
-
color = (_a = palette
|
|
49901
|
+
color = (_a = getUpgradedTokenValue(palette, colorKey.key)) !== null && _a !== void 0 ? _a : colorKey.default;
|
|
49881
49902
|
}
|
|
49882
49903
|
if (!color) {
|
|
49883
49904
|
return undefined;
|
|
49884
49905
|
}
|
|
49885
|
-
if ((
|
|
49906
|
+
if ((isNil$1(colorKey.a) && isNil$1(colorKey.l)) || !isString$1(color)) {
|
|
49886
49907
|
return color;
|
|
49887
49908
|
}
|
|
49888
49909
|
let c = new Color(color);
|
|
@@ -49933,7 +49954,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
49933
49954
|
var _a, _b;
|
|
49934
49955
|
const { type: seriesType } = seriesSpec !== null && seriesSpec !== void 0 ? seriesSpec : {};
|
|
49935
49956
|
let scheme;
|
|
49936
|
-
if (!seriesSpec ||
|
|
49957
|
+
if (!seriesSpec || isNil$1(seriesType)) {
|
|
49937
49958
|
scheme = colorScheme === null || colorScheme === void 0 ? void 0 : colorScheme.default;
|
|
49938
49959
|
}
|
|
49939
49960
|
else {
|
|
@@ -50009,9 +50030,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
50009
50030
|
dataZoomSelectedColor: '#4284FF',
|
|
50010
50031
|
scrollBarSliderColor: '#ffffff',
|
|
50011
50032
|
tooltipBackgroundColor: '#404349',
|
|
50012
|
-
markLabelBackgroundColor: '#f0bd30'
|
|
50013
|
-
titleFontColor: '#fdfdfd',
|
|
50014
|
-
labelFontColor: '#bbbdc3'
|
|
50033
|
+
markLabelBackgroundColor: '#f0bd30'
|
|
50015
50034
|
}
|
|
50016
50035
|
}
|
|
50017
50036
|
};
|
|
@@ -57782,7 +57801,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57782
57801
|
};
|
|
57783
57802
|
registerVChartCore();
|
|
57784
57803
|
|
|
57785
|
-
const version = "1.6.
|
|
57804
|
+
const version = "1.6.2";
|
|
57786
57805
|
|
|
57787
57806
|
class ChartData {
|
|
57788
57807
|
get dataList() {
|
|
@@ -82854,7 +82873,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
82854
82873
|
maxKeyWidth -
|
|
82855
82874
|
keyStyle.spacing -
|
|
82856
82875
|
valueStyle.spacing;
|
|
82857
|
-
value.multiLine = true;
|
|
82858
82876
|
if (!value.maxWidth) {
|
|
82859
82877
|
value.maxWidth = Math.ceil(value.width);
|
|
82860
82878
|
}
|
|
@@ -83425,7 +83443,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83425
83443
|
styleObj.lineHeight = getPixelPropertyStr(lineHeight);
|
|
83426
83444
|
styleObj.fontWeight = fontWeight;
|
|
83427
83445
|
styleObj.whiteSpace = multiLine ? 'initial' : 'nowrap';
|
|
83428
|
-
styleObj.wordBreak = wordBreak;
|
|
83446
|
+
styleObj.wordBreak = multiLine ? wordBreak !== null && wordBreak !== void 0 ? wordBreak : 'break-word' : 'normal';
|
|
83429
83447
|
styleObj.maxWidth = getPixelPropertyStr(maxWidth);
|
|
83430
83448
|
return styleObj;
|
|
83431
83449
|
}
|
|
@@ -83750,7 +83768,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83750
83768
|
let childStyle = {};
|
|
83751
83769
|
if (this.className === 'key-box') {
|
|
83752
83770
|
const { key, isKeyAdaptive } = line;
|
|
83753
|
-
childStyle = mergeSpec({}, isKeyAdaptive ? defaultAdaptiveKeyStyle : defaultKeyStyle, Object.assign(Object.assign({ height: getPixelPropertyStr(contentAttributes[i].height) }, tooltipStyle.keyColumn.common), (_a = tooltipStyle.keyColumn.items) === null || _a === void 0 ? void 0 : _a[i]));
|
|
83771
|
+
childStyle = mergeSpec({}, isKeyAdaptive ? defaultAdaptiveKeyStyle : defaultKeyStyle, Object.assign(Object.assign({ height: getPixelPropertyStr(contentAttributes[i].height), overflowWrap: 'normal' }, tooltipStyle.keyColumn.common), (_a = tooltipStyle.keyColumn.items) === null || _a === void 0 ? void 0 : _a[i]));
|
|
83754
83772
|
const hasContent = (isString$1(key) && ((_b = key === null || key === void 0 ? void 0 : key.trim) === null || _b === void 0 ? void 0 : _b.call(key)) !== '') || isNumber$2(key);
|
|
83755
83773
|
if (!hasContent && !childStyle.visibility) {
|
|
83756
83774
|
childStyle.visibility = 'hidden';
|
|
@@ -83761,7 +83779,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83761
83779
|
this.children[i].setStyle(childStyle);
|
|
83762
83780
|
}
|
|
83763
83781
|
else if (this.className === 'value-box') {
|
|
83764
|
-
childStyle = mergeSpec({}, defaultValueStyle, Object.assign(Object.assign({ height: getPixelPropertyStr(contentAttributes[i].height) }, tooltipStyle.valueColumn.common), (_c = tooltipStyle.valueColumn.items) === null || _c === void 0 ? void 0 : _c[i]));
|
|
83782
|
+
childStyle = mergeSpec({}, defaultValueStyle, Object.assign(Object.assign({ height: getPixelPropertyStr(contentAttributes[i].height), overflowWrap: 'normal' }, tooltipStyle.valueColumn.common), (_c = tooltipStyle.valueColumn.items) === null || _c === void 0 ? void 0 : _c[i]));
|
|
83765
83783
|
this.children[i].setStyle(childStyle);
|
|
83766
83784
|
}
|
|
83767
83785
|
else if (this.className === 'shape-box') {
|