Skip to content

Commit

Permalink
roamController.show enhancement #866
Browse files Browse the repository at this point in the history
  • Loading branch information
kener committed Nov 13, 2014
1 parent bb15bc2 commit f661d0c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/component/dataRange.js
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,8 @@ define(function (require) {
},

__onhoverlink: function(param) {
if (this.dataRangeOption.hoverLink
if (this.dataRangeOption.show
&& this.dataRangeOption.hoverLink
&& this._indicatorShape
&& param
&& param.seriesIndex != null && param.dataIndex != null
Expand Down
3 changes: 3 additions & 0 deletions src/component/roamController.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ define(function (require) {
RoamController.prototype = {
type: ecConfig.COMPONENT_TYPE_ROAMCONTROLLER,
_buildShape: function () {
if (!this.rcOption.show) {
return;
}
// 元素组的位置参数,通过计算所得x, y, width, height
this._itemGroupLocation = this._getItemGroupLocation();

Expand Down
12 changes: 9 additions & 3 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ define(function() {

// 图例
legend: {
show: true,
orient: 'horizontal', // 布局方式,默认为水平布局,可选为:
// 'horizontal' ¦ 'vertical'
x: 'center', // 水平安放位置,默认为全图居中,可选为:
Expand Down Expand Up @@ -110,6 +111,7 @@ define(function() {

// 值域
dataRange: {
show: true,
orient: 'vertical', // 布局方式,默认为垂直布局,可选为:
// 'horizontal' ¦ 'vertical'
x: 'left', // 水平安放位置,默认为全图左对齐,可选为:
Expand Down Expand Up @@ -310,6 +312,7 @@ define(function() {

// 类目轴
categoryAxis: {
show: true,
position: 'bottom', // 位置
name: '', // 坐标轴名字,默认为空
nameLocation: 'end', // 坐标轴名字位置,支持'start' | 'end'
Expand Down Expand Up @@ -366,6 +369,7 @@ define(function() {

// 数值型坐标轴默认参数
valueAxis: {
show: true,
position: 'left', // 位置
name: '', // 坐标轴名字,默认为空
nameLocation: 'end', // 坐标轴名字位置,支持'start' | 'end'
Expand Down Expand Up @@ -521,7 +525,7 @@ define(function() {
},

roamController: {
show: false,
show: true,
x: 'left', // 水平安放位置,默认为全图左对齐,可选为:
// 'center' ¦ 'left' ¦ 'right'
// ¦ {number}(x坐标,单位px)
Expand Down Expand Up @@ -899,8 +903,10 @@ define(function() {
// textStyle: null // 默认使用全局文本样式,详见TEXTSTYLE
},
nodeStyle: {
borderColor: '#5182ab',
borderWidth: 1
brushType : 'both',
color : '#f08c2e',
strokeColor : '#5182ab',
lineWidth: 1
},
linkStyle: {
color: '#5182ab',
Expand Down

0 comments on commit f661d0c

Please sign in to comment.