简体   繁体   English

折线图%p的折线图stackpercent工具提示不起作用

[英]Flot chart stackpercent tooltip with line chart %p not working

So I'm using flot charts and the stackpercent plugin which says to provide support for the flot tooltip plugin. 因此,我使用的是flot图表和stackpercent插件,它们表示为flot工具提示插件提供支持。 Now I am using the plugin with a line chart instead of a bar chart. 现在,我将插件与折线图而不是条形图一起使用。 This seems to still work with the plugin, but for some reason the flot tooltip doesn't display the %p properly. 这似乎仍然可以与插件一起使用,但是由于某种原因,flot工具提示无法正确显示%p。 It just shows the text '%p' rather than the percentage. 它仅显示文本“%p”而不是百分比。 Any ideas? 有任何想法吗?

Update: I thought it might have to do with the fact that I was using a line chart and not a bar chart like the examples for the plugin, but they aren't appearing for the bar chart either... 更新:我认为这可能与以下事实有关:我使用的是折线图,而不是插件示例的条形图,但条形图也没有出现...

The current tooltip plugin only supports percent with pie charts. 当前的工具提示插件仅支持百分比饼图。 The jquery.flot.stackpercent.js plugin stores the percents internally a little different since it needs to work with multiple series. jquery.flot.stackpercent.js插件在内部存储百分比,因为它需要处理多个序列。

Fear not, though, I forked the tooltip plugin and added support here . 不过,请不要担心,我分叉了工具提示插件并在此处添加了支持。

Here's a demo fiddle . 这是一个演示小提琴

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM