气泡地图支持渐变色

qianming 3 years ago
parent 1a1a9f830d
commit 2eca15e5ac

@ -5998,7 +5998,7 @@ const widgetTools = [
{ {
name: '地图块颜色', name: '地图块颜色',
list: [ list: [
/* { {
type: 'vue-color', type: 'vue-color',
label: '0%处颜色', label: '0%处颜色',
name: 'font0PreColor', name: 'font0PreColor',
@ -6013,7 +6013,7 @@ const widgetTools = [
required: false, required: false,
placeholder: '', placeholder: '',
value: '#061E3D' value: '#061E3D'
},*/ },
{ {
type: 'vue-color', type: 'vue-color',
label: '高亮渐变色', label: '高亮渐变色',

@ -443,6 +443,24 @@ export default {
setOptionMapBlocak() { setOptionMapBlocak() {
const optionsSetup = this.optionsSetup; const optionsSetup = this.optionsSetup;
const itemStyle = this.options.series[0]['itemStyle']; const itemStyle = this.options.series[0]['itemStyle'];
const normal = {
//
areaColor: {
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: optionsSetup.font0PreColor // 0%
}, {
offset: 1,
color: optionsSetup.font100PreColor // 100%
}],
},
borderColor: '#215495',
borderWidth: 1,
};
// //
const emphasis = { const emphasis = {
areaColor: { areaColor: {
@ -459,6 +477,7 @@ export default {
}], }],
}, },
}; };
itemStyle['normal'] = normal;
itemStyle['emphasis'] = emphasis; itemStyle['emphasis'] = emphasis;
}, },
setOptionAirSize() { setOptionAirSize() {

Loading…
Cancel
Save