fusionchart Instructions

data.xml the following format:

<?xml version="1.0" encoding="GBK">
<chart ...>
	<categories ...><!--此处代码x轴-->
		<category label=""/>
		<category label=""/>
	</categories>
	<dataset seriesname="新品" ...>
		<set value="0"/>
		<set value="0"/>
	</dataset>
	<dataset seriesname="堪品" ...>
		<set value="0"/>
		<set value="0"/>
	</dataset>
	<dataset seriesname="待修品" ...>
		<set value="0"/>
		<set value="0"/>
	</dataset>
	<dataset seriesname="待废品" ...>
		<set value="0"/>
		<set value="0"/>
	</dataset>
<styles>
<definition>
	<style .../>
	<style .../>
</definition>
<application>
	<apply .../>
	<apply .../>
</application>
</styles>
</chart>
Above ... Code attribute is omitted, with reference to the specific property API.

In return java file:

JSONObject jObj = new JSONObject();
Chart chart = new Chart();
String chartHTMLCode = chart.createChartHTML("/web/plug-in/fusioncharts/swf/MSColumn3D.swf","",xml.toString(),"myFirst",width,height,false);
jObj.put("msg",charHTMLCode);
jObj = JSONObject.fromObject(jObj);
response.setHeader("Cache-Control","no-cache");
response.setContentType("text/html; charset=utf-8";
response.getWriter.write(jObj.toString());



Reproduced in: https: //my.oschina.net/u/2552902/blog/543875

Guess you like

Origin blog.csdn.net/weixin_34015860/article/details/92326666