Python Reportlab 多线图下的区域
因此,我利用 Reportlab 启动了一个网络项目。该网站需要生成嵌入图表的 PDF。到目前为止,我对 Reportlab 的功能非常满意(我已经制作了一堆饼图和条形图),但是它的文档有点缺乏。
我浏览了整个互联网,但无法找到使用图表下区域的reportlab 的示例。
有人使用 reportlab 实现了上述结果吗?对于实现上述图表,您有什么建议?
编辑:从谷歌图表 API 查看此图表,这基本上就是我想要做的:
https://chart.googleapis.com/chart
?cht=lc
&chd=e:....,cefhjkqwrlgYcfgc,QSSVXXdkfZUMRTUQ,HJJMOOUbVPKDHKLH,AAAA
&chco=000000
&chls=1,1,0|1,1,0|1,1,0|1,4,0
&chs=200x125
&chxt=x,y
&chxl=0:|Sep|Oct|Nov|Dec|1:||50|100
&chg=25,25
&chm=b,76A4FB,0,1,0|b,224499,1,2,0|b,FF0000,2,3,0|b,80C65A,3,4,0
So I have started a project for the web utilizing Reportlab. The website needs to generate PDFs that have embedded charts. So far I've been extremely happy with Reportlab's capabilities (i've done a bunch of pie and bar charts), however its documentation is kinda lacking.
I have looked all over the internet, and have been unable to find an example using reportlab of an Area under the graph chart.
Has anyone achieved the above result using reportlab? What are your suggestions for achieving the above chart?
Edit: Check out this chart from google chart API, it is basically what I would like to do:
https://chart.googleapis.com/chart
?cht=lc
&chd=e:....,cefhjkqwrlgYcfgc,QSSVXXdkfZUMRTUQ,HJJMOOUbVPKDHKLH,AAAA
&chco=000000
&chls=1,1,0|1,1,0|1,1,0|1,4,0
&chs=200x125
&chxt=x,y
&chxl=0:|Sep|Oct|Nov|Dec|1:||50|100
&chg=25,25
&chm=b,76A4FB,0,1,0|b,224499,1,2,0|b,FF0000,2,3,0|b,80C65A,3,4,0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 http://www.reportlab.com/chartgallery/ 下建立了一个画廊集合为例。我认为您需要的是该行下的 inFills 属性,请查看 http://www. reportlab.com/chartsgallery/financial/AreaChart01/ 为例(另请阅读那里的描述)。您可以浏览右侧的属性以查看它们的值。
您还可以下载 Diagra 的试用版来构建图表,然后在准备部署到生产时将其转换为使用开源版本。
I have built a collection of galleries under http://www.reportlab.com/chartgallery/ to serve as examples. I think what you need is the inFills property under the line, look at http://www.reportlab.com/chartsgallery/financial/AreaChart01/ for an example (also read the description there). You could browse the properties on the right to see their values.
You could also download a trial version of Diagra to build your charts and then convert them to use the open source version when ready to deploy to production.