Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Mschart Disable Moving Plot-area


hi,
is there a way to configure the mschart control,
so that the size and position of the plot-section within the chart cannot be changed interactively, but without disabling the series-selection-possibilities.

i need this, because whenever i don't precisiously pick a series-data-point the whole plot-section moves around.

hope anyone knows a solution
andi




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Using MSCHART To Plot Xy-data
Hi guys,

I'm a freshman programmer and I need help to master mschart in plotting xy data. For example, I have a data of density with temperature and I need to plot them together. I appreciate your help.

Mschart Plot 2 Different Array
hi,please help i want to plot 2 data point with different array.

this is the current code:

Code:
Rss.Open " Select sum(sampleno/5)as subgroup,avg(data)as avgdata , time,date from spcdata where date between '" & Format$(startdate, "yyyy-mm-dd") & "' and '" & Format$(enddate, "yyyy-mm-dd") & "' and partno ='" & partno & "'and dimension = '" & dimension & "' and machineno ='" & machineno & "' group by date,time", Con, adOpenKeyset

rs1.Open "SELECT PartNo, Dimension,Nominal, UCL, LCL From PartList WHERE PartNo = '" & partno & "' AND Dimension = '" & dimension & "' ", Con, adOpenKeyset

rs2.Open " Select sum(sampleno/5)as subgroup,avg(data)as avgdata ,avg(sevenpoint)as seven, time,date from spcdata where date between '" & Format$(startdate, "yyyy-mm-dd") & "' and '" & Format$(enddate, "yyyy-mm-dd") & "' and partno ='" & partno & "'and dimension = '" & dimension & "' and machineno ='" & machineno & "'and sevenpoint <>-99999 group by date,time", Con, adOpenKeyset


If Rss.RecordCount = 0 Then ' If no Record in Database, then Show an Error Msg and Exit the Sub
' MsgBox "No Data to Show on Chart!!!", vbCritical, "MSChart Demo": Exit Sub
Else
ReDim ArrayChart(1 To Rss.RecordCount, 1 To 5) ' Array
'Puuting Records from Database to Array
For X = 1 To Rss.RecordCount
ArrayChart(X, 1) = Rss!avgdata
ArrayChart(X, 2) = rs1!ucl
ArrayChart(X, 3) = rs1!lcl
ArrayChart(X, 4) = (rs1!lcl + rs1!ucl) / 2
ArrayChart(X, 5) = rs2!seven
Rss.MoveNext
Next X


rss.avgdata data plot is work fine.now i want to plot another data point is rs2!seven.both are return many recordset data.now the problem i face is when i try to plot rs2!seven it become a line the data cannot be plotted.
please help.

MSChart - Log-Log Plot Problem
I am experiencing VB6.0 crash when I try to develop facility for displaying Log-Log plots using MSChart. The code lines at which the VB crashes is:

MSChart1.Plot.Axis(VtChAxisIdY).AxisScale.Type=VtChScaleTypeLogarithmic
MSChart1.Plot.Axis(VtchAxisIdY).AxisScale.LogBase=10

MSChart1.Plot.Axis(VtChAxisIdX).AxisScale.Type=VtChScaleTypeLogarithmic
MSChart1.Plot.Axis(VtchAxisIdX).AxisScale.LogBase=10

The crash occurs on some computers but not others.

Appreciate any help I can get on this!!

Mschart: Plot On Hoz Not Vert ?
let say I want to show somethings .. I am going to stack my series
and they will all look like so

XXXX
XXXX
oooo
oooo
TTTT
TTTT

how can I make it move to the horizonal axis instead of the
vertical one....

like this

TTOOXX

I'm sure its easy.. this chart control just confuses me...

{Help]How Can I Plot This Equation With Mschart?
if I have this polynomial equation ;
y = ax^2+bx+c
How can I plot this equation with ms chart?
Thanx for any help, maybe some code..
regards
Andiga

Color Of MSChart Plot
I want to use a simple Bar Line chart and set the colour of the columns but I can not seem to get to this. I basically only want one column of data plotted and to be able to change the colour of the bar from the default Red to what ever at run time.

