防止迷你图工具提示隐藏
Keep Sparkline Tooltips from Hiding
创建迷你折线图。
http://jsfiddle.net/gwatts/PfzXg/
// Draw a sparkline for the #sparkline element
$('.sparkline').sparkline(values, {
type: "line",
tooltipSuffix: " widgets"
});
jFiddle 示例不是最好的,但我认为它说明了这一点。
默认行为是在鼠标悬停在值上时显示工具提示。将鼠标悬停在该点上时会出现“5 个小部件”工具提示。
是否可以一直显示工具提示?
我想制作一个更大的图表并具有静态数据标签(工具提示),但我在文档中没有看到任何提及。
https://omnipotent.net/jquery.sparkline/#s-docs
this 问题的答案可能是对您问题的回应。
这里是答案:
http://omnipotent.net/jquery.sparkline/#s-faq
Frequently Asked Questions
Why are there no axis labels/markers?
Sparklines are intended to be small enough to fit alongside a line of text, to give a quick impression of a trend or pattern and thus don't have the paraphernalia of full sized charts. As of version 2.0 you can mouse over the sparklines to see the underlying data.
有必要在你的项目中使用 Sparkline 库吗?如果你想要一个大图表和标签,你还有其他选择,比如 http://www.chartjs.org/samples/latest/。
创建迷你折线图。 http://jsfiddle.net/gwatts/PfzXg/
// Draw a sparkline for the #sparkline element
$('.sparkline').sparkline(values, {
type: "line",
tooltipSuffix: " widgets"
});
jFiddle 示例不是最好的,但我认为它说明了这一点。 默认行为是在鼠标悬停在值上时显示工具提示。将鼠标悬停在该点上时会出现“5 个小部件”工具提示。
是否可以一直显示工具提示? 我想制作一个更大的图表并具有静态数据标签(工具提示),但我在文档中没有看到任何提及。 https://omnipotent.net/jquery.sparkline/#s-docs
this 问题的答案可能是对您问题的回应。
这里是答案:
http://omnipotent.net/jquery.sparkline/#s-faq
Frequently Asked Questions
Why are there no axis labels/markers?
Sparklines are intended to be small enough to fit alongside a line of text, to give a quick impression of a trend or pattern and thus don't have the paraphernalia of full sized charts. As of version 2.0 you can mouse over the sparklines to see the underlying data.
有必要在你的项目中使用 Sparkline 库吗?如果你想要一个大图表和标签,你还有其他选择,比如 http://www.chartjs.org/samples/latest/。