Garry Posted November 14, 2007 Report Share Posted November 14, 2007 I am trying to chart data from an Oracle Database using the Oracle Connection String in Visual Studio 2003. However, when I attempt to chart the data from the filled dataset, it plots the dataset properties rather than the actual data in the table. Here is my code; it's less than professional but it should serve its purpose Imports System.Data.OleDbImports SoftwareFX.ChartFX.LitePublic Class Form1 Inherits System.Windows.Forms.Form Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Change the connection string to be sure that is pointing to the right please. 'Users should change at design time too. Chart1.SerLegBox = True Me.oracleConnection1.ConnectionString = "User Id=xxx.xxxx;Data Source=xxxx-xxxx-ORACLE;Password=xxx;Persist Security Info=true;" Me.OracleDataAdapter2.Fill(Me.MvwVolume6Month51) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click With Chart1 'Notice that DataType needs to be set bebore filling the dataset or before binding .DataType(0) = DataType.Value .DataType(1) = DataType.Value .DataSource = Me.MvwVolume6Month51.MvwVolume6Month.ASSIGNED_GROUPColumn .DataSource = Me.MvwVolume6Month51.MvwVolume6Month.N_TICKETSColumn .Gallery = Gallery.Bar 'It requires: Imports SoftwareFX.ChartFX.Lite With .AxisX .Gridlines = True End With End With End Sub End Class Thanks! Quote Link to comment Share on other sites More sharing options...
Frank Posted November 14, 2007 Report Share Posted November 14, 2007 I don't understand this code: .DataSource = Me.MvwVolume6Month51.MvwVolume6Month.ASSIGNED_GROUPColumn .DataSource = Me.MvwVolume6Month51.MvwVolume6Month.N_TICKETSColumn It should be: .DataSource = Me.MvwVolume6Month51 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.