The background colour is settable via
Chart.Backdrop.Fill.Brush.FillColor.Red = xxx

but I can't seem to find the plot colour (even trying the plot values)

Thanks

DS

MSCHART 3 Axis Plot With Log Scale
Hello Everyone,
I want to use MSCHART to plot a familly of curves. I want to have a plot with 3 axis (X, Y1, Y2). With the X in logarithm scale. I have been able to do a logarithm plot with 2 axis but with axis i dont how the hell to do it. I also want to use a XY Scatter instead of line option.
Can some help me or give a link to an helpful tutorial ?
Any help will be appreciated and awarded,
thank you

MSChart To Plot Text File?
Hello,

I've written an application which generates a text file consisting of integers, each integer on a new line. I'd like to plot these values on line graph.

I've tried MSChart I can't see where I am asked to define the file storing the values to plot.

Am I "barking up the wrong tree", the text file is of various length and the values are 0 to 32767.

Any help, suggestions or advice much appreciated.

best regards

john

Plot Sine Wave On MSChart
Does anybody know how to plot a sine wave from mschart

I have tried several ways, none of them work

here is sample

Private Sub cmdPlot_Click()
    Dim x(100) As Double
    Dim i As Integer
    
    For i = 0 To 99
        x(i) = Sin(0.1 * i)
    Next i
    
    With MSChart1
        .chartType = VtChChartType2dLine
        For i = 0 To 99
            .Data = x(i)
        Next i
    End With
End Sub

Make MSCHART Plot From Origin
Zero starts from a distance for the x-axis from the y-axis.How to make it plot (0,0)?
Even if i say x = 0 ;y = 0 ..it does not plot from the orgin


Code:

Private Sub Command1_Click()
Dim arrData(1 To 4, 1 To 4)
Dim j As Integer
Dim i As Integer
Dim area As Double
j = 1
For i = 1 To 3
arrData(i, 1) = MSFlexGrid1.TextMatrix(j, 0)
j = j + 1

Next
For i = 1 To 4
arrData(i, 2) = MSFlexGrid1.TextMatrix(i, 1)
Next

For i = 1 To 4
arrData(i, 3) = MSFlexGrid1.TextMatrix(i, 2)
Next
MSChart1.ChartData = arrData
End Sub



Code:

Private Sub Command2_Click()
Dim i, j As Integer
Dim k As Double
MSFlexGrid1.Cols = 3
MSFlexGrid1.TextMatrix(0, 0) = "Number of vehicles"
MSFlexGrid1.TextMatrix(0, 1) = "Time"
MSFlexGrid1.Rows = 1

For j = 0 To 3
MSFlexGrid1.AddItem "H" & j
Next
k = 0
For i = 1 To 4
MSFlexGrid1.TextMatrix(i, 1) = k
k = k + 100
Next i
k = 0
For i = 1 To 4
MSFlexGrid1.TextMatrix(i, 2) = k
k = k + 50
Next i

MSFlexGrid1.Refresh

MSChart And Series Plot Order Problem
Hi, I have a made up an xy chart in VB6 that plots 2 sets of data as SeriesCollection(1) and SeriesCollection(2). Now SeriesCollection(2) plots over the top of 1, and I would like to change the plot order so that it is reversed. In VB for Excel the command is

ActiveChart.ChartGroups(1).SeriesCollection(2).PlotOrder = 1

however this doesn't work in VB6, I get error 438, "Object doesn't support this property or method" by just setting .SeriesCollection(2).PlotOrder = 1. In the documentation for MSChart, it talks about using the .SeriesPosition.Order property, but I cannot work out how to implement it. Can anyone please help?

(And yes, I know, I could just plot the two curves in the reverse order, but that requires more stuffing around as sometimes I only need to show one curve).

Andrew

Can't Plot Logarithmic Scale Mschart X Axis
Does anyone know how to show the logarithmic scale on the x axis on MSchart? I can get it to work easily with the "Y" axis but not the "X" axis. I have several hundred data points (elapsed time) that I want to plot on the x axis ranging from .1 minutes to 2000 minutes. I'm plotting a flow rate value from 0 to 300 over the elapsed time.

