Coldfusion Fusionchart未在cfdocument上呈现
我在我的项目中使用FusionChart,并希望使用Coldfusion Fusionchart未在cfdocument上呈现,coldfusion,fusioncharts,Coldfusion,Fusioncharts,我在我的项目中使用FusionChart,并希望使用cfdocument中的图表创建PDF。图表在我的ColdFusion页面中正确加载,但不在cfdocument生成的PDF中 FusionCharts.ready(function () { var myChart = new FusionCharts({ "id" : "id", "type": "column", "width": "#chartwidth
cfdocument
中的图表创建PDF。图表在我的ColdFusion页面中正确加载,但不在cfdocument生成的PDF中
FusionCharts.ready(function () {
var myChart = new FusionCharts({
"id" : "id",
"type": "column",
"width": "#chartwidth#",
"height": "#chartheight#",
"dataFormat": "xml",
"dataSource": "#strXML#"
});
myChart.render("chartContainer");
});
图表功能在
cfdocument
中不起作用。因此,在cfdocument
之外制作图表,并将图表转换为图像。然后像下面一样在cfdocument
中显示图像,并调用cfdocument
中的图像路径
<cfchart format="png" scalefrom="0" scaleto="1200000" name="chartimage">
<cfchartseries type="bar" dataLabelStyle="value"
serieslabel="chart" seriescolor="blue">
<cfchartdata item="January" value="503100">
<cfchartdata item="February" value="720310">
<cfchartdata item="March" value="688700">
<cfchartdata item="April" value="986500">
<cfchartdata item="May" value="1063911">
<cfchartdata item="June" value="1125123">
</cfchartseries>
</cfchart>
<cffile action="write"
file="#ExpandPath('charts/imageName.jpg')#"
output="#chartimage#" />
如何嵌入图表?通过HTTPS?否,添加了问题代码供将来参考,原因是图表使用javascript。cfdocument不支持javascript。如何将融合图转换为图像它在cfimage中不起作用,并且cffile Write可能对您有帮助。是的,我参考了此链接,wkhtmltoimage/wkhtmltopd工作正常。谢谢