浮点堆积条
所以我使用 flot 得到了上面的 flot 堆叠条。现在我还有一个悬停效果,当主栏内的任何栏上方时,它会显示该部分的编号。我想显示的是它们相对于当前条形图而不是数字的部分的百分比,但是我在任何地方都看不到如何获得条形图的总数(即寻找周围的数字) 4200以此为基础吧)。
So I have the above flot stacked bar using flot. Right now I also have a hover effect where when over any bar within that the main bar, it shows the number for that part. What I want to show is the percentage for part that they are over in reference to the current bar instead of the number however I don't see anywhere how I can get to total of the bar (ie, looking for the number that is around 4200 based on this bar).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了获得总数,您需要查看数据并找到系列中与单击的项目相对应的元素,然后将它们的值相加。
In order to get the total you will need to look at the data and find the elements in the series that correspond to the clicked item, then sum their values.