How To Plot Chart VS Date From Access (using MSChart Or Anything)
I have an access table with two column name columnA and columnB. I want to plot columnA VS columnB. For this I use MSChart. It works fine normally but if column B contains date, then the curve shows nothing!! I attach my code now


Code:
Private Sub Form_Load()
Dim con As ADODB.Connection
Set con = New ADODB.Connection
Dim dbfullpath As String
dbfullpath = "maintb.mdb"
con = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & dbfullpath & ";Persist Security Info=False"
con.Open
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Dim strSQL As String
strSQL = "SELECT * FROM aa"
rs.CursorLocation = adUseClient
rs.Open strSQL, con, adOpenDynamic, adLockOptimistic
MSChart1.chartType = VtChChartType2dXY
Set MSChart1.DataSource = rs
rs.Close
Set rs = Nothing
con.Close
Set con = Nothing
End Sub

Accuracy Problems From An XY Scatter Plot In MSChart
I am trying to plot a graph in MSChart whosee range is around -1 to +1. Whenever my data has a Y value close to 0, the data loses accuracy. I was hoping someone could help me with this. Please reply if you can help or if you are just as confised as I am. Thank you

Trying To Plot Two Different Graph Types Using A MSChart Control
I am using the MSChart Control to plot some data but I would like to plot two different graphs
together on the same chart. For example, use a Bar Type (series1) with a Line Type (series2). Is this possible with
MSChart? Any comments would be appreciated.

Thanks,

Price1

How To Pick Specific Records To Plot From .mdb Using MSCHART
Hi!
I have database in .mdb file..i m successfully develop code for ploting the data from 1st row of record to last record..but now i don know if i have to plot some middle records from database...some specific records ..then how this can be done...guide me if anyone has an idea...how i can put a criteria for plotting ...i m using MSCHART controll...
thanx in advance..
bye

Smooth XY Scatter Plot On MSChart Or Cubic Spline Fit
Hi All,

I want to replace the use of MSExcel for plotting curves with MSChart to make my packages independent. Now I am stuck to the problem of making the XY plots smooth. I mean I dont want a point-to-point straight line joining sort of curve which comes in MSChart, instead, I want something that comes with chart type constant "xlXYScatterSmooth" if done with MSExcel. Anybody has any solution?

On a second thought, I am also ready to plot a cubic spline fit of the points, if no readymade property is available. Does anybody have an algorithm for that?

How To Specify Series Options(to Plot On 2nd Yaxis) Dynamically In MSChart
hi,

I need to plot the first colum of data in the 2nd y axis and remainig columns in y axis and these are Stacked except the colum plotted in 2nd yaxis

While dynamically cresting columns , how to specify this ?

MSChart: How To Retrieve Data Values From Mouse Over/click On Xy Plot?
I hope someone out there can help me. I've been reading Microsoft's miserable excuse for online help all night and am getting very frustrated.

There seems to be no way to extract plotted values from the chart. I am not using the MS datagrid for this, just filling the chart from an ordinary 2-D array.

