带图片的折线图?
我想显示一个折线图,折线图中的每个点都会引用一个用户。因此,无论谁看图表都知道用户是谁,我希望每个点都有用户的图片和用户的姓名。有谁知道有什么 API 可以让我这样做吗?
我正在查看谷歌折线图(http://code.google.com/apis/chart/interactive/docs/gallery/linechart.html),但无论如何我都看不到将每个数据点表示为图像。
I want to show a line chart, each point in the line chart will refer to a user. So whomever looks at the chart understands who the user is, I'd like each point to have a picture of the user and the user's name. Does anyone know any API that will let me do that?
I was looking at googles line chart (http://code.google.com/apis/chart/interactive/docs/gallery/linechart.html) but I cannot see anyway for me to have each data point represented as an image.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 Java 和 JavaFX,您可以构建一个 StackPane,其中可以放置两个图表(一个在另一个之上),其中后面是 LineChart,前面是 ScatterChart。在这种情况下,这些图表将共享相同的 X 轴和 Y 轴,并且在 ScatterChart 上,您可以使用图片对点进行个性化设置。
看:
如何使用 Javafx 个性化图表样式以及
如何在 StackPane 中生成具有多个图表的应用程序
我希望这对您有所帮助。
Using Java and JavaFX, you can build a StackPane where you can put two charts (one above other), where the back is a LineChart and the front is a ScatterChart. In this case, these charts will share the same X axis and Y axis, and on ScatterChart you can personalize the points with a picture.
Look:
How to personalize a chart style using Javafx and
How to produce an application with more than one chart in a StackPane
I hope this helps you.
折线图同一条线上的不同点代表不同的用户,这似乎违反直觉。
我相信如果有多个变量就意味着会有不止一条线,所以它是如果没有有关您的具体应用的更多信息,很难提出建议。根据当前可用的数据,我建议 amcharts 的列顶部带有图像的图表:
It seems counter intuitive to have different points on the same line of a line graph represent different users.
I believe if there is more than one variable that would mean there would be more than one line, so it is hard to make suggestions without more information about your specific application. With the currently available data I would recommend amcharts's Column chart with images on top: