提交 4895ec93 编写于 作者: K kener

柱形itemStyle改造,属性冲突 fixed #662

上级 99d070a2
......@@ -3553,21 +3553,33 @@ geoCoord : {
</tr>
<tr>
<td> <b>{string}</b> borderColor </td>
<td> 各异 </td>
<td> 折线图(symbol),散点图(symbole),饼图,markPoint</td>
<td> 边框颜色 </td>
</tr>
<tr>
<td> <b>{number}</b> borderWidth </td>
<td> 各异 </td>
<td> 折线图(symbol),散点图(symbole),饼图,markPoint</td>
<td> 边框线宽,单位px </td>
</tr>
<tr>
<td> <b>{string}</b> barBorderColor </td>
<td> '#fff' </td>
<td> 柱形图,折线图(symbol),散点图(symbole),饼图,markPoint</td>
<td> 柱形边框颜色 </td>
<td> 柱形图</td>
<td> 边框颜色 </td>
</tr>
<tr>
<td> <b>{number}</b> borderRadius </td>
<td> <b>{number}</b> barBorderRadius </td>
<td> 0 </td>
<td> 柱形图</td>
<td> 柱形边框圆角,单位px,默认为0 </td>
</tr>
<tr>
<td> <b>{number}</b> borderWidth </td>
<td> 1 </td>
<td> 柱形图,折线图(symbol),散点图(symbole),饼图,markPoint</td>
<td> 柱形边框线宽,单位px,默认为1 </td>
<td> <b>{number}</b> barBorderWidth </td>
<td> 0 </td>
<td> 柱形图</td>
<td> 柱形边框线宽,单位px,默认为0 </td>
</tr>
<tr>
<td> <b>{Object}</b> label </td>
......
......@@ -134,10 +134,10 @@ var theme = {
bar: {
itemStyle: {
normal: {
borderRadius: 0
barBorderRadius: 0
},
emphasis: {
borderRadius: 0
barBorderRadius: 0
}
}
},
......
......@@ -134,10 +134,10 @@ var theme = {
bar: {
itemStyle: {
normal: {
borderRadius: 5
barBorderRadius: 5
},
emphasis: {
borderRadius: 5
barBorderRadius: 5
}
}
},
......
......@@ -503,9 +503,9 @@ theme = {
itemStyle: {
normal: {
// color: '各异',
borderColor: '#fff', // 柱条边线
borderRadius: 0, // 柱条边线圆角,单位px,默认为0
borderWidth: 1, // 柱条边线线宽,单位px,默认为1
barBorderColor: '#fff', // 柱条边线
barBorderRadius: 0, // 柱条边线圆角,单位px,默认为0
barBorderWidth: 1, // 柱条边线线宽,单位px,默认为1
label: {
show: false
// position: 默认自适应,水平布局为'top',垂直布局为'right',可选为
......@@ -515,9 +515,9 @@ theme = {
},
emphasis: {
// color: '各异',
borderColor: 'rgba(0,0,0,0)', // 柱条边线
borderRadius: 0, // 柱条边线圆角,单位px,默认为0
borderWidth: 1, // 柱条边线线宽,单位px,默认为1
barBorderColor: 'rgba(0,0,0,0)', // 柱条边线
barBorderRadius: 0, // 柱条边线圆角,单位px,默认为0
barBorderWidth: 1, // 柱条边线线宽,单位px,默认为1
label: {
show: false
// position: 默认自适应,水平布局为'top',垂直布局为'right',可选为
......
......@@ -144,14 +144,14 @@ define(function (require) {
iconShape = legend.getItemShape(serieName);
if (iconShape) {
// 回调legend,换一个更形象的icon
if (serie.itemStyle.normal.borderWidth > 0) {
if (serie.itemStyle.normal.barBorderWidth > 0) {
iconShape.style.x += 1;
iconShape.style.y += 1;
iconShape.style.width -= 2;
iconShape.style.height -= 2;
iconShape.style.strokeColor =
iconShape.highlightStyle.strokeColor =
serie.itemStyle.normal.borderColor;
serie.itemStyle.normal.barBorderColor;
iconShape.highlightStyle.lineWidth = 3;
iconShape.style.brushType = 'both';
}
......@@ -795,7 +795,7 @@ define(function (require) {
queryTarget,
'itemStyle.normal'
);
var normalBorderWidth = normal.borderWidth;
var normalBorderWidth = normal.barBorderWidth;
var emphasis = this.deepMerge(
queryTarget,
'itemStyle.emphasis'
......@@ -810,15 +810,15 @@ define(function (require) {
height : height,
brushType : 'both',
color : this.getItemStyleColor(normalColor, seriesIndex, dataIndex, data),
radius : normal.borderRadius,
radius : normal.barBorderRadius,
lineWidth : normalBorderWidth,
strokeColor : normal.borderColor
strokeColor : normal.barBorderColor
},
highlightStyle : {
color : this.getItemStyleColor(emphasisColor, seriesIndex, dataIndex, data),
radius : emphasis.borderRadius,
lineWidth : emphasis.borderWidth,
strokeColor : emphasis.borderColor
radius : emphasis.barBorderRadius,
lineWidth : emphasis.barBorderWidth,
strokeColor : emphasis.barBorderColor
},
_orient : orient
};
......
......@@ -514,9 +514,9 @@ define(function() {
itemStyle: {
normal: {
// color: '各异',
borderColor: '#fff', // 柱条边线
borderRadius: 0, // 柱条边线圆角,单位px,默认为0
borderWidth: 0, // 柱条边线线宽,单位px,默认为1
barBorderColor: '#fff', // 柱条边线
barBorderRadius: 0, // 柱条边线圆角,单位px,默认为0
barBorderWidth: 0, // 柱条边线线宽,单位px,默认为1
label: {
show: false
// formatter: 标签文本格式器,同Tooltip.formatter,不支持回调
......@@ -527,9 +527,9 @@ define(function() {
},
emphasis: {
// color: '各异',
borderColor: '#fff', // 柱条边线
borderRadius: 0, // 柱条边线圆角,单位px,默认为0
borderWidth: 0, // 柱条边线线宽,单位px,默认为1
barBorderColor: '#fff', // 柱条边线
barBorderRadius: 0, // 柱条边线圆角,单位px,默认为0
barBorderWidth: 0, // 柱条边线线宽,单位px,默认为1
label: {
show: false
// formatter: 标签文本格式器,同Tooltip.formatter,不支持回调
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册