提交 9423c111 编写于 作者: P pah100

Merge branch 'master' of https://github.com/pissang/echarts-next

......@@ -6,6 +6,8 @@ define(function (require) {
require('./map/MapView');
echarts.registerLayout(require('./map/mapSymbolLayout'));
echarts.registerVisualCoding('chart', require('./map/mapVisual'));
echarts.registerProcessor('statistic', require('./map/mapDataStatistic'));
......
......@@ -27,6 +27,12 @@ define(function (require) {
type: 'series.map',
/**
* Only first map series of same mapType will drawMap
* @type {boolean}
*/
needsDrawMap: false,
getInitialData: function (option) {
var list = new List([{
name: 'value'
......@@ -71,7 +77,7 @@ define(function (require) {
// mapValueCalculation: 'sum',
// 地图数值计算结果小数精度
// mapValuePrecision: 0,
// 显示图例颜色标识(系列标识的小圆点),存在legend时生效
// 显示图例颜色标识(系列标识的小圆点)
showLegendSymbol: true,
// 选择模式,默认关闭,可选single,multiple
// selectedMode: false,
......@@ -91,7 +97,7 @@ define(function (require) {
label: {
show: false,
textStyle: {
color: 'rgb(139,69,19)'
color: '#000'
}
}
},
......@@ -105,7 +111,7 @@ define(function (require) {
label: {
show: false,
textStyle: {
color: 'rgb(100,0,0)'
color: '#000'
}
}
}
......
......@@ -8,11 +8,16 @@ define(function (require) {
type: 'map',
render: function (mapModel, ecModel, api) {
this.group.removeAll();
this._renderMap(mapModel, ecModel, api);
mapModel.needsDrawMap &&
this._renderArea(mapModel, ecModel, api);
mapModel.get('showLegendSymbol')
&& this._renderSymbols(mapModel, ecModel, api);
},
_renderMap: function (mapModel, ecModel, api) {
_renderArea: function (mapModel, ecModel, api) {
var data = mapModel.getData();
var geo = mapModel.coordinateSystem;
......@@ -45,7 +50,10 @@ define(function (require) {
var styleObj = zrUtil.defaults(
{
fill: data.getItemVisual(dataIdx, 'color')
// Global visual color is used by symbol
// item visual color may be coded by dataRange
fill: data.getItemVisual(dataIdx, 'color', true)
|| data.getVisual('areaColor')
},
itemStyle
);
......@@ -67,6 +75,48 @@ define(function (require) {
mapGroup.add(regionGroup);
});
},
_renderSymbols: function (mapModel, ecModel, api) {
var data = mapModel.getData();
var group = this.group;
data.each('value', function (value, idx) {
if (isNaN(value)) {
return;
}
var itemModel = data.getItemModel(idx);
var labelModel = itemModel.getModel('itemStyle.normal.label');
var textStyleModel = labelModel.getModel('textStyle');
var layout = data.getItemLayout(idx);
var point = layout.point;
var offset = layout.offset;
var circle = new graphic.Circle({
style: {
fill: data.getVisual('color')
},
shape: {
cx: point[0] + offset * 9,
cy: point[1],
r: 3
},
z2: 10
});
if (labelModel.get('show') && !offset) {
circle.setStyle({
text: data.getName(idx),
textFill: textStyleModel.get('color'),
textPosition: 'bottom',
textFont: textStyleModel.getFont()
});
}
group.add(circle);
});
}
});
});
\ No newline at end of file
......@@ -54,17 +54,13 @@ define(function (require) {
seriesList[0].get('mapValueCalculation')
);
zrUtil.each(seriesList, function (seriesModel) {
seriesModel.setData(data);
});
});
seriesList[0].seriesGroup = [];
ecModel.filterSeries(function (seriesModel, idx) {
var mapType = seriesModel.get('mapType');
seriesList[0].setData(data);
return zrUtil.indexOf(
seriesGroupByMapType[mapType], seriesModel
) === 0;
for (var i = 0; i < seriesList.length; i++) {
seriesList[i].needsDrawMap = i === 0;
}
});
};
});
\ No newline at end of file
define(function (require) {
return function (ecModel) {
var mapSymbolOffsets = {};
ecModel.eachSeriesByType('map', function (mapModel) {
var geo = mapModel.coordinateSystem;
var data = mapModel.getData();
data.each('value', function (value, idx) {
if (isNaN(value)) {
return;
}
var name = data.getName(idx);
var region = geo.getRegion(name);
var offset = mapSymbolOffsets[name] || 0;
if (!region) {
return;
}
var point = geo.dataToPoint(
region.getCenter()
);
mapSymbolOffsets[name] = offset + 1;
data.setItemLayout(idx, {
point: point,
offset: offset
});
})
});
}
});
\ No newline at end of file
define(function (require) {
return function (ecModel) {
ecModel.eachSeriesByType('map', function (seriesModel) {
var colorList = ecModel.get('color');
var data = seriesModel.getData();
var color = seriesModel.get('itemStyle.normal.areaStyle.color') // Set in itemStyle
|| colorList[seriesModel.seriesIndex]; // Default color
data.setVisual('color', color);
var itemStyleModel = seriesModel.getModel('itemStyle.normal');
var areaColor = itemStyleModel.get('areaStyle.color');
var color = itemStyleModel.get('color')
|| colorList[seriesModel.seriesIndex % colorList.length];
seriesModel.getData().setVisual({
'areaColor': areaColor,
'color': color
});
});
}
});
\ No newline at end of file
......@@ -159,7 +159,8 @@ define(function (require) {
text: labels[i],
textAlign: labelTextAlign,
textBaseline: labelTextBaseline,
font: textStyleModel.getFont()
font: textStyleModel.getFont(),
fill: textStyleModel.get('color')
},
rotation: labelRotate * Math.PI / 180,
origin: [x, y],
......
......@@ -68,7 +68,7 @@ define(function (require) {
var seriesName = itemModel.get('name');
var seriesModel = ecModel.getSeriesByName(seriesName, true);
legendDataMap[seriesName] = true;
legendDataMap[seriesName] = itemModel;
if (!seriesModel) {
// Series not exists
......@@ -87,7 +87,8 @@ define(function (require) {
var symbolType = data.getVisual('symbol');
this._createItem(
seriesName, legendSymbolType, symbolType,
seriesName, itemModel,
legendSymbolType, symbolType,
itemWidth, itemHeight, itemAlign, color,
selectMode, api
);
......@@ -112,7 +113,8 @@ define(function (require) {
var legendSymbolType = 'roundRect';
this._createItem(
name, legendSymbolType, null,
name, legendDataMap[name],
legendSymbolType, null,
itemWidth, itemHeight, itemAlign, color,
selectMode, api
);
......@@ -129,13 +131,15 @@ define(function (require) {
},
_createItem: function (
name,
name, itemModel,
legendSymbolType, symbolType,
itemWidth, itemHeight, itemAlign, color,
selectMode, api
) {
var itemGroup = new graphic.Group();
var textStyleModel = itemModel.getModel('textStyle');
legendSymbolType = legendSymbolType;
itemGroup.add(symbolCreator.createSymbol(
legendSymbolType, 0, 0, itemWidth, itemHeight, color
......@@ -159,7 +163,8 @@ define(function (require) {
text: name,
x: textX,
y: itemHeight / 2,
fill: '#000',
fill: textStyleModel.get('color'),
textFont: textStyleModel.getFont(),
textAlign: textAlign,
textBaseline: 'middle'
}
......
......@@ -12,14 +12,7 @@ define(function (require) {
this.name = name;
// https://jsperf.com/try-catch-performance-overhead
try {
this.regions = geoJson ? parseGeoJson(geoJson) : [];
}
catch (e) {
throw 'Invalid geoJson format\n' + e;
}
this.loadGeoJson(geoJson);
/**
* @param {Array.<string>}
* @readOnly
......@@ -37,6 +30,36 @@ define(function (require) {
type: 'geo',
/**
* @param {Object} geoJson
*/
loadGeoJson: function (geoJson) {
// https://jsperf.com/try-catch-performance-overhead
try {
this.regions = geoJson ? parseGeoJson(geoJson) : [];
}
catch (e) {
throw 'Invalid geoJson format\n' + e;
}
var regions = this.regions;
var regionsMap = {};
for (var i = 0; i < regions.length; i++) {
regionsMap[regions[i].name] = regions[i];
}
this._regionsMap = regionsMap;
this._rect = null;
},
/**
* @param {string} name
* @return {module:echarts/coord/geo/Region}
*/
getRegion: function (name) {
return this._regionsMap[name];
},
/**
* Add geoCoord for indexing by name
* @param {string} name
......@@ -97,14 +120,6 @@ define(function (require) {
return this._rect = rect || new BoundingRect(0, 0, 0, 0);
},
/**
* @param {Object} geoJson
*/
loadGeoJson: function (geoJson) {
this.regions = parseGeoJson(geoJson);
this._rect = null;
},
/**
* If contain point
* @param {Array.<number>} point
......
......@@ -78,6 +78,7 @@ define(function (require) {
});
// If has map series
// PENDING Create new geo component dynamically
ecModel.eachSeriesByType('map', function (seriesModel) {
var mapType = seriesModel.get('mapType');
var geoJson = mapDataStores[mapType];
......
......@@ -25,6 +25,17 @@ define(function (require) {
var zrUtil = require('zrender/core/util');
var isObject = zrUtil.isObject;
var IMMUTABLE_PROPERTIES = [
'stackedOn', '_nameList',
'_rawValueDims', '_optionModels'
];
var transferImmuProperties = function (a, b) {
zrUtil.each(IMMUTABLE_PROPERTIES, function (propName) {
a[propName] = b[propName];
})
}
/**
* @constructor
* @alias module:echarts/data/List
......@@ -601,12 +612,10 @@ define(function (require) {
// Following properties are all immutable.
// So we can reference to the same value
list._nameList = this._nameList;
var indices = list.indices = this.indices;
list._rawValueDims = this._rawValueDims;
list._optionModels = this._optionModels;
// FIXME If needs stackedOn, value may already been stacked
transferImmuProperties(list, this);
var storage = list._storage = {};
var thisStorage = this._storage;
......@@ -645,9 +654,6 @@ define(function (require) {
}
});
// FIXME Value may already been stacked
list.stackedOn = this.stackedOn;
return list;
};
......@@ -750,11 +756,12 @@ define(function (require) {
* Get visual property of single data item
* @param {number} idx
* @param {string} key
* @param {boolean} ignoreParent
*/
listProto.getItemVisual = function (idx, key) {
listProto.getItemVisual = function (idx, key, ignoreParent) {
var itemVisual = this._itemVisuals[idx];
var val = itemVisual && itemVisual[key];
if (val == null) {
if (val == null && !ignoreParent) {
// Use global visual property
return this.getVisual(key);
}
......@@ -839,13 +846,11 @@ define(function (require) {
return this._dimensionInfos[dim];
}, this);
var list = new List(dimensionInfoList, this.hostModel);
list.stackedOn = this.stackedOn;
// FIXME
list._storage = this._storage;
list._optionModels = this._optionModels;
list._rawValueDims = this._rawValueDims;
list._nameList = this._nameList;
transferImmuProperties(list, this);
list.indices = this.indices.slice();
......
......@@ -188,6 +188,9 @@ define(function (require) {
this._needsUpdate = false;
// Set background
this._dom.style.backgroundColor = ecModel.get('backgroundColor');
console.timeEnd('update');
},
......
......@@ -78,11 +78,11 @@ define(function (require) {
_mergeTheme: function (option, theme) {
for (var name in theme) {
// 如果有 component model 则把具体的 merge 逻辑交给该 model 处理
if (! ComponentModel.has[name]) {
if (!ComponentModel.hasClass(name)) {
if (typeof theme[name] === 'object') {
option[name] = option[name]
option[name] = !option[name]
? zrUtil.clone(theme[name])
: zrUtil.merge(option[name], theme[name]);
: zrUtil.merge(option[name], theme[name], false);
}
else {
option[name] = theme[name];
......
require.config({
paths: {
'geoJson': '../geoData/geoJson'
'geoJson': '../geoData/geoJson',
'theme': '../theme'
},
packages: [
{
......
......@@ -16,14 +16,14 @@
require([
'echarts',
'geoJson/china_geo',
'geoJson/world_geo',
'echarts/chart/scatter',
'echarts/component/legend',
'echarts/component/geo'
], function (echarts, chinaJson) {
], function (echarts, worldJson) {
echarts.registerMap('china', chinaJson);
echarts.registerMap('world', worldJson);
var placeList = [
{name:'海门', geoCoord:[121.15, 31.89]},
......@@ -216,33 +216,43 @@
{name:'合肥', geoCoord:[117.27, 31.86]},
{name:'武汉', geoCoord:[114.31, 30.52]},
{name:'大庆', geoCoord:[125.03, 46.58]}
]
];
var chart = echarts.init(document.getElementById('main'), null, {
renderer: 'canvas'
});
var data = [];
var len = 2000;
var geoCoord
var data2 = [];
var len = 200;
var randomValue = function (geoCoord) {
return [
geoCoord[0] + Math.random() * 1 - 0.5,
geoCoord[1] + Math.random() * 1 - 0.5,
Math.random()
];
}
while(len--) {
geoCoord = placeList[len % placeList.length].geoCoord;
var geoCoord = placeList[len % placeList.length].geoCoord;
data.push({
name : placeList[len % placeList.length].name + len,
value : [
geoCoord[0] + Math.random() * 1 - 0.5,
geoCoord[1] + Math.random() * 1 - 0.5,
Math.random()
]
name: placeList[len % placeList.length].name + len,
value: randomValue(geoCoord)
});
data2.push({
name: placeList[len % placeList.length].name + len,
value: randomValue(geoCoord)
})
}
chart.setOption({
legend: {
data: ['scatter']
data: ['scatter', 'scatter2']
},
geo: {
map: 'china'
map: 'world'
},
tooltip: {
trigger: 'axis',
......@@ -255,9 +265,17 @@
name: 'scatter',
type: 'scatter',
symbolSize: function (val) {
return val[2] * 10;
return val[2] * 20;
},
data: data
}, {
coordinateSystem: 'geo',
name: 'scatter2',
type: 'scatter',
symbolSize: function (val) {
return val[2] * 20;
},
data: data2
}]
});
})
......
......@@ -20,6 +20,7 @@
'geoJson/china_geo',
'echarts/chart/map',
'echarts/component/legend',
'echarts/component/geo',
'echarts/component/dataRange'
], function (echarts, chinaJson) {
......
<html>
<head>
<meta charset="utf-8">
<script src="esl.js"></script>
<script src="config.js"></script>
</head>
<body>
<style>
html, body, #main {
width: 100%;
height: 100%;
}
</style>
<div id="main"></div>
<script>
require([
'echarts',
'echarts/chart/line',
'echarts/chart/bar',
'echarts/component/legend',
'echarts/component/grid',
'echarts/component/tooltip'
], function (echarts) {
var chart = echarts.init(document.getElementById('main'), null, {
renderer: 'canvas'
});
chart.setOption({
tooltip : {
trigger: 'axis'
},
legend: {
data:['蒸发量','降水量','平均温度']
},
xAxis : [
{
type : 'category',
data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
}
],
yAxis : [
{
type : 'value',
name : '水量',
axisLabel : {
formatter: '{value} ml'
}
},
{
type : 'value',
name : '温度',
position: 'right',
axisLabel : {
formatter: '{value} °C'
}
}
],
series : [
{
name:'蒸发量',
type:'bar',
data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
},
{
name:'降水量',
type:'bar',
data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
},
{
name:'平均温度',
type:'line',
yAxisIndex: 1,
data:[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
}
]
});
})
</script>
</body>
</html>
\ No newline at end of file
<html>
<head>
<meta charset="utf-8">
<script src="esl.js"></script>
<script src="config.js"></script>
</head>
<body>
<style>
html, body, #main {
width: 100%;
height: 100%;
margin: 0;
}
#main {
width: 1000px;
background: #fff;
}
</style>
<div id="main"></div>
<script>
require([
'echarts',
'theme/dark',
'echarts/chart/bar',
'echarts/component/legend',
'echarts/component/grid',
'echarts/component/tooltip'
], function (echarts, theme) {
var chart = echarts.init(document.getElementById('main'), theme);
var xAxisData = [];
var data1 = [];
var data2 = [];
var data3 = [];
var data4 = [];
for (var i = 0; i < 10; i++) {
xAxisData.push('类目' + i);
data1.push((Math.random() * 5).toFixed(2));
data2.push(-Math.random().toFixed(2));
data3.push((Math.random() + 0.5).toFixed(2));
data4.push((Math.random() + 0.3).toFixed(2));
}
var itemStyle = {
normal: {
label: {
show: true,
position: 'outside'
}
},
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowOffsetY: 0,
shadowColor: 'rgba(0,0,0,0.5)'
}
};
console.profile('setOption');
chart.setOption({
legend: {
data: [{
name: 'bar'
}, 'bar2', 'bar3', 'bar4'],
selected: {
// 'bar': false
},
orient: 'vertical',
x: 'right',
y: 'bottom',
align: 'right'
},
tooltip: {},
xAxis: {
data: xAxisData,
axisLine: {
onZero: true
},
splitLine: {
show: false
},
splitArea: {
show: false
}
},
yAxis: {
inverse: true,
splitArea: {
show: false
}
},
series: [{
name: 'bar',
type: 'bar',
stack: 'one',
itemStyle: itemStyle,
data: data1
}, {
name: 'bar2',
type: 'bar',
stack: 'one',
itemStyle: itemStyle,
data: data2
}, {
name: 'bar3',
type: 'bar',
stack: 'two',
itemStyle: itemStyle,
data: data3
}, {
name: 'bar4',
type: 'bar',
stack: 'two',
itemStyle: itemStyle,
data: data4
}]
});
console.profileEnd('setOption');
})
</script>
</body>
</html>
\ No newline at end of file
define(function() {
var theme = {
// 全图默认背景
backgroundColor: '#1b1b1b',
// 默认色板
color: [
'#FE8463','#9BCA63','#FAD860','#60C0DD','#0084C6',
'#D7504B','#C6E579','#26C0C0','#F0805A','#F4E001',
'#B5C334'
],
// 图表标题
title: {
textStyle: {
fontWeight: 'normal',
color: '#fff' // 主标题文字颜色
}
},
// 图例
legend: {
textStyle: {
color: '#ccc' // 图例文字颜色
}
},
// 值域
dataRange: {
itemWidth: 15,
color: ['#FFF808','#21BCF9'],
textStyle: {
color: '#ccc' // 值域文字颜色
}
},
toolbox: {
color : ['#fff', '#fff', '#fff', '#fff'],
effectiveColor : '#FE8463',
disableColor: '#666'
},
// 提示框
tooltip: {
backgroundColor: 'rgba(250,250,250,0.8)', // 提示背景颜色,默认为透明度为0.7的黑色
axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'line', // 默认为直线,可选为:'line' | 'shadow'
lineStyle : { // 直线指示器样式设置
color: '#aaa'
},
crossStyle: {
color: '#aaa'
},
shadowStyle : { // 阴影指示器样式设置
color: 'rgba(200,200,200,0.2)'
}
},
textStyle: {
color: '#333'
}
},
// 区域缩放控制器
dataZoom: {
dataBackgroundColor: '#555', // 数据背景颜色
fillerColor: 'rgba(200,200,200,0.2)', // 填充颜色
handleColor: '#eee' // 手柄颜色
},
// 网格
grid: {
borderWidth: 0
},
// 类目轴
categoryAxis: {
axisLine: { // 坐标轴线
show: false
},
axisTick: { // 坐标轴小标记
show: false
},
axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
color: '#ccc'
}
},
splitLine: { // 分隔线
show: false
}
},
// 数值型坐标轴默认参数
valueAxis: {
axisLine: { // 坐标轴线
show: false
},
axisTick: { // 坐标轴小标记
show: false
},
axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
color: '#ccc'
}
},
splitLine: { // 分隔线
lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
color: ['#aaa'],
type: 'dashed'
}
},
splitArea: { // 分隔区域
show: false
}
},
polar : {
name : {
textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
color: '#ccc'
}
},
axisLine: { // 坐标轴线
lineStyle: { // 属性lineStyle控制线条样式
color: '#ddd'
}
},
splitArea : {
show : true,
areaStyle : {
color: ['rgba(250,250,250,0.2)','rgba(200,200,200,0.2)']
}
},
splitLine : {
lineStyle : {
color : '#ddd'
}
}
},
timeline : {
label: {
textStyle:{
color: '#ccc'
}
},
lineStyle : {
color : '#aaa'
},
controlStyle : {
normal : { color : '#fff'},
emphasis : { color : '#FE8463'}
},
symbolSize : 3
},
// 折线图默认参数
line: {
smooth : true
},
// K线图默认参数
k: {
itemStyle: {
normal: {
color: '#FE8463', // 阳线填充颜色
color0: '#9BCA63', // 阴线填充颜色
lineStyle: {
width: 1,
color: '#FE8463', // 阳线边框颜色
color0: '#9BCA63' // 阴线边框颜色
}
}
}
},
// 雷达图默认参数
radar : {
symbol: 'emptyCircle', // 图形类型
symbolSize:3
//symbol: null, // 拐点图形类型
//symbolRotate : null, // 图形旋转控制
},
pie: {
itemStyle: {
normal: {
borderWidth: 1,
borderColor : 'rgba(255, 255, 255, 0.5)'
},
emphasis: {
borderWidth: 1,
borderColor : 'rgba(255, 255, 255, 1)'
}
}
},
map: {
itemStyle: {
normal: {
borderColor:'rgba(255, 255, 255, 0.5)',
areaStyle: {
color: '#ddd'
},
label: {
textStyle: {
// color: '#ccc'
}
}
},
emphasis: { // 也是选中样式
areaStyle: {
color: '#FE8463'
},
label: {
textStyle: {
// color: 'ccc'
}
}
}
}
},
force : {
itemStyle: {
normal: {
linkStyle : {
color : '#fff'
}
}
}
},
chord : {
itemStyle : {
normal : {
borderWidth: 1,
borderColor: 'rgba(228, 228, 228, 0.2)',
chordStyle : {
lineStyle : {
color : 'rgba(228, 228, 228, 0.2)'
}
}
},
emphasis : {
borderWidth: 1,
borderColor: 'rgba(228, 228, 228, 0.9)',
chordStyle : {
lineStyle : {
color : 'rgba(228, 228, 228, 0.9)'
}
}
}
}
},
gauge : {
axisLine: { // 坐标轴线
show: true, // 默认显示,属性show控制显示与否
lineStyle: { // 属性lineStyle控制线条样式
color: [[0.2, '#9BCA63'],[0.8, '#60C0DD'],[1, '#D7504B']],
width: 3,
shadowColor : '#fff', //默认透明
shadowBlur: 10
}
},
axisTick: { // 坐标轴小标记
length :15, // 属性length控制线长
lineStyle: { // 属性lineStyle控制线条样式
color: 'auto',
shadowColor : '#fff', //默认透明
shadowBlur: 10
}
},
axisLabel: { // 坐标轴小标记
textStyle: { // 属性lineStyle控制线条样式
fontWeight: 'bolder',
color: '#fff',
shadowColor : '#fff', //默认透明
shadowBlur: 10
}
},
splitLine: { // 分隔线
length :25, // 属性length控制线长
lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
width:3,
color: '#fff',
shadowColor : '#fff', //默认透明
shadowBlur: 10
}
},
pointer: { // 分隔线
shadowColor : '#fff', //默认透明
shadowBlur: 5
},
title : {
textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
fontWeight: 'bolder',
fontSize: 20,
fontStyle: 'italic',
color: '#fff',
shadowColor : '#fff', //默认透明
shadowBlur: 10
}
},
detail : {
shadowColor : '#fff', //默认透明
shadowBlur: 5,
offsetCenter: [0, '50%'], // x, y,单位px
textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
fontWeight: 'bolder',
color: '#fff'
}
}
},
funnel : {
itemStyle: {
normal: {
borderColor : 'rgba(255, 255, 255, 0.5)',
borderWidth: 1
},
emphasis: {
borderColor : 'rgba(255, 255, 255, 1)',
borderWidth: 1
}
}
},
textStyle: {
fontFamily: '微软雅黑, Arial, Verdana, sans-serif'
}
};
return theme;
});
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册