提交 1313fcc5 编写于 作者: K kener

例子更新

上级 2d46edcf
......@@ -101,7 +101,8 @@ else {
'echarts/chart/radar': fileLocation,
'echarts/chart/map': fileLocation,
'echarts/chart/chord': fileLocation,
'echarts/chart/force': fileLocation
'echarts/chart/force': fileLocation,
'echarts/chart/gauge': fileLocation
}
});
}
......@@ -118,6 +119,7 @@ require(
'echarts/chart/radar',
'echarts/chart/force',
'echarts/chart/chord',
'echarts/chart/gauge',
needMap() ? 'echarts/chart/map' : 'echarts'
],
requireCallback
......
......@@ -69,7 +69,8 @@ else {
'echarts/chart/radar': fileLocation,
'echarts/chart/map': fileLocation,
'echarts/chart/chord': fileLocation,
'echarts/chart/force': fileLocation
'echarts/chart/force': fileLocation,
'echarts/chart/gauge': fileLocation,
}
});
}
......@@ -93,7 +94,8 @@ require(
'echarts/chart/radar',
'echarts/chart/force',
'echarts/chart/chord',
'echarts/chart/map'
'echarts/chart/map',
'echarts/chart/gauge'
],
requireCallback
);
......
......@@ -93,7 +93,8 @@ else {
'echarts/chart/radar': fileLocation,
'echarts/chart/map': fileLocation,
'echarts/chart/chord': fileLocation,
'echarts/chart/force': fileLocation
'echarts/chart/force': fileLocation,
'echarts/chart/gauge': fileLocation
}
});
}
......@@ -110,7 +111,8 @@ require(
'echarts/chart/radar',
'echarts/chart/force',
'echarts/chart/chord',
'echarts/chart/map'
'echarts/chart/map',
'echarts/chart/gauge'
],
requireCallback
);
......
......@@ -36,6 +36,7 @@ else {
'echarts/chart/map': fileLocation,
'echarts/chart/chord': fileLocation,
'echarts/chart/force': fileLocation,
'echarts/chart/gauge': fileLocation,
webkitDep : '../../doc/example/webkit-dep'
}
});
......@@ -71,7 +72,8 @@ require(
'echarts/chart/radar',
'echarts/chart/force',
'echarts/chart/chord',
'echarts/chart/map'
'echarts/chart/map',
'echarts/chart/gauge'
],
function (ec, wd) {
echarts = ec;
......
......@@ -76,6 +76,7 @@ define(function (require) {
case ecConfig.CHART_TYPE_MAP :
case ecConfig.CHART_TYPE_K :
case ecConfig.CHART_TYPE_CHORD:
case ecConfig.CHART_TYPE_GUAGE:
return 2;
case ecConfig.COMPONENT_TYPE_LEGEND :
......
......@@ -160,9 +160,6 @@ define(function (require) {
* 绘制图形
*/
_buildShape : function () {
this._axisLine = null;
// 标签文字格式化
// this._labelData = this._reformLabel();
// 标签显示的挑选间隔
this._interval = this._getInterval();
......
......@@ -19,6 +19,7 @@ define(function() {
CHART_TYPE_ISLAND: 'island',
CHART_TYPE_FORCE : 'force',
CHART_TYPE_CHORD : 'chord',
CHART_TYPE_GAUGE : 'gauge',
// 组件类型
COMPONENT_TYPE_TITLE: 'title',
......@@ -879,6 +880,77 @@ define(function() {
matrix : []
},
gauge : {
center : ['50%', '50%'], // 默认全局居中
radius : [0, '75%'],
startAngle: 225,
endAngle : -45,
min: 0, // 最小值
max: 100, // 最大值
precision: 0, // 小数精度,默认为0,无小数点
splitNumber: 10, // 分割段数,默认为5
axisLine: { // 坐标轴线
show: true, // 默认显示,属性show控制显示与否
lineStyle: { // 属性lineStyle控制线条样式
color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']],
width: 30
}
},
axisTick: { // 坐标轴小标记
show: true, // 属性show控制显示与否,默认不显示
splitNumber: 5, // 每份split细分多少段
length :8, // 属性length控制线长
lineStyle: { // 属性lineStyle控制线条样式
color: '#eee',
width: 1,
type: 'solid'
}
},
axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
show: true,
// formatter: null,
textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
color: '#333'
}
},
splitLine: { // 分隔线
show: true, // 默认显示,属性show控制显示与否
length :30, // 属性length控制线长
lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
color: '#eee',
width: 2,
type: 'solid'
}
},
pointer : {
length : '80%',
width : 8,
color : 'auto'
},
title : {
show : true,
offsetCenter: [0, '-40%'], // x, y,单位px
textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
color: '#333',
fontSize : 15
}
},
detail : {
show : true,
backgroundColor: 'rgba(0,0,0,0)',
borderWidth: 0,
borderColor: '#ccc',
width: 100,
height: 40,
offsetCenter: [0, '40%'], // x, y,单位px
// formatter: null,
textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
color: 'auto',
fontSize : 30
}
}
},
island: {
r: 15,
calculateStep: 0.1 // 滚轮可计算步长 0.1 = 10%
......
......@@ -117,7 +117,8 @@ else {
'echarts/chart/radar': fileLocation,
'echarts/chart/map': fileLocation,
'echarts/chart/chord': fileLocation,
'echarts/chart/force': fileLocation
'echarts/chart/force': fileLocation,
'echarts/chart/gauge': fileLocation
}
});
}
......@@ -134,7 +135,8 @@ require(
'echarts/chart/radar',
'echarts/chart/force',
'echarts/chart/chord',
'echarts/chart/map'
'echarts/chart/map',
'echarts/chart/gauge'
],
requireCallback
);
......
......@@ -31,7 +31,8 @@ else {
'echarts/chart/radar': fileLocation,
'echarts/chart/map': fileLocation,
'echarts/chart/chord': fileLocation,
'echarts/chart/force': fileLocation
'echarts/chart/force': fileLocation,
'echarts/chart/gauge': fileLocation
}
});
}
......@@ -48,7 +49,8 @@ require(
'echarts/chart/radar',
'echarts/chart/force',
'echarts/chart/chord',
'echarts/chart/map'
'echarts/chart/map',
'echarts/chart/gauge'
],
requireCallback
);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册