提交 a3e105a5 编写于 作者: K kener

例子更新代码优化

上级 faf6a4b2
......@@ -2,14 +2,16 @@ require.config({
paths:{
echarts:'example/www/js/echarts',
'echarts/chart/bar' : 'example/www/js/echarts',
'echarts/chart/line': 'example/www/js/echarts'
'echarts/chart/line': 'example/www/js/echarts',
'echarts/chart/scatter': 'example/www/js/echarts'
}
});
require(
[
'echarts',
'echarts/chart/bar',
'echarts/chart/line'
'echarts/chart/line',
'echarts/chart/scatter'
],
function(ec) {
myChart = ec.init(document.getElementById('main'));
......@@ -33,7 +35,7 @@ require(
xAxis : [
{
type : 'category',
axisLabel:{formatter:' '},
axisLabel:{show:false},
data : (function() {
var res = [];
for (var i = 0; i < 30; i++) {
......@@ -50,6 +52,8 @@ require(
min:-30,
max:30,
power:1,
axisLine:{show:false},
axisLabel:{show:false},
splitArea : {show : true}
}
],
......
......@@ -291,6 +291,10 @@
<a href="example/force1.html"><img src="asset/img/example/cache.png"></a>
<p>简单关系网络。</p>
</li><!--/li-->
<li data-thumb="asset/img/example/cache.png">
<a href="example/force2.html"><img src="asset/img/example/cache.png"></a>
<p>树状关系网络。</p>
</li><!--/li-->
<li data-thumb="asset/img/example/cache.png">
<a href="example/webkit-dep.html"><img src="asset/img/example/cache.png"></a>
<p>Webkit内核依赖。</p>
......
......@@ -170,7 +170,7 @@ option = {
color : '#af0000'
}
}
},
}
],
itemStyle: {
normal: {
......
......@@ -168,7 +168,7 @@ option = {
color : '#af0000'
}
}
},
}
],
itemStyle: {
normal: {
......
......@@ -416,7 +416,7 @@ define(function(require) {
var prePercent = preData.value * percent / data.value;
if (prePercent < 4) {
// 都小就延长,前小后大就缩短
radius = preData.__labelRadius + (percent < 4 ? 20 : -20)
radius = preData.__labelRadius + (percent < 4 ? 20 : -20);
x = centerX + radius * zrMath.cos(midAngle, true);
y = centerY - radius * zrMath.sin(midAngle, true);
}
......
......@@ -1135,7 +1135,7 @@ define(function (require) {
var newColorList = [_colorList[0]];
var step = len / (splitNumber - 1);
for (var i = 1; i < splitNumber - 1; i++) {
newColorList.push(_colorList[Math.floor(i * step)])
newColorList.push(_colorList[Math.floor(i * step)]);
}
newColorList.push(_colorList[len - 1]);
_colorList = newColorList;
......
......@@ -569,7 +569,7 @@ define(function() {
},
//symbol: null, // 拐点图形类型
symbolSize: 2 // 可计算特性参数,空数据拖拽提示图形大小
//symbolRotate : null, // 图形旋转控制
//symbolRotate : null, // 图形旋转控制
},
// 饼图默认参数
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册