Skip to content

Commit

Permalink
代码优化
Browse files Browse the repository at this point in the history
  • Loading branch information
kener committed Jan 9, 2014
1 parent f1f4b8c commit ca6e20e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
5 changes: 4 additions & 1 deletion doc/example/topic/10-me-china/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
padding-top: 15px;
margin-top:15px;
}
.nav.nav-tabs.nav-justified {
margin-bottom:0;
}
.ctrl-wrap {
padding:20px 20px 0 20px;
text-align: center;
Expand Down Expand Up @@ -182,7 +185,7 @@ <h3>2011年GDP:谁跻身万亿俱乐部 谁还在百亿级漂浮</h3>
</div>
<!-- FOOTER -->
<footer>
<p>&copy; 2013 Data Journalism Workshop(华媒基金会 &middot; 数据新闻工作坊) &middot; 于博(新华社) &middot; 吴楚茵(南方都市报) &middot; 林峰(百度)</p>
<p>&copy; 2014 Data Journalism Workshop(华媒基金会 &middot; 数据新闻工作坊) &middot; 于博(新华社) &middot; 吴楚茵(南方都市报) &middot; 林峰(百度)</p>
<p><a href="http://echarts.baidu.com" target="_blank">Data Visualization by ECharts</a></p>
</footer>

Expand Down
2 changes: 1 addition & 1 deletion doc/example/topic/10-me-china/js/djws.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ window.onload = function() {
window.onresize = function() {
clearTimeout(resizeTicket);
resizeTicket = setTimeout(function(){
myChart0.resize();console.log(curTabIdx)
myChart0.resize();
if (curTabIdx == 1) {
myChart1.resize();
}
Expand Down
2 changes: 1 addition & 1 deletion doc/example/topic/24-population-china/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ <h1>中国人口流动大潮1987-2011(单位:万人)</h1>
}
</script>
<div class="footer">
<p>&copy; 2013 Data Journalism Workshop(华媒基金会 &middot; 数据新闻工作坊) &middot; 孟立昕(腾讯)&middot; 王飞宇(证券时报) &middot; 颜冬(视觉中国) &middot; 林峰(百度)</p>
<p>&copy; 2014 Data Journalism Workshop(华媒基金会 &middot; 数据新闻工作坊) &middot; 孟立昕(腾讯)&middot; 王飞宇(证券时报) &middot; 颜冬(视觉中国) &middot; 林峰(百度)</p>
<p><a href="http://echarts.baidu.com" target="_blank">Data Visualization by ECharts</a></p>
</div>
</body>
Expand Down
7 changes: 7 additions & 0 deletions src/component/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,13 @@ define(function(require) {
[data, serie],
'itemStyle.' + status + '.label.formatter'
);
if (!formatter && status == 'emphasis') {
// emphasis时需要看看normal下是否有formatter
formatter = self.deepQuery(
[data, serie],
'itemStyle.normal.label.formatter'
)
}

var value = typeof data != 'undefined'
? (typeof data.value != 'undefined'
Expand Down

0 comments on commit ca6e20e

Please sign in to comment.