Tag: c3

C3图表 – 工具提示可点击的内容

我正在使用c3.js制作图表。 我必须使工具提示的内容可以删除。 到目前为止,仅当我将鼠标hover在图表上时,工具提示才可见。 当我点击工具提示中的链接时,我会显示一些信息。 我找不到c3文档的任何帮助。 我正在处理的代码片段如下所示。 $scope.timelineConfig.tooltip.contents = function (data, defaultTitleFormat, defaultValueFormat, color) { var $$ = this, config = $$.config, titleFormat = config.tooltip_format_title || defaultTitleFormat, nameFormat = config.tooltip_format_name || function (name) { return name; }, valueFormat = config.tooltip_format_value || defaultValueFormat, text, i, title, value; text = “”; title = dates[data[0].index]; text += “Date”; text […]