MSChart Control
I want to display the datagrid(ie data pertaining to chart) along with the chart. I want to display the datagrid appended to the chart at the bottom in a form. And if possible allow the user to change the data so that the same will be reflected in the chart at runtime.How to do this ?Any early reply will be helpful.ThanksAnand
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
MSChart Control
Hi Experts,
Really I am struggling with MSChart Control; I have 4 Series in my chart with 12 columns, 3 series are indicating different years of sales figures like 2004, 2005, 2006 and 4th one is indicating forecast figures for 2007. The default value of 4th one will be zeros. I need to adjust the 4th series value using by mouse (Click the datapoint and drag somewhere the column area).
Please help me
Thanks & Regards
Shakeeb
MSChart Control
Using the MSChart control (Suggest another if there is one, please)....
I need the grid lines GONE.
I need a target bar going across the chart (Showing a particular value)
I need to be able to adjust the total height value (Maximum Number)
eg... User wants to show values ranging from 0 to 10 with a target bar at 6 (for instance)
or
User wants to show values ranging from 0 to 50, with a target bar at 20
If i set safe limits (0 - 100) and the values are too low, there will be little visual diferentation between the bars.
(etc...etc...)
Is this possible with the default Chart Control, or is there a custom one that has this functionality?
Thanks,
Dave
Mschart Control
hello ppl
i m using mschart control for making graphs in vb.
now i m having setting as
row count 1 and coloumn count as number of bar i wanna to see in graph
now i wanna some property which will allow me to change bar color at runtime
i.e. i will give user a common diloge control to select color and then i will use tht color for tht graph
can anyone tell me solution
how i will do tht
its urgent
plsssssss reply soon
thanx
MSChart Control
Is it possible to use XML file to MSChart control Datasource?
How? Examples?
-jari
USing MSChart Control
Hi! Can someone provide me with an example (i.e.code) on how to plot a simple line /bar chart? Also, i would like to know if VB can import data on a file to automatically plot out the graph?
Thanks!!!
MsChart Control Help
I need to be able to zoom in and out on a line graph created using mschart control 6. Is there an easy way?
Any suggestions welcome
cheers
Ben
MSChart Control
Does anybody have any examples of how i can use the MSChart control to produce output like the attached image?
MSChart Control
How do I show exact values on each column of a Chart? I searched for all the properties but cudnt find one..Help Me plz
MSChart Control
Hi,
I want to draw a line graph and a bar graph on the same MSChart control. Is this possible?
Has anyone got any good sites detailing how to use this control?
Cheers
Simon
MSChart Control 6.0
Good Afternoon
If I have a form containing an MSChart control the what do I have to distribute with my application to make it work on target machines?
Cheers
MSChart Control
Hi
I’m using the MSChart control and now have a chart to match my needs apart from one detail. I need to be able to individually colour the bars on my chart depending on the column values.
I know that the following code will change the bar colours but this only works for all bars.
MSChart1.Plot.SeriesCollection(1).DataPoints(-1).Brush.FillColor.Red = 0
MSChart1.Plot.SeriesCollection(1).DataPoints(-1).Brush.FillColor.Green = 255
MSChart1.Plot.SeriesCollection(1).DataPoints(-1).Brush.FillColor.Blue = 0
I want to be able to say if the value is > 0 and < 30 then the colours are green, if the value is > 30 and < 60 then the colour of the bar is amber else the colour is red. The problem is that the chart data gets built up in an array and then displayed in one go rather than each bar getting displayed in a loop. Is there any way to get around this?
Thanks
Andrew
Here’s my display chart code at present:
Code:
Private Sub DisplayGraph()
On Error GoTo err_log
Dim lngCount As Long
Dim arrData() 'holds the data for the chart
Dim a As Long
Dim b As Long
Dim sSQL As String
'open tblGraph as recordset for graph loop
Dim DEInstance2 As AllDataDesigner
Set DEInstance2 = New AllDataDesigner
DEInstance2.Commands("cmdGraph").Parameters(0).Value = BusUnit
DEInstance2.Commands("cmdGraph").Parameters(1).Value = StartDate
DEInstance2.Commands("cmdGraph").Parameters(2).Value = EndDate
rs.Open DEInstance2.Commands("cmdGraph").Execute 'run a new instance of the command
rs.MoveFirst
If rs.RecordCount = 0 Then
Err.Raise 3021 'go to error handler for handling an instance of no records
End If
If Not rs.EOF Then
lngCount = rs.RecordCount
If lngCount > 12 Then 'only allow 12 months on graph at one time
lngCount = 12
End If
ReDim arrData(lngCount - 1, 1)
With MSChart1 'setup chart dynamics
.ShowLegend = False
If BusUnit = "ALL" Then
.Title = "Repairs Workshop - Average Turnaround Per Month For All"
ElseIf BusUnit = "" Then
.Title = "Repairs Workshop - Average Turnaround Per Month For Unassigned" & BusUnit
Else
.Title = "Repairs Workshop - Average Turnaround Per Month For " & BusUnit
End If
.FootnoteText = "Print date: " & Now()
.ChartType = VtChChartType2dBar 'set to 2d bar chart to start with
End With
For a = 0 To 1 'fill the array by looping through the recordset, a corresponds to cols
rs.MoveFirst 'go to start of recordset
For b = 0 To lngCount - 1 'b corresponds to rows
arrData(b, a) = rs(a) 'Debug.Print "Array: " & arrData(b, a) & " = " & rs(a)
rs.MoveNext
Next b
Next a
rs.MoveFirst
While Not rs.EOF
TotRev = rs.Fields(0) & ": " & rs.Fields(1).Value & " Days"
If Not rs.Fields(1).Value = 0 Then 'ignore 0 value figures (they appear as
'there may be no revenue associated but there is a sales cost)
lstData.AddItem TotRev
End If
rs.MoveNext
Wend
MSChart1.ChartData = arrData 'set chart data to array
With MSChart1.Plot 'add titles to the axes
.Axis(MSChart20Lib.VtChAxisId.VtChAxisIdX).AxisTitle.Text = "Month"
.Axis(MSChart20Lib.VtChAxisId.VtChAxisIdY).AxisTitle.Text = "Time Taken (Days)"
End With
With MSChart1.Plot.SeriesCollection(1) 'print figures on top of columns
With .DataPoints.Item(-1).DataPointLabel
.Component = VtChLabelComponentValue
.LocationType = VtChLabelLocationTypeAbovePoint
.VtFont.Size = 8
End With
End With
End If
rs.Close 'close the recordset object and destroy the instance
Set rs = Nothing
Exit Sub
err_log:
If Err.Number = 3021 Then
MsgBox "No data to report on!", vbInformation, "Error"
Unload Me
Exit Sub
ElseIf Err.Number = 91 Or Err.Number = 0 Or Err.Number = 20 Or Err.Number = 3265 Then
Resume Next
Else
MsgBox Err.Number & " " & Err.Description, vbInformation, "Error"
Resume Next
'Exit Sub
End If
End Sub
MSChart Control
ive the following code to create a simple line chart using chart control object. below i difine an array and assign the value to the chart control. in every series i set the 6th point to blank to have a break in every series. like in excel when u have a missing data value the the series has a break...
Private Sub Command1_Click()
Dim tArr(10, 1 To 3)
MSChart1.chartType = VtChChartType2dLine
MSChart1.ColumnCount = 4
MSChart1.RowCount = 5
For i = 1 To 3
For j = 0 To 10
tArr(j, i) = i * j
tArr(6, i) = ""
Next j
Next i
MSChart1.ChartData = tArr
end sub
this works fine for me and i get the intented result.
now i try to use the .Data property of MSChart control and set the data value of a point to an empty value and it doesnt break the line. instead the series moves down to 0. i tried with t = "" or what so ever.
Private Sub Command2_Click()
Dim t
MSChart1.Column = 3
MSChart1.Row = 9
MSChart1.Data = t
End Sub
any suggestions greatly apreciated. im stuck. i want the user to input the value for a specific point and update the graph. so i need to use the .Data property of mschart. thanks
Mschart Control
Private Sub Command1_Click()
MSChart1.ColumnCount = 5
MSChart1.RowCount = 10
MSChart1.chartType = VtChChartType2dLine
For i = 1 To 5
MSChart1.Column = i
For j = 1 To 10
MSChart1.Row = j
MSChart1.Data = j + i
Next j
Next i
End Sub
the above code creates a chart with 5 line series. i like to know if it is possible to have a break in the line series. for instance if the value of 'j' is 5 and 6 then i want to beark the series and start from 7 again. i mean to have a gap in the chart series for that values.
something like......
For j = 1 To 10
if j = 5 or j = 6 then
else
MSChart1.Row = j
MSChart1.Data = j + i
endif
Next j
but this code doesnt break the series. any suggestions welcome.
Need Help With MSChart Control
I have a MSChart control wich shows four categories show as 2DBars or 2DLine.
The categories shown in red,blue,green,yellow bars.
what i want to do is by clicking a command button for example, to hide one of the bars, the blue for example without losing its data so i can return it later by clicking on another command button.
I only succeeded in hiding them in Design time (Not useful), but not in Run time.
How can i do it.
I have it described in images and can send it by email to anyone willing to help.
I want to thank for anyone who can assist me int this or tried.
I have attached a zip file wich contains a form wich has images in it describing what i want to do.
I hope it will help you understand what I want to do.
MSChart Control
Please, I have a problem wich i cant solve in days now.
I have put this control in my form and loaded it with four
type of numeric data wich shows as a bar on the chart control. all is well at that.
When i want to hide one line out of the four without damaging its content so i can reapear that line later,
it seems there is no way to do it in run time.
Oddly, in design time i can right click the control and choose properties->series->C1/2/3/4...->and check the hide series in the checkbox next to it.
How do i hide a specific line and return it later?
MsChart Control ??
I have a project where I want to show a few fields from my Data Base in a chart. I can creat a chart that will show the Data but I want to be able to change it at Run time by selecting a diffrent option from a DataCombo.
Example.
Code:
Private Const MARGIN_SIZE = 60 'In Twips
Private Const SHAPE_COMMAND = "SHAPE {select eight,da from performance} AS ChildCommand COMPUTE ChildCommand, AVG(ChildCommand.[eight]) AS [eight] BY [da]"
Private Const CONNECT_STRING = "PROVIDER=MSDataShape;Data Source=C:Program FilesDraglog2Datadb1.mdb;Data Provider=Microsoft.Jet.OLEDB.4.0"
Private Const FIELD_X = "da"
Private Const FIELD_Y = "eight"
Private Const FIELD_Z = ""
Private Const VBERR_INVALID_PROCEDURE_CALL = 5
Private Const MARKERS_VISIBLE = -1
Private Const BRACKET_LEFT = "["
Private Const BRACKET_RIGHT = "]"
Private Const SPACE_CHAR = " "
This is what I have that works but what I want to do is make it so it will show eight,da from performance where Datacombo1 = cars.
I have changed the SQL statement like this
Code:
Private Const SHAPE_COMMAND = "SHAPE {select eight,da from performance where '" & DataCombo1.Text & "' = Cars} AS ChildCommand COMPUTE ChildCommand, AVG
But it gives me a error that says DataCombo1.text must be a constant.
Can I make this Work? I have been all over MSDN and the web and can not find anything that helps. Thanks for any and all help.
John
MSChart Control Help Please
Hello
I have a module that consist of Ms Chart show out all five month sales amount. Then I can show out the chart either in 2D bar or Pie chart. The problem is each time eg the first time I show the Pie chart, the amount of % of each slice is shown correctly. Then I change to 2D Bar and it also shows the amount correctly but when I change back to view pie chart, the amount of % of each slice is NOT SHOWN( its gone).
The coding that I used to show the data label is as below
Code:
With MSChart
blnChartType = graphType(0).Value
Select Case blnChartType
Case "True":
.chartType = VtChChartType2dPie ' Pie Chart
.ChartData = arrData
.Visible = True ' Making MSChart visible
For intA = 1 To .Plot.SeriesCollection.Count
With.Plot.SeriesCollection(intA).DataPoints.Item(-1).DataPointLabel
.LocationType = VtChLabelLocationTypeOutside
.Component = VtChLabelComponentPercent
.PercentFormat = "0%"
.VtFont.Size = 10 ' Setting Font Size to 10
End With
Next intA
Case "False":
.chartType = VtChChartType2dBar ' Bar Chart
.ChartData = arrData
.Visible = True ' Making MSChart visible
For intA = 1 To .Plot.SeriesCollection.Count
With.Plot.SeriesCollection(intA).DataPoints.Item(-1).DataPointLabel
.LocationType = VtChLabelLocationTypeAbovePoint
.Component = VtChLabelComponentValue
.VtFont.Size = 10 ' Setting Font Size to 10
End With
Next intA
End Select
End With
Thank you very much in advance
Mschart Control
I am writing a program that uses the piechart object of the mschart control. I would like to have the percentages displayed in the chart itself. Right now, they are displayed in a label under the chart. How would I do that?
MsChart Control
Hi All,
i have the following code that pops a pie chart. The chart itself is fine however I keep getting C1 as the columnlabel above the pie chart. No matter if I set it to blank in the Properties at runtime or do somthing as below. How do I get rid of this annoying value.
Dim arrValues(1 To 2, 1 To 2)
objRs.MoveFirst
Do Until objRs.EOF
If objRs.Fields(1).Value = True Then
arrValues(1, 2) = arrValues(1, 2) + 1 ' 0 + 1 ' Series 1 values.
arrValues(1, 1) = "Pass "
Else
arrValues(2, 2) = arrValues(2, 2) + 1 '2 * i ' Series 2 values.
arrValues(2, 1) = "fail "
End If
objRs.MoveNext
Loop
MSChart1.ColumnLabel = "Pass/Fail Rate"
MSChart1.ChartData = arrValues
MSChart1.Refresh
regards
Bill crawley
MSChart Control
I'm using the mschart control to display a 2d Pie.
Now my problem is that it displays "R1", "R2",... (it depends on how many pies are displayed). i think it's the series title. is there any possibility to change this to any custom string or at least make it invisible ???
thx a lot
MSChart Control
Does anyone know how to make the value for the bar/point/slice show on the chart. In excel you can have the value display, but I can't figure out how to do it in VB. Any help would be appreciated.
Help Me In Using MSChart Control
Hi there,
I'm trying to plot a graph using MSChart Control, however I couldn't get it done.
I would like to initalize the the "x-axis" of the graph, but the following codes just didn't work. I want to display a series of date in the axis, but as you see, the last item is not going to show correctly.
Please tell me what I have done wrongly.
Thanks guys
Option Explicit
Private Const MAX_ROW As Integer = 7
Private Const MAX_COLUMN As Integer = 1
Private Sub Command1_Click()
Dim column As Integer
Dim row As Integer
With MSChart1
.chartType = VtChChartType2dBar
.ColumnCount = MAX_COLUMN
.RowCount = MAX_ROW
For row = 1 To MAX_ROW
.RowLabel = CStr(Format(DateAdd("d", row - MAX_ROW, Now), "dd/mmm"))
.row = row
.Data = row * 10
Next row
End With
End Sub
MSChart Control
Hi, need a little information on how to work with the MSChart control when returning data to it from an Access 2000 dB. I can hit the dB and return the data to the mschart.datasource but at this point, no data is displayed in the control. My columns, however are displayed in the legend.
In addition to this, how do you set the scale on the control? I can see it scale from 0.0 - 1.0....need it to go higher.
If you have a link for somewhere to look or an example of working with this control that would be great. Thanks for the help.
MSCHART Control
I am trying to use the MSChart control (MSCHART20.OCX). I am having problems because it resizes itself and adjusts the scales itself. I want to display it with the same size and scale using scatter chart. How do I do that?
This issue has been resolve, Thanks
++++++++++++++++++++++++++++++++++++++++++++
Answer for setting the scale:
With Form1.MSChart1.Plot.Axis(VtChAxisIdX).ValueScale
.Auto = False
.Minimum = 0
.Maximum = 222
End With
Answer for setting the plotArea size:
MSChart1.Plot.UniformAxis = False
Using The MSChart Control
can anyone pls give me some info or web sites if u can on how to use the MSChart control (tutorial will be cool@)???
thanx very much
MSChart Control
How can I set the first item in each Row (ie there are 7 rows and 1 column - set using the datagrid) to be a different colour?
HELP!!! -- MSChart Control
I am needing information as to whether or not an MSChart Control can be populated with an Access database. The data is numeric, and can be easily put into variables. Any assistance would be greatly apprecieated!
Control Mschart
I Use the MSCHART CONTROL...
how i can modify the color of one or more cols from code?
BEST BON JOVI ITALIAN SITE:
http://www.mso.it/public/bonjovinext100years
MSChart Or Some Other Control?
I've been working with (fighting) MSChart for about two days now. I'm getting close but it is very cumbersome to control.
2 questions:
Is there any way to show a bar on a bar chart where the bar represents (for example miles/hr) and the number printed above the bar is another number (for example kilometers/hr.)
And
Are there any chart controls to download that are more controllable than MSChart? The 'Search' function seems to be down and I can't search for one.
Thanks for any suggestions.
MSChart Control
I am trying to utilise this control on my apps, but there is not much documentation on MSDN.
Is anybody know if this control is worth using ?
Help With MSChart Control
Hi
I have a graph produced from equations in my code and when it is displayed it is in 2 point. The property pages for MSChart are of no help so I was wondering what the code is for making the line 1 point?
Thanks.
MSChart Control
How can I increase the size of the Plot (the graph bar itself) of the MSChart control?
Thanks I need your help ASAP.
Regards,
MSChart Control
Hi
Does anyone know how to title the legend in the MSChart control?
I have tried but I failed
Thanks for your time.
Geoff
MSChart Control
Hi
Does anyone know how to title the legend in the MSChart control?
I have tried but I failed
Thanks for your time.
Geoff
MSChart Control
Hello
I have a module that consist of Ms Chart show out all five month sales amount. Then I can show out the chart either in 2D bar or Pie chart. The problem is each time eg the first time I show the Pie chart, the amount of % of each slice is shown correctly. Then I change to 2D Bar and it also shows the amount correctly but when I change back to view pie chart, the amount of % of each slice is NOT SHOWN. Is there anyway , i can get % of each slice shown even after changing it back to pie chart
The coding that I used to show the data label is as below
Code:
With MSChart
blnChartType = graphType(0).Value
Select Case blnChartType
Case "True":
.chartType = VtChChartType2dPie ' Pie Chart
.ChartData = arrData
.Visible = True ' Making MSChart visible
For intA = 1 To .Plot.SeriesCollection.Count
With.Plot.SeriesCollection(intA).DataPoints.Item(-1).DataPointLabel
.LocationType = VtChLabelLocationTypeOutside
.Component = VtChLabelComponentPercent
.PercentFormat = "0%"
.VtFont.Size = 10 ' Setting Font Size to 10
End With
Next intA
Case "False":
.chartType = VtChChartType2dBar ' Bar Chart
.ChartData = arrData
.Visible = True ' Making MSChart visible
For intA = 1 To .Plot.SeriesCollection.Count
With.Plot.SeriesCollection(intA).DataPoints.Item(-1).DataPointLabel
.LocationType = VtChLabelLocationTypeAbovePoint
.Component = VtChLabelComponentValue
.VtFont.Size = 10 ' Setting Font Size to 10
End With
Next intA
End Select
End With
Thanks very much
MSChart Control
Hi Experts,
Really I am struggling with MSChart Control; I have 4 Series in my chart
with 12 columns, 3 series are indicating different years of sales
figures like 2004, 2005, 2006 and 4th one is indicating forecast figures
for 2007. The default value of 4th one will be zeros. I need to adjust
the 4th series value using by mouse (Click the datapoint and drag
somewhere the column area).
Please help me
Thanks & Regards
Shakeeb
Using Mschart Control-need Help
Hi all,
I am using MSchart control to plot a graph. I need to draw a line over mschart control whose coordinates can be got from the database. I should also use the scale of mschart control. graph plot will be of any kind like pie chart , bar chart etc.,Can you please help me to solve the problem to draw lines over mschart?
Thanks in advance,
dpr
MSChart Control
Hi
I’m using the MSChart control to take two pieces of data from a recordset and populating and array to display them on my chart. The following is from my code. The data displays fine apart from I can’t get the column labels to print. It just generically calls them R1 for row 1, R2 for row 2, etc. I want them to display the actual figures (in this case week numbers.) I’ve tried this command “MSChart1.RowLabel = rs.Fields(0)” and although MSChart1.RowLabel gets populated with the correct data, the graph ignores it when it displays and puts the R1, R2, etc back!
Any ideas?
…
rs.Open DEInstance2.Commands("cmdGraphDataRetrieve").Execute
rs.MoveFirst
If Not rs.EOF Then
lngCount = rs.RecordCount
ReDim arrData(lngCount - 1, 1)
With MSChart1 'setup chart dynamics
.ShowLegend = False
.Title = "Chart”
.FootnoteText = "Print date: " & Now()
.ChartType = VtChChartType2dBar
End With
For a = 0 To 1 'fill the array by looping through the recordset, a corresponds to cols
rs.MoveFirst
For b = 0 To lngCount - 1 'b corresponds to rows
arrData(b, a) = rs(a)
rs.MoveNext
Next b
Next a
MSChart1.ChartData = arrData 'set chart data to array
With MSChart1.Plot 'add titles to the axes
.Axis(MSChart20Lib.VtChAxisId.VtChAxisIdX).AxisTitle.Text = "Week Number"
.Axis(MSChart20Lib.VtChAxisId.VtChAxisIdY).AxisTitle.Text = "Time Taken (Days)"
End With
End If
rs.Close 'close the recordset object and destroy the instance
Set rs = Nothing
Yada yada…
Thanks
Andrew
MSChart Control
I'm attempting to create a chart programmatically in Excel 2002. According to the help files and the object browser I could use:
ActiveWorksheet.Charts.Add
but Intellisense doesn't show the .Add method. Previous versions used .Chart.Add. Any one have any suggestions.
Steve King
Growth follows a healthy professional curiosity
MSChart Control
I can get to grips which most Microsoft controls fairly easily but MSChart? Nothing works like I expect it to. I can get my data into the chart by giving .ChartData an array of data to play with but I can't seem to do anything with the labels or the legend. I can set the first Row or Column label but not subsequent ones. I can't seem to find anything on the net either. Some of the search function is, unfortunately, unavailable here at vbCity at the moment but even other (inferior) VB web sites can't help. Can anyone, briefly, give me some pointers on using the MSChart control without using a datagrid. Please. Thank you.
Remember to use [code=vb][/code] tags around code.
| Posting rules | How to get your questions answered | Wonko's Blog | Twerps Peerage |
vbCity Recent Topics RSS feed
Edited by - wonkotsane on 11/19/2002 12:50:35 AM
URG : Help In MSChart Control In VB6
Hi everyone,
I am using MSChart control in VB 6 to generate a graph. I took 2 arrays whose declaratins are :
Dim arr( 1 to 200) as string
Dim callarr( 1 to 200) as integer
arr () contains usernames , while callarr() contains the calls logged by each user.
I want to generate a graph of CALLS LOGGED vs USERNAME , i.e, username should come on X Axis ( The graph should be something like usernames as labels on X axis ).
However i am facing some problems.
TO generate the chart i used the code :
MSChart1.ChartData = callarr
However i am not getting the desired usernames as labels on X axis.
To generate usernames as X Axis labels i used the code
For k = 1 To j
MSChart1.Row = k
MSChart1.RowLabel = arr(k)
Next k
where j is the total no of records.............HOWEVER it does not work. I am getting the graph but no usernames as labels on X axis.
I would be highly obliged if you people help me out at the earliest.
THANX........
Edited by - nishg on 9/9/2006 1:17:15 AM
MsChart Control To Jpg
Hello,
Is there a way of saving a mschart to a image file like .jpg?
hope someone can help
thanks.
URG : Help In MSChart Control In VB6
Hi everyone,
I am using MSChart control in VB 6 to generate a graph. I took 2 arrays whose declaratins are :
Dim arr( 1 to 200) as string
Dim callarr( 1 to 200) as integer
arr () contains usernames , while callarr() contains the calls logged by each user.
I want to generate a graph of CALLS LOGGED vs USERNAME , i.e, username should come on X Axis ( The graph should be something like usernames as labels on X axis ).
However i am facing some problems.
TO generate the chart i used the code :
MSChart1.ChartData = callarr
However i am not getting the desired usernames as labels on X axis.
To generate usernames as X Axis labels i used the code
For k = 1 To j
MSChart1.Row = k
MSChart1.RowLabel = arr(k)
Next k
where j is the total no of records.............HOWEVER it does not work. I am getting the graph but no usernames as labels on X axis.
I would be highly obliged if you people help me out at the earliest.
THANX........
Mschart Control
hello guys:
i need help in mschartcontrol in vb6. actually i need help abt the plotting of the graph.i can feed values in the graph by declaring a 2D array and then using the chartdata property.
the problem is that the i have declared column count =1 and by right clicking the graph in the property window i have defined the series color RED.but when i plot the graph it plots in green color.
the second thing is that of the scaling of the y axis. i wish that the yaxis should show me the values up to 100. but when the program is executed it dislays the scaling according to the values given in the array.
can any body help me in this regard.
also can any body guide me in plotting real time graphs.
thanks.
MSChart Control
How can I change the distance among grid lines without having to change the scale of the chart ?:
MSChart Control
Hi,
I am facing a problem when I use the MSChart control to display a pie chart. When I pass the two dimensional array to the control As:
MSChart1.ChartData = array
the pie chart which is displayed consists of different circles of different sizes. I want the data to be represented in one circle.
Please see if anyone can help me out on this.
Akshay
MSChart Control
I need a tip form an MSChart expert.
PLEASE tell me if u know how to handle "manual" ( as opposed to automatic) grid lines, or printing out to a printer the chart control's graph.
thanks in advance
Galino jordez,
Brazil
How To Use MSChart Control In VB
Hi,
How do I use MS Chart control from VB6. The cod eI'm using is :
Set rs = db.OpenRecordset("SELECT count(para)as no,year FROM TEMP group by year")
Set rs1 = db.OpenRecordset("select max(axis.no),min(axis.no) from axis")
' MsgBox rs1(0)
If rs1(0) >= 50 Then
With Show_Chart.MSChart1.Plot
.Axis(VtChAxisIdY).ValueScale.Maximum = rs1(0) + 2
.Axis(VtChAxisIdY).ValueScale.MajorDivision = rs1(0) + 2
.Axis(VtChAxisIdY).ValueScale.Minimum = rs1(1) - 2
.Axis(VtChAxisIdY).ValueScale.MinorDivision = 200
End With
Else
If rs1(0) > 0 And rs1(0) < 50 Then
With Show_Chart.MSChart1.Plot
.Axis(VtChAxisIdY).ValueScale.Maximum = rs1(0) + 2
' MsgBox (.Axis(VtChAxisIdY).ValueScale.Maximum)
.Axis(VtChAxisIdY).ValueScale.MajorDivision = rs1(0) + 2
.Axis(VtChAxisIdY).ValueScale.Minimum = 0
' MsgBox (.Axis(VtChAxisIdY).ValueScale.Minimum)
.Axis(VtChAxisIdY).ValueScale.MinorDivision = 1
End With
Else
With Show_Chart.MSChart1.Plot
.Axis(VtChAxisIdY).ValueScale.Maximum = 2
.Axis(VtChAxisIdY).ValueScale.MajorDivision = 2
.Axis(VtChAxisIdY).ValueScale.Minimum = 0
.Axis(VtChAxisIdY).ValueScale.MinorDivision = 1
End With
End If
End If
i = rs.RecordCount
MsgBox i
Show_Chart.MSChart1.RowCount = rs.RecordCount
Do While Not rs.EOF
Show_Chart.MSChart1.Row = i
MsgBox rs(0)
Show_Chart.MSChart1.Data = rs(0)
MsgBox Show_Chart.MSChart1.Data
Show_Chart.MSChart1.RowLabel = rs!Year
i = i + 1
rs.MoveNext
Loop
rs.Close
rs1.Close
Show_Chart.MSChart1.Visible = True
Show_Chart.Caption = "Graph - " & Label2.Caption
Show_Chart.Show
Mschart Control
i have a mschart with columns 1-6, the chart type is XY Scatter. How can I plot a line between points (0,1) and (1,3)? Another question - I understand columns, but what exactly is the row in the chart?
MSchart Control
I'd like to save display of mschart control as a bitmap file. Is it possible? How can I do it? Thanks for your answer.
|