提交 7abad407 编写于 作者: L lang

tweak

上级 53bbd07e
......@@ -148,6 +148,12 @@ define(function(require) {
// Always update, or it is wrong in the case turning on legend
symbolDraw.updateData(data, api, isSymbolIgnore);
// Stop symbol animation and sync with line points
// FIXME performance?
data.eachItemGraphicEl(function (el) {
el.stopAnimation();
});
// In the case data zoom triggerred refreshing frequently
// Data may not change if line has a category axis. So it should animate nothing
if (!isPointsSame(this._stackedOnPoints, stackedOnPoints)
......@@ -278,7 +284,7 @@ define(function(require) {
var labelInterval = categoryAxis.getLabelInterval();
return function (idx) {
return (typeof labelInterval === 'function')
&& !labelInterval(idx, categoryAxis.scale.getItem(idx))
&& !labelInterval(idx, categoryAxis.scale.getLabel(idx))
|| idx % (labelInterval + 1);
};
}
......@@ -325,7 +331,6 @@ define(function(require) {
if (cmd === '=') {
var el = data.getItemGraphicEl(diffStatus[i].idx1);
if (el) {
el.stopAnimation();
updatedDataInfo.push({
el: el,
ptIdx: i // Index of points
......@@ -338,12 +343,7 @@ define(function(require) {
polyline.animators[0].during(function () {
for (var i = 0; i < updatedDataInfo.length; i++) {
var el = updatedDataInfo[i].el;
vector.copy(
el.position,
// synchronizing with the point on line
polyline.shape.points[updatedDataInfo[i].ptIdx]
);
el.dirty();
el.attr('position', polyline.shape.points[updatedDataInfo[i].ptIdx]);
}
});
}
......
......@@ -59,6 +59,7 @@ define(function (require) {
var textStyleModel = labelModel.getModel('textStyle');
var layout = data.getItemLayout(idx);
var point = layout.point;
var offset = layout.offset;
......
......@@ -44,7 +44,7 @@ define(function (require) {
}
});
// Show label of those region not has legendSymbol( which is offset 0)
// Show label of those region not has legendSymbol(which is offset 0)
var data = mapSeries.getData();
data.each(function (idx) {
var name = data.getName(idx);
......
......@@ -58,18 +58,11 @@ define(function(require) {
},
lineStyle: {
normal: {
width: 2,
opacity: 0.7,
type: 'solid',
shadowColor: 'rgba(0,0,0,0)', //默认透明
shadowBlur: 0,
shadowOffsetX: 0,
shadowOffsetY: 0
width: 1,
opacity: 0.6,
type: 'solid'
}
},
// areaStyle: {
// },
// smooth: false,
// 拐点图形类型
symbol: 'emptyCircle',
......
......@@ -374,7 +374,7 @@ define(function (require) {
function ifIgnoreOnTick(axis, i, interval) {
return axis.scale.type === 'ordinal'
&& (typeof interval === 'function')
&& !interval(i, axis.scale.getItem(i))
&& !interval(i, axis.scale.getLabel(i))
|| i % (interval + 1);
}
......
......@@ -46,7 +46,7 @@ define(function (require) {
function ifIgnoreOnTick(axis, i, interval) {
return axis.scale.type === 'ordinal'
&& (typeof interval === 'function')
&& !interval(i, axis.scale.getItem(i))
&& !interval(i, axis.scale.getLabel(i))
|| i % (interval + 1);
}
......
......@@ -625,6 +625,11 @@ define(function (require) {
var paramsList = zrUtil.map(seriesList, function (series) {
return series.getDataParams(dataIndex);
});
// If only one series
// FIXME
if (paramsList.length === 1) {
paramsList = paramsList[0];
}
tooltipContent.show(rootTooltipModel);
......@@ -730,7 +735,7 @@ define(function (require) {
}
else {
if (typeof formatter === 'string') {
html = formatTpl(formatter, [params]);
html = formatTpl(formatter, params);
}
else if (typeof formatter === 'function') {
var self = this;
......@@ -749,7 +754,7 @@ define(function (require) {
}
};
self._ticket = ticket;
html = formatter([params], ticket, callback);
html = formatter(params, ticket, callback);
}
}
......
......@@ -15,7 +15,7 @@ define(function (require) {
// 坐标轴文字样式,默认取全局样式
nameTextStyle: {},
// 文字与轴线距离
nameGap: 5,
nameGap: 15,
// 坐标轴线
axisLine: {
// 默认显示,属性show控制显示与否
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册