2008年7月28日星期一

如何使用openflashchartV2 dot net library 中的asp.net 控件。

在工具栏上右键,选择项,添加openflashchart.dll,

工具栏上会多出控件openflashchartcontrol


然后就是按照正常的控件使用。

控件中内置了swfobject2.0和相应的open-flash-chart.swf.
所以程序中不在需要这两个文件,不过依然提供了两个属性,方便用户添加外来文件。
为以后使用新版本的swf和swfobject做预留。

12 条评论:

匿名 说...

您好~我照您的方法做,結果跳出"並沒有可以置於工具箱的元件",一直無法順利安裝元件。

匿名 说...

确定是新的版本吗,;)
http://openflashchart.svn.sourceforge.net/viewvc/openflashchart/version-2/dot-net-library/

匿名 说...

你好,用了上面的連接的版本就可以安裝了,謝謝!!

另一個問題,在繪製直線(Line)時,有辦法做到平滑化(smooth)嗎?非常謝謝你。

匿名 说...

此外,ToolTip功能要如何使用呢?試了半天,試不出來,謝謝!

匿名 说...

关于直线smooth,不大理解原始意思?
这个dll是对openflashchart的一个封装。
openflashchart中好像没有smooth的属性。

Tooltip,因为原作者新修改了方式,改为了对每个值都可以单独设置tooltip样式。

现在实现的对tooltip样式添加,只能整体的设置。

如下,
chart.Tooltip = new ToolTip("my tip #val#");

可以参考,在你下载的例子中Tooltip.aspx

匿名 说...

新看了下,应该是tooltip的设置失效了。

匿名 说...

Hi, first of all, I will thank for your efforts and sharing this great .net control over the internet.

I just visit the OFC official web site, it says the right Y Axis is supported. We are able to attach a set of data (a line, area or bar chart) to the right Y axis). How do I make it in version-2 ?

Thanks in advance for your help.

匿名 说...

you can acheive that with the following lines;

chart.Y_Axis_Right = new YAxis();
chart.Y_Axis_Right.TickLength=5;
chart.Y_Axis_Right.Stroke = 10;
chart.Y_Axis_Right.Steps = 4;

匿名 说...

The right Y axis can be shown but the property "Y_Axis_Right.Steps" seems doesn't work.

If I have 2 lines in a chart and set
Y_Axis.SetRange(0,100);
Y_Axis_Right.SetRange(10,20);

What should I do if I want to use Y asix for line 1 and right Y axis for line 2 ? (The scale of line 2 is totally different from line 1.)

Another question, where to set the legend for right Y axis ?

匿名 说...

"Y_Axis_Right.Steps" does not work
,it was a bug in the open chart flash .
the .net library generate the file,then the flash parse the file.it took the 1 for the default steps value.

now the library does not have any method to attach the right axis to a specified chart type.


it seems that only the chart have the legend .

匿名 说...

After some testing and modification based on your code, I found there are many bugs and functions missed in this version of open-flash-chart.swf. Such as right Y axis & legend, X label...

Anyway, thanks for your help. I have learned a lot from your code.

匿名 说...

这个我在DW里面直接插入用了,很好。我想知道怎么才能将其和ACCESS数据库中的数据绑定?