Skip to content

Commit

Permalink
Fix #8799 (visualMap: false on data items effect subsequent items)
Browse files Browse the repository at this point in the history
  • Loading branch information
100pah committed Jan 1, 2019
1 parent 386f096 commit af8ff4b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/visual/visualSolution.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export function incrementalApplyVisual(stateList, visualMappings, getValueState,

// Consider performance
if (rawDataItem && rawDataItem.visualMap === false) {
return;
continue;
}

var value = dim != null
Expand Down
25 changes: 17 additions & 8 deletions test/visualMap-pieces.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@



<h1>map</h1>
<div class="chart" id="map"></div>

<h1>line symbol (check toggle normally)</h1>
<div class="chart" id="line-symbol"></div>


Expand Down Expand Up @@ -147,12 +145,12 @@ <h1>line symbol (check toggle normally)</h1>
{name: '河南',value: Math.round(Math.random()*2000)},
{name: '云南',value: 123},
{name: '辽宁',value: 305},
{name: '黑龙江',value: Math.round(Math.random()*2000), visualMap: false},
{name: '湖南',value: 200},
{name: '黑龙江', value: Math.round(Math.random()*2000), visualMap: false},
{name: '湖南', value: 200},
{name: '安徽',value: Math.round(Math.random()*2000)},
{name: '山东',value: Math.round(Math.random()*2000)},
{name: '新疆',value: Math.round(Math.random()*2000)},
{name: '江苏',value: Math.round(Math.random()*2000)},
{name: '江苏', itemStyle: {color: 'red'}, value: Math.round(Math.random()*2000), visualMap: false},
{name: '浙江',value: Math.round(Math.random()*2000)},
{name: '江西',value: Math.round(Math.random()*2000)},
{name: '湖北',value: Math.round(Math.random()*2000)},
Expand All @@ -178,7 +176,16 @@ <h1>line symbol (check toggle normally)</h1>
]
};

testHelper.createChart(echarts, 'map', option);
var chart = testHelper.create(echarts, 'map', {
title: [
'All provinces should be "blue", except that',
'北京 is "black"',
'黑龙江 is "grey" (visualMap: false)',
'江苏 is "red" (visualMap: false)'
],
option: option
});

})

</script>
Expand Down Expand Up @@ -272,8 +279,10 @@ <h1>line symbol (check toggle normally)</h1>
]
};


testHelper.createChart(echarts, 'line-symbol', option);
var chart = testHelper.create(echarts, 'line-symbol', {
title: 'line symbol (check toggle normally)',
option: option
});
});

</script>
Expand Down

0 comments on commit af8ff4b

Please sign in to comment.