使用open flash chart的BarGlass时遇到的问题
生活随笔
收集整理的這篇文章主要介紹了
使用open flash chart的BarGlass时遇到的问题
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
在使用BarGlass(玻璃柱狀圖)時要注意在chart.AddElement(bar);之后設置chart.Y_Axis屬性若不設置圖表什么都不會顯示。
如下是正確的調(diào)用代碼:
????????????????BarGlass?bar?=?new?BarGlass();????????????????XAxisLabels?xLabels?=?new?XAxisLabels();
????????????????List<string>?xLabelTexts?=?new?List<string>();
????????????????
????????????????List<BarGlassValue>?values?=?new?List<BarGlassValue>();
????????????????for?(int?i?=?0;?i?<?20;?i++)
????????????????{
????????????????????BarGlassValue?bgv?=?new?BarGlassValue(1+random.Next(0,i+5));
????????????????????bgv.Colour?=?"#ff0000";
????????????????????xLabelTexts.Add("第"?+?i?+?"個");
????????????????????values.Add(bgv);
????????????????}
????????????????bar.Values?=?values;
????????????????xLabels.Values?=?xLabelTexts;
????????????????XAxis?xAxis?=?new?XAxis();
????????????????xAxis.Labels?=?xLabels;
????????????????chart.X_Axis?=?xAxis;
????????????????chart.AddElement(bar);
????????????????YAxis?yaxis?=?new?YAxis();
????????????????chart.Y_Axis?=?yaxis;
????????????????chart.Y_Axis.SetRange(0,?24,?3);
????????????????e.Graph?=?chart; 相關(guān)資源: http://teethgrinder.co.uk/open-flash-chart-2/ http://xiao-yifang.blogspot.com/search/label/openflashchart http://monstersgotmy.net/post/OpenFlash-Chart-Fixing-Open-Source.aspx
轉(zhuǎn)載于:https://www.cnblogs.com/yukaizhao/archive/2009/05/06/barglass_problem.html
總結(jié)
以上是生活随笔為你收集整理的使用open flash chart的BarGlass时遇到的问题的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ISA2004 发布内部TCP/IP打印
- 下一篇: C语言程序设计 数组,结构体和指针练习题