提交 b5b8dcaa 编写于 作者: P pah100

tweak example brush

上级 efba0a15
......@@ -409,13 +409,13 @@
require([
'echarts',
'echarts/util/throttle',
'echarts/chart/scatter',
'echarts/chart/effectScatter',
'echarts/component/legend',
'echarts/component/geo',
'echarts/component/brush'
], function (echarts) {
], function (echarts, throttle) {
var data = [
{name: '海门', value: 9},
......@@ -983,9 +983,12 @@
]
};
chart.on('brushSelected', renderBrushed);
var debouncedRenderer = throttle.debounce(renderBrushed, 300);
chart.on('brushSelected', debouncedRenderer);
chart.setOption(option);
function renderBrushed(params) {
var brushed = [];
var top = 0;
......@@ -1043,7 +1046,7 @@
// console.log(JSON.stringify(params));
chart.setOption({
animation: false,
// animation: false,
yAxis: {
data: categoryData
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册