使用 PHP 的堆积条形图
我想使用 PHP 基于文本文件中的数据创建堆积条形图...(文件名必须位于 x 轴...n 基于文件内读取的数据,y 轴堆积条形图必须是填充)
如果您可以向我提供代码片段并建议用于此特定“动态堆叠条形图”创建的最佳库,那将非常有帮助。
多谢
I would like to create a stacked bar chart based on data from a text file USING PHP ... ( The file name must be on the x axis ... n based on the data read inside the file, y axis stack bars must be populated )
If you could provide me with code snippets and suggest the best libraries to use for this specific "dynamic stacked bar graph " creation, it'd be really helpful .
Thanks a lot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的数据是什么格式?
我用过,就像 pChart (该网站有很好的例子)。有一个新版本,但我还没有使用它。他们可以制作堆叠条形图
Fusion 图表有免费和付费版本。付费版本有堆叠条形图(不确定免费版本)并且他们有他们网站上的示例。
两者都可以动态生成图表。这实际上取决于您的需求。
如果不必是 PHP,也可以使用 javascript 选项从文件中读取数据。
What format is your data in?
I've used, and like pChart (The site has good examples). There is a new version out but I have yet to use that. They can do stacked bar charts
Fusion charts has both a free and paid version. The paid version has stacked bar charts (Not sure about the free) and they have examples on their site.
Both can be dynamic in generating graphs. It really depends on your needs.
If it does not HAVE to be PHP there are javascript options that can read data from a file as well.
这是一个广泛的问题,谷歌搜索似乎在这里可能有用。
话虽如此,我还是会看一下 Highcharts。它是一个基于输入数据绘制图表的 JavaScript 库,可以使用 PHP 轻松生成图表。
我目前将它与 Ruby on Rails 应用程序一起使用,并且效果非常好。
This is kind of a broad question, and it seems like some Googling might be useful here.
That being said, I'd take a look at Highcharts. It's a JavaScript library that draws graphs based on input data, which can easily be generated using PHP.
I currently use it with a Ruby on Rails app, and it works really well.