Skip to content

Commit 6f64ab1

Browse files
committed
fix: change chart-core varaity name and fix colors bug
1 parent ea0b581 commit 6f64ab1

File tree

27 files changed

+93
-92
lines changed

27 files changed

+93
-92
lines changed

internals/cli/src/commands/build/build-entry-app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ const buildFullRuntime = (mode: RunTimeModeType) => {
151151
.map((component) => {
152152
if (component.includes('Hui')) {
153153
return `${component}${joinStr}${component} as ${component
154-
.replace('Huicharts', 'Charts')
154+
.replace('Huicharts', 'Chart')
155155
.trim()}${joinStr}${component} as Tiny${component.trim()}`
156156
}
157157
return `${component}${joinStr}${component} as Tiny${component.trim()}`
@@ -161,7 +161,7 @@ const buildFullRuntime = (mode: RunTimeModeType) => {
161161
.map((component) => {
162162
if (component.includes('Hui')) {
163163
return `${component}${joinStr}${component
164-
.replace('Huicharts', 'Charts')
164+
.replace('Huicharts', 'Chart')
165165
.trim()}: ${component}${joinStr}Tiny${component.trim()}: ${component}`
166166
}
167167
return `${component}${joinStr}Tiny${component.trim()}: ${component}`

packages/vue/src/huicharts/huicharts-amap/src/AMapModel.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ export default function extendComponentModel() {
1919
},
2020

2121
setCenterAndZoom(center, zoom) {
22-
this.option.center = center
23-
this.option.zoom = zoom
22+
this.huiChartOption.center = center
23+
this.huiChartOption.zoom = zoom
2424
},
2525

2626
centerOrZoomChanged(center, zoom) {
27-
let option = this.option
27+
let option = this.huiChartOption
2828
return !(equal(center, option.center) && zoom === option.zoom)
2929
},
3030

packages/vue/src/huicharts/huicharts-amap/src/autonavi-map.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ export default {
2525
methods: {
2626
updateChart() {
2727
if (this.options && Object.keys(this.options).length) {
28-
this.option = { ...this.options, ...this.settings }
28+
this.huiChartOption = { ...this.options, ...this.settings }
2929
if (!this.tooltipVisible) {
30-
this.option.tooltip = { show: false }
30+
this.huiChartOption.tooltip = { show: false }
3131
}
3232
3333
if (!this.legendVisible) {
34-
this.option.legend = { show: false }
34+
this.huiChartOption.legend = { show: false }
3535
}
3636
3737
return
@@ -55,20 +55,20 @@ export default {
5555
'backgroundColor',
5656
'textStyle'
5757
]
58-
this.option = {
58+
this.huiChartOption = {
5959
...this.settings,
6060
tooltip: this.tooltipVisible ? this.tooltip : { show: false },
6161
series: this.series
6262
}
6363
6464
echartsSettings.forEach((prop) => {
6565
if (this[prop]) {
66-
this.option[prop] = this[prop]
66+
this.huiChartOption[prop] = this[prop]
6767
}
6868
})
6969
7070
if (!this.legendVisible) {
71-
this.option.legend = { show: false }
71+
this.huiChartOption.legend = { show: false }
7272
}
7373
}
7474
}

packages/vue/src/huicharts/huicharts-bar/src/chart-bar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default {
3131
3232
const option = histogram(columns, rows, this.settings, extra, false)
3333
34-
this.option = {
34+
this.huiChartOption = {
3535
smooth: true,
3636
...option,
3737
direction: 'horizontal'

packages/vue/src/huicharts/huicharts-bmap/src/baidu-map.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ export default {
2222
methods: {
2323
updateChart() {
2424
if (this.options && Object.keys(this.options).length) {
25-
this.option = { ...this.options, ...this.settings }
25+
this.huiChartOption = { ...this.options, ...this.settings }
2626
if (!this.tooltipVisible) {
27-
this.option.tooltip = { show: false }
27+
this.huiChartOption.tooltip = { show: false }
2828
}
2929
3030
if (!this.legendVisible) {
31-
this.option.legend = { show: false }
31+
this.huiChartOption.legend = { show: false }
3232
}
3333
3434
return
@@ -52,20 +52,20 @@ export default {
5252
'backgroundColor',
5353
'textStyle'
5454
]
55-
this.option = {
55+
this.huiChartOption = {
5656
...this.settings,
5757
tooltip: this.tooltipVisible ? this.tooltip : { show: false },
5858
series: this.series
5959
}
6060
6161
echartsSettings.forEach((prop) => {
6262
if (this[prop]) {
63-
this.option[prop] = this[prop]
63+
this.huiChartOption[prop] = this[prop]
6464
}
6565
})
6666
6767
if (!this.legendVisible) {
68-
this.option.legend = { show: false }
68+
this.huiChartOption.legend = { show: false }
6969
}
7070
}
7171
}

packages/vue/src/huicharts/huicharts-boxplot/src/chart-boxplot.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default {
2828
data: prepareBoxplotData && Array.isArray(data) ? data : null
2929
}
3030
const option = boxplot(columns, rows, this.settings, extra)
31-
this.option = { ...option }
31+
this.huiChartOption = { ...option }
3232
},
3333
prepareBoxplotData(data) {
3434
return prepareBoxplotData(data)

packages/vue/src/huicharts/huicharts-candle/src/chart-candle.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default {
2727
legendVisible: this.legendVisible,
2828
t
2929
}
30-
this.option = candle(columns, rows, this.settings, extra)
30+
this.huiChartOption = candle(columns, rows, this.settings, extra)
3131
}
3232
}
3333
}

packages/vue/src/huicharts/huicharts-core/common/extend.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ function removeNullKeys(obj) {
1919
return obj
2020
}
2121

22-
export default ({ option, extend }) => {
23-
const cloneOption = cloneDeep(option)
22+
export default ({ huiChartOption, extend }) => {
23+
const cloneOption = cloneDeep(huiChartOption)
2424
const mergeOption = removeNullKeys(cloneOption)
2525
if (!extend) {
2626
return
@@ -59,7 +59,7 @@ export default ({ option, extend }) => {
5959
// 属性为对象(eg: tooltip)或包含对象的数组(eg: series)
6060
if (isArr(mergeOption[key]) && isObject(mergeOption[key][0])) {
6161
// 属性值是包含对象数组
62-
mergeOption[key].forEach((option, i) => (mergeOption[key][i] = { ...option, ...value }))
62+
mergeOption[key].forEach((huiChartOption, i) => (mergeOption[key][i] = { ...huiChartOption, ...value }))
6363
} else if (isObject(mergeOption[key])) {
6464
// 被替换属性值是对象
6565
let optionBase = mergeOption[key]

0 commit comments

Comments
 (0)