【发布时间】:2019-12-11 15:29:55
【问题描述】:
【问题讨论】:
-
我认为核心库不支持这种自定义,但您可以发送邮件至 support@fusioncharts.com,他们可以为您提供自定义解决方案。
【问题讨论】:
通过使用引导弹出窗口、jQuery 和 FusionCharts 事件设法解决了这个问题:
"events": {
"drawComplete": function (eventObj) {
let lineDataset = eventObj.sender.args.dataSource.dataset.filter(function (dataset){return dataset.renderAs === 'line' && dataset.data.length > 0})[0];
let dataPlots = lineDataset.data.filter(function (obj) { return obj.anchorRadius != "0" });
var targetImages = $('g[class$="-line"] g[class$="-plot-group"]:last-child').prev().find("image:visible");//Linechart visible Anchors
//Built-in FusionCharts tooltip cannot be styled properly and anchored so we have to use bootstrap popover
targetImages.each(
function (index, image) {
$(image).popover({
content: dataPlots[index].tooltext,
placement: 'right',
trigger: 'hover'
})
}
);
}
}
【讨论】: