473,473 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

MSChart graphs unexisting point

1 New Member
Hellow:

I have the following VB6 code to get a scatter chart with MSChart:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2. Form1.Show
  3. ' POINTS
  4. Dim Graph(1 To 41, 1 To 2) As Single
  5.  
  6.             Graph(1, 1) = -9   ' value for X-axis
  7.             Graph(2, 1) = -5
  8.             Graph(3, 1) = 9
  9.             Graph(4, 1) = 9
  10.             Graph(5, 1) = 18
  11.             Graph(6, 1) = 9
  12.             Graph(7, 1) = 9
  13.             Graph(8, 1) = 0
  14.             Graph(9, 1) = 0
  15.             Graph(10, 1) = -18
  16.             Graph(11, 1) = -9
  17.             Graph(12, 1) = -9
  18.  
  19.             Graph(1, 2) = -15   ' value for X-axis
  20.             Graph(2, 2) = -11
  21.             Graph(3, 2) = -14
  22.             Graph(4, 2) = -6
  23.             Graph(5, 2) = -3
  24.             Graph(6, 2) = 0
  25.             Graph(7, 2) = 8
  26.             Graph(8, 2) = 12
  27.             Graph(9, 2) = 4
  28.             Graph(10, 2) = -4
  29.             Graph(11, 2) = -7
  30.             Graph(12, 2) = -15
  31.  
  32.  ' GRAPH
  33.          MSChart1.chartType = VtChChartType2dXY  ' set to X Y Scatter chart
  34.          MSChart1 = Graph
  35.  
  36.    ' DATA POINTS SHOW
  37.     With MSChart1
  38.       .Plot.Axis(VtChAxisIdX).Labels(1).VtFont.Size = 8
  39.       End With
  40.  
  41.     'PLOT AREA COLOR
  42.        With MSChart1.Plot
  43.       ' Set style to solid.
  44.       .Wall.Brush.Style = VtBrushStyleSolid
  45.       ' Set color .
  46.       .Wall.Brush.FillColor.Set 221, 217, 195
  47.  
  48.     'DATA POINTS SHOW & COLOR AND SERIE COLOR
  49.         With .SeriesCollection
  50.         With .Item(1).DataPoints(-1)
  51.          .DataPointLabel.LocationType = VtChLabelLocationTypeAbovePoint
  52.          .DataPointLabel.VtFont.VtColor.Set 0, 0, 0 '# black
  53.          .Brush.FillColor.Set 165, 0, 33
  54.         End With
  55.         End With '#seriescoll
  56.        End With
  57.  
  58.       With MSChart1.Plot.Backdrop
  59.      ' Property to VtFillStyleBrush.
  60.       .Fill.Style = VtFillStyleBrush
  61.       .Fill.Brush.FillColor.Set 197, 190, 151
  62.       ' Border.
  63.       .Frame.Style = VtFrameStyleThickInner
  64.       ' Set shadow.
  65.       .Shadow.Style = VtShadowStyleDrop
  66.     End With
  67.  
  68. End Sub
The problem: the chart plots a line from an unxisting Graph (0,0) point to the one my example begins with, Graph (1,1=-9;Graph(1,2)=-15).

Unsuccessfully, I have been trying to get rid off that.

I thank any help I could get.

Nelson
Nov 21 '12 #1
1 2521
Killer42
8,435 Recognized Expert Expert
Sorry I'm not familiar with the MSchart control (dabbled briefly but it was years ago), but I was wondering... could it simply require your array to begin at 0 rather than 1?
Nov 30 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

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: Martin Mrazek | last post by:
Hi, I use FSO ActiveXObject to save file from IE. In JS like function saveToFile(pathN, content){ var fso, ts; var ForWrite = 2; fso = new ActiveXObject("Scripting.FileSystemObject"); ts =...
2
by: Steven Nagy | last post by:
Hi all, Is there a more interactive .NET component that does what the MSChart does? Perhaps someone has developed something similar that is available or for sale. My requirement is for a...
0
by: Falquian | last post by:
Hello to all I have a problem that not like solving. I am creating an application of analysis that shows graphs. These graphs are Microsoft ActiveX objects, concretely the Microsoft Chart. When...
1
by: Suresh Bansal | last post by:
Hi all using MSCHART object in VB.NET requires to register at client node for plotting graphs in VB 2005. Using Drawing namespace of Framework 2.0 provides rich functionality for plotting but...
0
by: Tim Marshall | last post by:
I tried to post this to microsoft.public.excel.programming yesterday via Google, got a copy sent to me, but it's nowhere to be found on that newsgroup. My normal ISP doesn't carry the Microsoft...
1
by: wai1985 | last post by:
I have a line graph created using MSChart on VB6. However, I want to be able to move a point on the graph to another point, and then a message box displays. Nobody seems to know how to do this. ...
1
by: peterchance | last post by:
Hi I am using VB 6 with MSCHART. I have no problem plotting my graphs but cannot change the Axis Scale on the fly. I can change it from the Property Page in design mode by turning off automatic...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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,...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.