473,414 Members | 1,665 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Using MSChart



Hello, I'm trying to plot some data on a 2d line chart using MSChart.
The code below worked fine on a 2d bar chart, but nothing appeared when
using the 2dline chart property. Should I use the DataGrid at all, or
can you bind the chart to a multi-dimension array and still have the
chart updating? I have my readings in an ArrayList collection but never
managed to bind it to the data grid, so I just decided to send the
readings one by one instead.

Cheers.
Originally I had this:

Private Sub Draw_Chart(ByVal Reading)

Dim myObjArray() As Object = {Reading}

ReadingDataGrid.SetDataBinding(myObjArray, "")
ReadingChart.ChartData = myObjArray
'Add a title and legend.
With Me.ReadingChart
.Title.Text = "Reading"
.Legend.Location.LocationType = _
MSChart20Lib.VtChLocationType.VtChLocationTypeBott om
.Legend.Location.Visible = True
End With

'Add titles to the axes.
With Me.ReadingChart.Plot
.Axis(MSChart20Lib.VtChAxisId.VtChAxisIdX).AxisTit le.Text =
"Year"
.Axis(MSChart20Lib.VtChAxisId.VtChAxisIdY).AxisTit le.Text =
"Millions of $"
End With

'Set custom colors for the bars.
With Me.ReadingChart.Plot
'Yellow for Company A
'-1 selects all the datapoints.
.SeriesCollection(1).DataPoints(-1).Brush.FillColor.Set(250,
250, 0)
'Purple for Company B
.SeriesCollection(2).DataPoints(-1).Brush.FillColor.Set(200,
50, 200)
End With
End Sub


--
Jeffrey Spoon

Nov 21 '05 #1
0 2355

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: gu | last post by:
I have a rather stupid problem with the mschart 6 component. It always sips one row in the source it's surposed to display. For example, if a SQL statement that defines the recordset object returns...
0
by: Gerhard Swart | last post by:
Good Morning, I have a licensed .Net product. Meaning I can develop and deploy my projects. I want to use MSChart in my latest project. Now I am not sure about the licensing of MSChart. As far...
1
by: Jaime Lucci | last post by:
Has anybody any documentation about MSChart? Thanks.
1
by: perspolis | last post by:
Hi all I want to print content of a MsChart.. I think I can do that by getting an image from that.. How can I do that?or is there any better way to print MsChart? thanks in advance
2
by: John Blair | last post by:
Hi, In my webform HTML i have the following code, but i cannot view and configure this chart control in the code behind class. In the code behind class i have a reference to this com control...
2
by: andrew | last post by:
I have an application that requires graphical output. I have added a MSChart to the application and want to be able to print this out. I have a form which allows me to print, and zoom in etc for...
0
by: JS | last post by:
Hello I want translate a project from VB6 to VB.Net 1.0 In this project I have a graph with a MsChart COM control. When I want make reference (Projet/Ref /Com controle) to this chart I have an...
0
debasisdas
by: debasisdas | last post by:
Here's a simple VB6 code snippet that uses the MSChart control to display Charts in VB6.0. To use this sample, please following steps Create a new project in VB6 Pull down the Project menu and...
2
by: Just_a_fan | last post by:
I was working with MSChart, modifying one of the graphs and decided I wanted this particular chart to have an auto scale. I worked quite a while with it, uttered a few obscenities directed at the...
0
by: Just_a_fan | last post by:
Some folks have searched, from time to time, for a dual axis MSChart with different scales on the two Y axes. The sample, extracted from running code I wrote, produces a graph with MSChart (VB9)...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.