From 90d037e7f740e8921aa546d27032305cef559015 Mon Sep 17 00:00:00 2001 From: lang Date: Thu, 16 Jun 2016 16:30:44 +0800 Subject: [PATCH] Fix dataZoom elements z --- src/component/dataZoom/SliderZoomView.js | 9 ++++++--- test/parallel-nutrients.html | 6 ++++-- test/theme.html | 7 ++++++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/component/dataZoom/SliderZoomView.js b/src/component/dataZoom/SliderZoomView.js index d43a92aa89..a9a49f328e 100644 --- a/src/component/dataZoom/SliderZoomView.js +++ b/src/component/dataZoom/SliderZoomView.js @@ -146,9 +146,10 @@ define(function (require) { var barGroup = this._displayables.barGroup = new graphic.Group(); + this._renderBackground(); + this._renderHandle(); - this._renderBackground(); this._renderDataShadow(); thisGroup.add(barGroup); @@ -256,7 +257,8 @@ define(function (require) { }, style: { fill: dataZoomModel.get('backgroundColor') - } + }, + z2: -40 })); }, @@ -462,7 +464,8 @@ define(function (require) { textAlign: 'center', fill: textStyleModel.getTextColor(), textFont: textStyleModel.getFont() - } + }, + z2: 10 })); }, this); diff --git a/test/parallel-nutrients.html b/test/parallel-nutrients.html index 09ab15c70c..27fe450cc2 100644 --- a/test/parallel-nutrients.html +++ b/test/parallel-nutrients.html @@ -34,7 +34,7 @@ 'echarts/component/legend', 'echarts/component/tooltip', 'echarts/component/toolbox', - 'echarts/component/visualMap', + 'echarts/component/visualMap' ], function (ec, ct) { $.getJSON('./data/nutrients.json', function (data) { @@ -45,7 +45,9 @@ chart = myChart = echarts.init(document.getElementById('main')); + console.time('render'); chart.setOption(getOption(data)); + console.timeEnd('render'); chart.on('axisAreaSelected', function (event) { // var indices = chart.getModel().getSeries()[0].getRawIndicesByActiveState('active'); @@ -231,7 +233,7 @@ lineStyle: lineStyle, inactiveOpacity: 0, activeOpacity: 0.01, - progressive: 100, + progressive: 500, smooth: true, data: data } diff --git a/test/theme.html b/test/theme.html index 397541ea69..79678ee2e7 100644 --- a/test/theme.html +++ b/test/theme.html @@ -26,7 +26,8 @@ 'echarts/chart/bar', 'echarts/component/legend', 'echarts/component/grid', - 'echarts/component/tooltip' + 'echarts/component/tooltip', + 'echarts/component/dataZoom' ], function (echarts, theme) { var chart = echarts.init(document.getElementById('main'), 'dark'); @@ -75,6 +76,10 @@ align: 'right' }, tooltip: {}, + dataZoom: { + start: 10, + end: 20 + }, xAxis: { data: xAxisData, axisLine: {