[英]how to create chart in jsf by FusionCharts
I'm trying to create simple fusionchart in jsf. 我正在尝试在jsf中创建简单的Fusionchart。 I have a bean which can get chart JSON by method, but I could not find where should I put that. 我有一个可以通过方法获取图表JSON的bean,但是找不到应该放在哪里。 Could you give me example, JSF2 fusion chart JSON? 您能举个例子,JSF2融合图JSON吗?
Creating Charts using Fusioncharts is just a matter of 10-15 mins. 使用Fusioncharts创建图表仅需10-15分钟。 I have tried it several times. 我已经尝试了几次。 If you want to get a chart in JSON format it is just that you need to keep the dataFormat as JSON . 如果要获取JSON格式的图表,只需将dataFormat保留为JSON即可 。 One of the basic example of rendering is : 渲染的基本示例之一是:
FusionCharts.ready(function() {
var salesAnlysisChart = new FusionCharts({
type: 'candlestick',
renderAt: 'chart-container',
width: '800',
height: '600',
dataFormat: 'json', //here the method JSON is specified
dataSource: { /*Here you can insert the data for your chart*/ }
}).render(); });
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.