提交 475fa464 编写于 作者: L lang

Optimize graph edge tooltip

上级 4bcf7380
......@@ -51,13 +51,16 @@ define(function (require) {
);
formatModel.formatTooltip = function (dataIndex) {
var params = this.getDataParams(dataIndex);
var rawDataOpt = params.data;
var html = rawDataOpt.source + ' > ' + rawDataOpt.target;
var edge = data.graph.getEdgeByIndex(dataIndex);
var sourceName = data.getName(edge.node1.dataIndex);
var targetName = data.getName(edge.node2.dataIndex);
var html = sourceName + ' > ' + targetName;
if (params.value) {
html += ':' + params.value;
}
return html;
};
lineDraw.updateData(edgeData, null, null);
edgeData.eachItemGraphicEl(function (el) {
el.traverse(function (child) {
......
......@@ -259,7 +259,7 @@ define(function (require) {
defaultText
)
: '',
textFont: textStyleModel.getFont(),
textFont: textStyleHoverModel.getFont(),
fill: textStyleHoverModel.getTextColor()
};
label.__textAlign = textStyleModel.get('align');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册