如何通过windowsform应用程序中的图表显示数据库数据? [英] how do i show database data via a chart in windowsform application?

查看:86
本文介绍了如何通过windowsform应用程序中的图表显示数据库数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi

我有一个数据库,其中包含一个表格,每列包含100个数字。

I have a database with a table which included to column and each column has got 100 numbers.

我会喜欢将这些数据显示到图形图表中,例如工具箱中的图表组件。

I would like to show these data to a graphical chart such as chart component in toolbox.

你可以给我一个简单的代码吗?

can you get me a simple code to do it?

非常感谢

推荐答案

你可以像我现在使用的那样使用

You can use as what i am using currently

Char1.Series(0).Points .DataBindXY(dsList.Tables(" Data")。DefaultView," XValue",dsList.Tables(" Data")。DefaultView," YValue")

Char1.Series(0).Points.DataBindXY(dsList.Tables("Data").DefaultView, "XValue", dsList.Tables("Data").DefaultView, "YValue")

Chart1。 Series(0)(" DrawingStyle")=" Cylinder"

Chart1.Series(0)("DrawingStyle") = "Cylinder"

Chart1.Titles(0).Text =" Testing Chart"

Chart1.Titles(0).Text = "Testing Chart"

Chart1.Series(0)(" PixelPointWidth")=" 50"

Chart1.Series(0)("PixelPointWidth") = "50"

XValue& YValue是数据集的列。

Where XValue & YValue Are the column of dataset.


这篇关于如何通过windowsform应用程序中的图表显示数据库数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