【发布时间】:2017-10-05 22:36:35
【问题描述】:
朋友,我对谷歌图表和 pdf 有疑问。我们有系统来创建带有图表的报告。一切正常,只有我们发现的小问题。在使用 wkhtmltopdf 转换为 pdf 后的 Google 图表 hAxis 文本不会旋转。但在 HTML 上是。我尝试延迟 wkhtmltopdf,允许慢速脚本等。但没有任何效果。
这是 HTML
这是PDF格式
我正在查看 SO 和其他页面,但没有找到任何解决方案。 我还能做些什么来解决这个问题?如果可以解决的话。
编辑:
var options = {
hAxis:{
ticks:[<xsl:for-each select="//a:CommercialDelphiHistory/b:CompanyHistory/b:ScoreHistory">
new Date(<xsl:value-of select="./b:ScoreHistoryDate/c:CCYY" />, <xsl:value-of select="./b:ScoreHistoryDate/c:MM"/>),
</xsl:for-each>],
girdlines:{color:'#000000',count:0},
minorGirdlines:{color:'#000000',count:0},
slantedTextAngle: 90,
},
legend: {position: 'bottom', textStyle:{}},
colors: ['#1310ce', '#6a09a3'],
pointSize: 10,
series:{
0: {pointShape: { type: 'square', rotation: 45}},
1: {pointShape: { type: 'triangle', sides: 4 } },
},
title: 'Credit limit and Credit Rating',
height: 625,
width: 475,
chartArea:{left: 75, top:35, width:'75%', height: 375},
};
【问题讨论】:
-
您能分享一下绘制图表时使用的选项吗?在这两种情况下它们是相同的选项吗?
-
已添加。这是使用 wkhtmltopdf 从 html 创建的 pdf
标签: pdf google-visualization wkhtmltopdf