
Index
From: Pep
Subject: Re: Chart not drawing in first creation
Date: Tue, 22 Mar 2005 16:51:54 +0100
Newsgroup: public.teechart4.activex
Hola,
prueba de utilizar el Environment.InternalRepaint
(Thisform.Olecontrol1.Environment.InternalRepaint) , situandolo justo antes
de que tengas que mover las anotaciones.
Saludos !
Josep Lluis Jorge
http://support.steema.com
"Newsgroups" wrote in message
news:AyFVjIZSEHA.1752@TEEPC.Steema.local...
> English:
> I am using Teechart ActiveX 6 on Visual FoxPro 6 and I have the following
> problem:
> When I send the values, draws de Chart, but don't the Annotations, just
> one of them, if I send again the data, the graph paints with the
> annotations, but leaves one blank
>
> Code (supresed code that not is not significant...):
> ** Query data
> This.Qry_Rep()
> ** OleControl1 = TChart
> Thisform.OleControl1.Header.Text(0) = Alltrim(ThisForm.Accombo1.Value) + "
> / " + Alltrim(Thisform.TxtControl1.Value)
> ThisForm.Olecontrol1.Series(0).Clear && Bar Serie
> ThisForm.Olecontrol1.Series(1).Clear && Line serie....
> ThisForm.Olecontrol1.AutoRepaint = .F. && I Try to avoid repainting to
> see if that helps
>
> nLabel = 0 && Labels counter
> nAnotacion = 1 && Annotations counter
> This.LockScreen = .T. && Avoid drawin automatically VFP screen
> Scan
> cTitle = "-T.Lote proc = " + Alltrim(Str(Q.PR_LOTE,10,2)) + Chr(13) +
> "-T.Lote trans = " + Alltrim(Str(Q.PR_LOTETRANS, 10,2)) + Chr(13) +
> "-T.Real/Pza = " + Alltrim(Str(nMins,10,2))
>
> ThisForm.Olecontrol1.Series(0).Add( nMins, cTitle, Rgb(255,0,0))
> ThisForm.Olecontrol1.Series(1).Add( Thisform.TOperStd, "",
> Rgb(255,255,0))
> Thisform.Olecontrol1.Axis.Bottom.Labels.Add( nLabel, Dtoc(Q.PR_FECHA))
> nLAbel = nLabel + 1
> **** Poner los nombres de los empleados
> EndScan
> nWidth = Thisform.Olecontrol1.Series(0).asBar.BarWidth / 2
> nCol = 0
> Scan
> Thisform.Olecontrol1.Tools.Add(10)
> XVal = Thisform.Olecontrol1.Series(0).CalcXPos(nCol) + nWidth
> YVal = Thisform.Olecontrol1.Series(0).CalcYPos(nCol)
>
> Thisform.Olecontrol1.Tools.Items(nAnotacion).asAnnotation.Shape.Font.Size
> = 6
> Thisform.Olecontrol1.Tools.Items(nAnotacion).asAnnotation.Text =
> Cad2Vertical(Q.PE_NOMBRE)
> Thisform.Olecontrol1.Tools.Items(nAnotacion).asAnnotation.Shape.Left =
> XVal
> Thisform.Olecontrol1.Tools.Items(nAnotacion).asAnnotation.Shape.Top =
> YVal
> nAnotacion = nAnotacion + 1
> nCol = nCol + 1
>
> EndScan
>
> This.LockScreen = .F.
>
> ThisForm.Olecontrol1.AutoRepaint = .T.
> ThisForm.Olecontrol1.Repaint
> ---------------------------------------------
> This is the code, but I have to run twice to get the Annotations correct
> and puts all, and leaves one on the Top/Left corner empty...
>
>
> ESPAÑOL:
> Estoy usando Teechar Activex 6 en Visual Foxpro , pero tengo el siguiente
> problema:
> cuando mando los valores, se dibuja la gráfica, pero no las anotaciones
> solo una de ellas, si mando los datos de nuevo, la grafica se dibuja con
> las anotaciones, pero deja una en blanco.
> Ese es el codigo que uso, pero tengo que ejecutar 2 veces el codigo para
> tener correctas las Anotaciones, pero deja una en blanco en la esquina
> superior izquierda
>
> Thanks in Advance....
>
> Mauricio Flores Olmos
>
>