This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/echarts-examples.git
The following commit(s) were added to refs/heads/gh-pages by this push:
new 772cf018 add new components/charts/features introduced in v6 (fix #118)
772cf018 is described below
commit 772cf01859d941bbf7e422f8e1345e9a6b94a6b9
Author: plainheart <[email protected]>
AuthorDate: Fri Aug 8 22:47:12 2025 +0800
add new components/charts/features introduced in v6 (fix #118)
---
common/buildCode.js | 38 +++++++++++++++++++++++++++++++-------
1 file changed, 31 insertions(+), 7 deletions(-)
diff --git a/common/buildCode.js b/common/buildCode.js
index 367347da..c018642a 100644
--- a/common/buildCode.js
+++ b/common/buildCode.js
@@ -20,6 +20,8 @@ const COMPONENTS_MAP = {
visualMap: 'VisualMapComponent',
aria: 'AriaComponent',
dataset: 'DatasetComponent',
+ matrix: 'MatrixComponent',
+ thumbnail: 'ThumbnailComponent',
// Dependencies
xAxis: 'GridComponent',
@@ -50,6 +52,7 @@ const CHARTS_MAP = {
pictorialBar: 'PictorialBarChart',
themeRiver: 'ThemeRiverChart',
sunburst: 'SunburstChart',
+ chord: 'ChordChart',
custom: 'CustomChart'
};
const COMPONENTS_GL_MAP = {
@@ -79,7 +82,13 @@ const CHARTS_GL_MAP = {
linesGL: 'LinesGLChart'
};
-const FEATURES = ['UniversalTransition', 'LabelLayout'];
+const FEATURES = [
+ 'UniversalTransition',
+ 'LabelLayout',
+ 'AxisBreak',
+ // 'LegacyGridContainLabel',
+ 'ScatterJitter'
+];
const EXTENSIONS_MAP = {
bmap: 'bmap/bmap'
@@ -153,7 +162,7 @@ module.exports.collectDeps = function collectDeps(option) {
if (INJECTED_COMPONENTS.includes(key)) {
return;
}
- const val = option[key];
+ let val = option[key];
if (Array.isArray(val) && !val.length) {
return;
@@ -170,12 +179,12 @@ module.exports.collectDeps = function collectDeps(option)
{
}
});
- let series = option.series;
- if (!Array.isArray(series)) {
- series = [series];
- }
-
+ const series = Array.isArray(option.series) ? option.series :
[option.series];
+ let hasScatterSeries = false;
series.forEach((seriesOpt) => {
+ if (seriesOpt.type === 'scatter') {
+ hasScatterSeries = true;
+ }
if (CHARTS_MAP[seriesOpt.type]) {
deps.push(CHARTS_MAP[seriesOpt.type]);
}
@@ -202,6 +211,21 @@ module.exports.collectDeps = function collectDeps(option) {
deps.push('UniversalTransition');
}
});
+
+ Object.keys(option).forEach((key) => {
+ if (key.endsWith('Axis')) {
+ const val = option[key];
+ for (const axisOption of Array.isArray(val) ? val : [val]) {
+ if (hasScatterSeries && +axisOption.jitter > 0) {
+ deps.push('ScatterJitter');
+ }
+ if (axisOption.breaks && axisOption.breaks.length > 0) {
+ deps.push('AxisBreak');
+ }
+ }
+ }
+ });
+
// Dataset transform
if (option.dataset && Array.isArray(option.dataset)) {
option.dataset.forEach((dataset) => {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]