Google Table(或类似的)如何包含迷你图和其他每行图形? [英] How does one include sparklines and other per-row graphics in a Google Table (or similar)?

查看:411
本文介绍了Google Table(或类似的)如何包含迷你图和其他每行图形?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张广泛使用Google图表功能的表格 Table Chart ,特别是按选定的列和颜色渐变进行排序。



我想添加一个sparkline列。任何人都可以提出这样做​​的方法吗? Google Sparkline 看起来完全不可见。

我唯一想到的方法是创建一组图像并将它们设置为CSS背景,一个单元格一次。 Blecch。



我也需要在一列中显示每行饼图或堆积条 - 显示整个部分的总比例,其中三个到五个部分。在这里,Google图表工具也没有集成到Table AFAICT中。

答案表明一个不包含Google表的不同的库是很好的 - 只要努力水平不会太高,并且类似的水平文档是可用的。

解决方案

我同意Larry K关于记住要求存储/访问代表点的数字集在你的迷你线上。

关于将其插入表格,请考虑图像折线图api 。一旦拥有相关的数字集合,您就可以轻松生成迷你图像,并且可以将图像url嵌入到表格单元格中,通过指定 allowHtml 选项来渲染它在表格图中。



因此,只需制作一个包含< img src ='google.com?params = 2& whatever = 3的单元格'/> 应该有所斩获。


I have a table that makes extensive use of the features in Google Charts' Table Chart, notably, sorting by selected column and color gradients.

I'd like to add a sparkline column. Can anyone suggest methods for doing so? Google Sparkline doesn't appear to be at all integrable.

The only method I've come up with (I haven't tried it) is to create a set of images and set them as the CSS background, one cell at a time. Blecch.

I also have a need to show something like a pie chart or stacked bar per row in a column - something that shows gross proportions of the parts of a whole, with three to five parts. Here also, the Google chart tools don't integrate into Table, AFAICT.

Answers that suggest a different library that doesn't include Google table are fine - as long as the level of effort isn't too much higher, and a similar level of documentation is available.

解决方案

I agree with Larry K regarding remembering the requirement to store/access the set of numbers that represent the points on your sparkline.

In terms of inserting it to the table, consider the image line charts api. You can easily generate sparkline images once you have the relevant set of numbers for them, and can embed the image url into a table cell, allowing it to render by specifying the allowHtml option in the table chart.

So, just making a cell with <img src='google.com?params=2&whatever=3' /> should do the trick.

这篇关于Google Table(或类似的)如何包含迷你图和其他每行图形?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