简单的图形报表

一 新建WebPanel,将GoogleChart用户控件拖到Webpanel的Tab:WebForm上

二 点击Tab:Events,添加如下代码:

//Sample code for GoogleCharts
Sub 'LoadGoogleChartData'
&GoogleChartData.Categories.Add("2005")
&GoogleChartData.Categories.Add("2006")
&GoogleChartData.Categories.Add("2007")
&GoogleChartData.Categories.Add("2008")

&GoogleChartSeries = new()
&GoogleChartSeries.Name = "Sales"
&GoogleChartSeries.Values.Add(3045)
&GoogleChartSeries.Values.Add(4246)
&GoogleChartSeries.Values.Add(6537)
&GoogleChartSeries.Values.Add(2537)
&GoogleChartData.Series.Add(&GoogleChartSeries)

&GoogleChartSeries = new()
&GoogleChartSeries.Name = "Expenses"
&GoogleChartSeries.Values.Add(2045)
&GoogleChartSeries.Values.Add(3246)
&GoogleChartSeries.Values.Add(4537)
&GoogleChartSeries.Values.Add(5537)
&GoogleChartData.Series.Add(&GoogleChartSeries)
EndSub


Event Start
do 'LoadGoogleChartData'
EndEvent

 

三 编译,运行

posted on 2011-12-30 17:23  xinyuexiaodi  阅读(293)  评论(0编辑  收藏  举报