I want to display x and y values in a label as I move the mouse over different parts of the scatter plot (or if that won't work, at least have the x-y data displayed when the user selects a data point). Anyone know if this is possible? It seems it certainly should be.

I would be greatly appreciative for any insights from anyone. Also, are there any good resources to learn about MSchart in gory detail? I've looked at dozens of books and searched the web and never found a good, complete source.

Thank you.

Draw On A MSChart Area
Hi All,

I would like to know if there is a way to use drawing methods on a MSChart as you do for example on a form.

Thanks,

Juan Carlos

How To Change The Area For Moving The Mouse
Hey,

I'd like to change the Area for moving the mouse.
For Example: The Mouse may be moved from Pixels 100(xpos) and 100(ypos) until Pixels 400(xpos) and 400(ypos).

How can I do that?

Alexander Holtkamp

Moving From Painted Title Area On Form
hello, I made a painted on area on my form..
and i would like to know how to "SET" how many pixels to how many pixels of the area i can make it so you can click and DRAG..

then..
if you CAN is there a way to put it into a module, then have it so you can put some code into the form's MOUSEDOWN event, and it'll trigger the code in the module

I want to use the module cuz it would be better than coping all the code to each form (about 40 forms) plus it'd save spacei guess..

How To Disable Right Click At Flash Area?
hi there,

how to disable right click or to show custom menu when at flash area is rigth mouse button click?

any solution?

Disable Local Area Connection
can anybody point me in the right direction of some code or an api that i could use to disable/enable a local area connection part of a small home network.

thank you
casey.

Disable Right Mouse Button In Certain Area
Hi!
I need to disable the right mousebutton on a given area.
I've seen all this stuff for textboxes and web browser controls.
But what i need is something that can disable the right mouse button on every control. Even if it has no window handler.
I've researched a lot but just could not figure out how that
could work.

Thank you for your help!

(And no, I don't want to hide the cursor or trap it, i just want to disable that button...)

Disable Local Area Connection
Hi~~
It's Important 4 me..plz help me..if i can't solve this problem they kill me

.I want to disable and enable Local Area Connection...


tANK U 4 hELPING...

Using MSchart, Can I Plot Values On Y-axis And Y2-axis, Using Diff. Scale???
I have a line chart which displays 4 values( Calls Answered, Offered, Abandoned and SLA %)

I have the "first 3" on the Y-axis and I need for "SLA%" to be on the Y-2 Axis

SLA% can only be as high as 100, but the others can go to 1000 or so. I would like it to show for example if Calls Answered peaked at 800.......then the corresponding position on the Y-2 axis to be at the 100 mark.

Y = 800 while y2 = 100

How can I get SLA% to plot to the Y-2 Axis???

My Data is input from an array.

Here is my code.

Code:TxtSkillset.Text = SkillSetSelect

        Dim SkillSet As String
        SkillSet = TxtSkillset.Text

        OleDAchart1.SelectCommand.Parameters(0).Value = SkillSet
        OleDAchart1.Fill(DSchart11)

        Dim Count As Integer
        Count = DSchart11.Tables(0).Rows.Count

        'TextBox1.Text = Count

        Dim Array1(Count, 4) As Object

        Array1(0, 0) = "Interval"
        Array1(0, 1) = "Calls Answered"
        Array1(0, 2) = "Calls Offered"
        Array1(0, 3) = "Calls Abandoned"
        Array1(0, 4) = "SLA %"

        Dim i As Integer
        Dim g As Integer

        For i = 0 To 4
            For g = 1 To Count
                If i = 0 Then
                    Array1(g, i) = TimeValue(DataGrid1.Item(g - 1, i))
                Else
                    Array1(g, i) = DataGrid1.Item(g - 1, i)
                End If
            Next
        Next
        'SET DATA SOURCE FOR CHART****************
        ChtSales.ChartData = Array1


        'Add a title and legend.
        With Me.ChtSales
            '.Title.Text = "Sales"
            .Title.Text = TxtSkillset.Text
            .Title.VtFont.Size = 16
            .Legend.Location.LocationType = _
               MSChart20Lib.VtChLocationType.VtChLocationTypeBottom
            .Legend.Location.Visible = True
        End With

        'Add titles to the axes.
        With Me.ChtSales.Plot
            .Axis(MSChart20Lib.VtChAxisId.VtChAxisIdX).AxisTitle.Text = "TIME"
            .Axis(MSChart20Lib.VtChAxisId.VtChAxisIdY).AxisTitle.Text = "Number of Calls"
            .Axis(MSChart20Lib.VtChAxisId.VtChAxisIdY2).AxisTitle.Text = "SLA %"
        End With

        'Set custom colors for the bars.
        With Me.ChtSales.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)
            'Purple for Company C
            .SeriesCollection(3).DataPoints(-1).Brush.FillColor.Set(200, 50, 0)
            'Purple for Company D
            .SeriesCollection(4).DataPoints(-1).Brush.FillColor.Set(100, 50, 200)
        End With

Julez

MSChart - Moving The Mouse Over A 2D Line
MSChart - 2D line gragh question

You can move a mouse over the top of one of the 2D lines in an MSChart and a little box appears (like a tool tip) and it displays the name of that 2D line.
I have seen it work in another VB program but I have no idea of the code, could somebody help me please?

Thanks

Stop User Moving The Chart Around In MsChart
VB6 SP6

I am using MsChart. I need to allow selections but when this is set to True users can click on the chart and move the plot area around the unplotted area.

Anybody know a way to avoid this

Thanks

How To Disable Runtime Resizing Of Title, Legends Of Mschart
hi all,
Iam using msChart control. The problem is during runtime the chart title and the Legends can be resized, which really distorts/change the chart size. How can i disable the chart title and legend from being resize during runtime.

Please help.

Disable Moving Of Image In Listview???
I use ListView in Microsoft Windows Common Controls 6.0 (SP6). I can add image to fill background but when i scroll-down, the image is moved!

I want image not to move. How i have to do?

pls help!

Thanks

MSChart (Run-Time Error 13) When Trying To Create Object Of MSChart
Hello everyboy,

I am having some problems when trying to create an instance of an mschart object. I am writing a dll that should make up an chart from a recordset, but i have no interface to define mschart on to, so need to do it by my self. When i try something like this i get the runtime error 13.

Dim crt As MSChart20Lib.MSChart
Set crt = CreateObject("MSChart20Lib.MSChart")


If i try something like this:

Dim crt As MSChart
Set crt = CreateObject("MSChart")

i get the runtime-error 429, can't create activeX.

Is it possible to initialize mschart without putting it in a form, but initiating it directly from a module or a class, because my dll doesn't support any forms. I just wan to save a JPG picture of the chart i populated, so don't need to present the chart.

Thanks for any help,
Haris

Code For Moving To The First Blank Cell In A Worksheet; Moving Left,right,up Or Down
I have created an application form as a userform in Excel. I need to send the data entered into my text boxes when the program runs to separate excel cells in a worksheet.

My problem is I can use code that will send the textbox entry to a specific cell eg. If my textbox is named Surname I can say

range("a5").value = surname but if I do that when I run the programme to enter the next record for someone else the first record will be overwritten.

I NEED A CODE LINE THAT WILL TAKE ME TO THE FIRST EMPTY CELL AND ALLOW ME TO MOVE DOWN OR TO THE LEFT OR TO THE RIGHT

3D Plot
Does anyone has any idea of how to draw 3 dimensional plot using VB?

How To Plot Graphs
Dear all,

I would like to know how to plot graphs, I currently have a graph template in jpeg,

And upon a certain imput,

I want to plot the graph, say, from a point to another.
Attached is the graph for your reference.


Please assist.


Many thanks!


Abel

Plot On The Second Y Axis
i have this working code to plot in a xy chart from a database

i would like do know how can i use the 'second y axis' do plot another xy chart in the same figure

thanks all



Private Sub cmdGraph_Click()

Dim MyConn As ADODB.Connection
Dim MyRecSet As ADODB.Recordset
Dim x As Integer
Dim A As Double
Dim b As Double
Dim c As Double
Dim i As Integer
Dim Graph(1 To 25, 1 To 5) As Single


Set MyConn = New ADODB.Connection
MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "mydata.mdb;"""
MyConn.Open

i = 1

Set MyRecSet = MyConn.Execute("SELECT * FROM Tabela_Variáveis_PT")

Do Until MyRecSet.EOF

A = MyRecSet.Fields.Item("Consumo").Value
b = MyRecSet.Fields.Item("Horas").Value
c = MyRecSet.Fields.Item("Produção_Hidrica").Value



MSChart1.chartType = VtChChartType2dXY
MSChart1.Plot.UniformAxis = False

If i < 26 Then
Graph(i, 1) = b ' value for X-axis
Graph(i, 2) = A ' value for Y-axis


End If


MSChart1.ChartData = Graph

i = i + 1

MyRecSet.MoveNext
Loop

MyConn.Close
End Sub

How To Plot 2D Graphs In VB 6.0?
hi there,

i am going to plot a 2 dimensional graph using visual basic 6.0. The values of y variable are calculated from a formula that relates to the values of x variable. I want to plot axies, ticks, gridlines, titles, legends and more. For axies, I want to plot arrow signs at one end of both axies. Also for data lines, I hope to create smooth curves such as contour lines.

I tried MS CHART, but could not fulfill it.


Is there anybody who can give me your valuable advice and codes?

Thanks in advance.

yli6666

Plot Graph
Hi all,

I am new in visual basic, so i have some problems in my project...
I need to plot (x and y axis) graph using the values from database in access,i know it can be done using the MSChart, but i still cant configure out how to use it.And i want the crosspoint on the graph plotted can be highlighted when mouse over it or the crosspoint can highlight when i type some search text in the textbox and click the command button(the highlight point is the result of search),can vb do that? Can i have some examples as reference?

Any help is greatly appreciated.

Plot A Graph
Sorry everyone, I know there are loads of threads with this question but none suite my needs.

I really need some code to start me off in the right direction. I am pretty rubbish at VB so be patiant.


I have a list box containing between 1 and 4000 values in the range of 0 to 16777216. (24-bits).

I want to plot these values in the same order as they appear in the list box.

Any thoughts would be extremely helpfull. If I missed a good previous thread then shout it out folks.

Cheers
Ben

Plot Date In VB
How to plot data range between -1.2 to +1.2 in VB?

thanks

How To Plot A 2-D Graph
if i have 2 array list
one of the list store the time(x)
another one store the weight(y)
then how to use this 2 array to plot a x-y graph using VB6?

thx

Plot Graph
i need to get data from file "data.txt" and then plot two graph.one graph using the first column and value after 174=XXX, another graph using second column and value 174=XXX. Since my data is very big, so i hv two text box to let user select what data needed to plot in graph.

For example: if value textbox1=3.8566300, textbox2=100.81888000
i need to get data from (3.8566300 -0.0001) to (3.8566300+0.0001)
From (100.81888-0.0001) to (100.81888+0.0001)
and then plot the graph.

Format in "data.txt"
3.85663000 100.81888000 174=0
3.85625000 100.81778000 174=0
3.85519000 100.80883000 174=0
3.85425000 100.80501000 174=0
3.85252000 100.80040000 174=0
3.84993000 100.79627000 174=0
3.84648000 100.79283000 174=0
3.83853000 100.78786000 174=0
3.83705000 100.78591000 174=0
3.83669000 100.78409000 174=0
3.83646000 100.77324000 174=0

Plot GPS Points
Has anyone managed to sucessfully plot GPS points using VB? If they have i would love to see how they did it, or give me some hints as to how they have done it.

Any help with this would be greatly appreciated.

How To Plot The Graph??
Hi,

1)I want to retrieve the amount and date monthwise from Sale.

