提交 feafbb9e 编写于 作者: K kener

jshint~

上级 17c739b7
......@@ -25,8 +25,6 @@ define(function(require) {
var ecConfig = require('../config');
var ecData = require('../util/ecData');
var zrColor = require('zrender/tool/color');
var self = this;
self.type = ecConfig.CHART_TYPE_K;
......@@ -42,14 +40,11 @@ define(function(require) {
top : [],
bottom : []
};
var xAxisIndex;
var yAxisIndex;
var xAxis;
for (var i = 0, l = series.length; i < l; i++) {
if (series[i].type == ecConfig.CHART_TYPE_K) {
series[i] = self.reformOption(series[i]);
xAxisIndex = series[i].xAxisIndex;
xAxis = component.xAxis.getAxis(xAxisIndex);
xAxis = component.xAxis.getAxis(series[i].xAxisIndex);
if (xAxis.type == ecConfig.COMPONENT_TYPE_AXIS_CATEGORY
) {
_position2sIndexMap[xAxis.getPosition()].push(i);
......
......@@ -25,7 +25,6 @@ define(function(require) {
var ecConfig = require('../config');
var ecData = require('../util/ecData');
var zrMath = require('zrender/tool/math');
var zrUtil = require('zrender/tool/util');
var self = this;
......@@ -75,10 +74,8 @@ define(function(require) {
if (key != 'value') {
valueData[name][key] = data[j][key];
}
else {
if (!isNaN(data[j].value)) {
valueData[name].value += data[j].value;
}
else if (!isNaN(data[j].value)) {
valueData[name].value += data[j].value;
}
}
//索引有该区域的系列样式
......@@ -135,7 +132,7 @@ define(function(require) {
];
}
}
return scale
return scale;
}
function _buildMap(mapData, valueData) {
......
......@@ -90,7 +90,7 @@ define(function(require) {
var data;
var value;
var xAxis;
var yAxis
var yAxis;
var pointList = {};
var x;
......@@ -99,7 +99,7 @@ define(function(require) {
for (var j = 0, k = seriesArray.length; j < k; j++) {
seriesIndex = seriesArray[j];
serie = series[seriesIndex];
if (serie.data.length == 0) {
if (serie.data.length === 0) {
continue;
}
......@@ -142,7 +142,6 @@ define(function(require) {
* 生成折线和折线上的拐点
*/
function _buildPointList(pointList) {
var zrColor = require('zrender/tool/color');
var nColor; // normal
var eColor; // emphasis
......@@ -297,7 +296,7 @@ define(function(require) {
};
break;
}
itemShape._serieIndex = seriesIndex
itemShape._serieIndex = seriesIndex;
itemShape.zlevel = _zlevelBase;
itemShape.style.color = nColor;
itemShape.style.strokeColor = nColor;
......@@ -370,7 +369,6 @@ define(function(require) {
* 动画设定
*/
function animation() {
return;
var duration = self.deepQuery([option], 'animationDuration');
var easing = self.deepQuery([option], 'animationEasing');
var x;
......
......@@ -14,7 +14,7 @@ define(function (require) {
* @param {Object} option 图表参数
* @param {Object=} selected 用于状态保持
*/
function DataRange(messageCenter, zr, option, selected) {
function DataRange(messageCenter, zr, option) {
var Base = require('./base');
Base.call(this, zr);
......@@ -75,7 +75,6 @@ define(function (require) {
var textShape;
var font = self.getFont(dataRangeOption.textStyle);
var zrWidth = zr.getWidth();
var lastX = _itemGroupLocation.x;
var lastY = _itemGroupLocation.y;
var itemWidth = dataRangeOption.itemWidth;
......@@ -187,19 +186,15 @@ define(function (require) {
* 构建渐变型的值域元素
*/
function _buildGradient() {
var itemName;
var itemShape;
var textShape;
var font = self.getFont(dataRangeOption.textStyle);
var zrWidth = zr.getWidth();
var lastX = _itemGroupLocation.x;
var lastY = _itemGroupLocation.y;
var itemWidth = dataRangeOption.itemWidth;
var itemHeight = dataRangeOption.itemHeight;
var itemGap = dataRangeOption.itemGap;
var textHeight = zrArea.getTextWidth('', font);
var color;
var needValueText = true;
......@@ -270,7 +265,7 @@ define(function (require) {
if (dataRangeOption.calculable) {
_calculableLocation = itemShape.style;
_buildFiller();
_bulidMask()
_bulidMask();
_bulidHandle();
}
......@@ -335,8 +330,8 @@ define(function (require) {
// 手柄统统在下方
pointListStart = [
[x, y],
[x, y + height + textHieght + textHieght / 2],
[x - textWidth, y + height + textHieght + textHieght / 2],
[x, y + height + textHieght / 2 * 3],
[x - textWidth, y + height + textHieght / 2 * 3],
[x - textWidth, y + height + textHieght / 2],
[x - textHieght / 2, y + height + textHieght / 2],
[x - 1, y + height],
......@@ -348,10 +343,10 @@ define(function (require) {
pointListEnd = [
[x + width, y],
[x + width, y + height + textHieght + textHieght / 2],
[x + width + textWidth, y + height + textHieght + textHieght / 2],
[x + width, y + height + textHieght / 2 * 3],
[x + width + textWidth, y + height + textHieght/2*3],
[x + width + textWidth, y + height + textHieght / 2],
[x + width + textHieght / 2, y + height + textHieght / 2],
[x + width + textHieght / 2, y + height + textHieght/2],
[x + width + 1, y + height],
[x + width + 1, y]
];
......@@ -362,8 +357,8 @@ define(function (require) {
// 手柄在上方
pointListStart = [
[x, y + height],
[x, y - textHieght - textHieght / 2],
[x - textWidth, y - textHieght - textHieght / 2],
[x, y - textHieght / 2 * 3],
[x - textWidth, y - textHieght / 2 * 3],
[x - textWidth, y - textHieght / 2],
[x - textHieght / 2, y - textHieght / 2],
[x - 1, y],
......@@ -375,8 +370,8 @@ define(function (require) {
pointListEnd = [
[x + width, y + height],
[x + width, y - textHieght - textHieght / 2],
[x + width + textWidth, y - textHieght - textHieght / 2],
[x + width, y - textHieght / 2 * 3],
[x + width + textWidth, y - textHieght / 2 * 3],
[x + width + textWidth, y - textHieght / 2],
[x + width + textHieght / 2, y - textHieght / 2],
[x + width + 1, y],
......@@ -767,7 +762,7 @@ define(function (require) {
textAlign: (dataRangeOption.orient == 'horizontal'
? 'left' : 'center')
}
}
};
}
// 色尺legend item shape
......@@ -928,7 +923,7 @@ define(function (require) {
}
else if (e.id == _endShape.id && a >= b) {
// _endShape触发
a = b;;
a = b;
_startShape.style.x = a;
}
_fillerShae.style.x = a;
......@@ -950,7 +945,7 @@ define(function (require) {
}
else if (e.id == _endShape.id && a >= b) {
// _endShape触发
a = b;;
a = b;
_startShape.style.y = a;
}
_fillerShae.style.y = a;
......
......@@ -353,7 +353,7 @@ define(function (require) {
brushType : 'both'
},
clickable : true
}
};
default :
return {
shape : 'rectangle',
......
......@@ -601,7 +601,7 @@ define(function (require) {
}
else {
_tDom.innerHTML = serie.name + '<br/>' +
(name == '' ? '' : (name + ' : '))
(name === '' ? '' : (name + ' : '))
+ value +
(typeof speical == 'undefined'
? ''
......
......@@ -647,7 +647,7 @@ define(function (require) {
}
}
_min = -splitGap * splitNumber + _max;;
_min = -splitGap * splitNumber + _max;
}
else {
// 一正一负,确保0被选中
......
......@@ -327,8 +327,8 @@ define(function() {
scatter: {
xAxisIndex: 0,
yAxisIndex: 0,
//symbol: null, // 图形类型,非标准参数
symbolSize: 4 // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
//symbol: null, // 图形类型,非标准参数
symbolSize: 4 // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
},
// 饼图默认参数
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -74,8 +74,6 @@
*/
define(
function(require) {
var matrix = require('zrender/tool/matrix');
function Symbol() {
this.type = 'symbol';
}
......@@ -166,8 +164,8 @@ define(
buildPath : function(ctx, style) {
var pointList = style.pointList;
var rect = this.getRect(style);
console.log(rect)
var ti = new Date();
// console.log(rect)
// var ti = new Date();
var pixels = ctx.getImageData(
rect.x, rect.y, rect.width, rect.height
);
......@@ -190,7 +188,7 @@ define(
data[idx + 3] = 255;
}
ctx.putImageData(pixels, rect.x, rect.y);
console.log(new Date() - ti);
// console.log(new Date() - ti);
return;
},
......@@ -203,8 +201,7 @@ define(
return shape.get('polygon').getRect(style);
},
isCover : function(e, x, y) {
isCover : function() {
return false;
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册