2)I also want to retrieve the Recieved and Date monthwise from PartyAcc.

Then I want to plot a graph from the retrieved data to analyse how frequently a particular client is making the payments.


Can somebody help please?? I am able to retrieve the records as I want but I want help in plotting the graph.I have sent my code as attachment.

VB Scatter Plot
Does anyone know of a chart program for VB that does scatter plotting in 3D????

Plot A Cirlce
Hi,

I'm trying to plot a circle on a form.

I know that I could use the circle method, but I want to do it pixel by pixel, and to be able to control the spead in which it is drawn.

I thought I'd use PSet, but I'm not sure on where to start.

I'd like to get some help/direction on being able to do it, from just knowing a centre point on the form.

If anyone could advise me it would be gratefully appreciated.

Regards

Plot On The Screen
Does anyone have an idea where to find a component that plots data graphically on the screen?? Preferably free

HOW TO PLOT A GRAPH BY VB????
Hi! i would like to know does VB able to plot a graph? For example, if i log some data in excel and from excel, plot the graph automatically by using vb coding? Or any idea of graph plotting by VB? Thanks for help!!!!!

Best Regards, Jesse

Plot Graphs
Hi,
My VB program should read data from a datafile and plot graphs based on the data in the datafile by clicking a button?? can anyone help me out in figuring how to do it.

I have tried embedding excel and working in excel, but I need something like on clicking a button it should plot the graphs..

any help is greatly appreciated
thanks
p1

Copyright © 2005-08 www.BigResource.com, All rights reserved