Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Gráficos
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 24-02-2011
ramonibk ramonibk is offline
Miembro
 
Registrado: may 2004
Posts: 193
Poder: 21
ramonibk Va por buen camino
TChart en tiempo de Ejecucion

Buenas. primero y antetodo soy nuevo en esto de los Tchart y em programacion en jeneral. je,je,je.

la cuestion es que tengo un PageControl en el cul genero unos ttabsheet en tiempo de ejecucion sobre ellos genero un TChart y el problema surge cuando genero las Series en el TChar. la primera lo hace correctamente pero la sugunda vez lo que hace es eliminar el Series del primer TChart y pintar el primero y el segundo sobre el segundo Tchart.

aqui os pongo el codigo.
Código Delphi [-]
Var
 Grafica: tchart;
 Solapa:ttabsheet;
begin
     Solapa:=ttabsheet.Create(self);
     with Solapa do
       begin
        PageControl:=PageControl1;
        Caption := 'Nombre ' + IntToStr(i);
       end;

     Grafica:=tchart.Create(self);
     With  Grafica do
      Begin
       Grafica.Parent:=Solapa;
       Grafica.Name := Solapa.Name;
       Grafica.Left := 128;
       Grafica.Top := 0;
       Grafica.Width := 481;
       Grafica.Height := 333;
       Grafica.BackWall.Brush.Color := clWhite;
       Grafica.LeftWall.Brush.Color := clWhite;
       Grafica.Chart3DPercent := 100;
       Grafica.Legend.Alignment := laLeft;
       Grafica.Legend.ColorWidth := 10;
       Grafica.Legend.TextStyle := ltsPlain;
       Grafica.AddSeries(Series1); 
       Grafica.Series[1].Add(12,'Hola');
      End;
 Inc(i); // I Variable global iniciada a 0
end;

He intentado
Código Delphi [-]
       
   Grafica.AddSeries(Series[i]); 
   Grafica.Series[i].Add(12,'Hola');
Pero me da error "List Index Out of Bounds(0)"
Responder Con Cita
  #2  
Antiguo 25-02-2011
ramonibk ramonibk is offline
Miembro
 
Registrado: may 2004
Posts: 193
Poder: 21
ramonibk Va por buen camino
Conseguido......
Bueno tras estar buscando informacion sobre el tema encontre un manual que espero que os sirva.

Aquí dejo el codigo nas completo.

Código Delphi [-]
Var
 Grafica: tchart;
 Solapa:ttabsheet;
 SerieBarras:TBarSeries; //Aquí esta el Sistema.
begin
     Solapa:=ttabsheet.Create(self);
     with Solapa do
       begin
        PageControl:=PageControl1;
        Caption := 'Nombre ' + IntToStr(i);
       end;

     Grafica:=tchart.Create(self);
     With  Grafica do
      Begin
       Grafica.Parent:=Solapa;
       Grafica.Name := Solapa.Name;
       Grafica.Left := 128;
       Grafica.Top := 0;
       Grafica.Width := 481;
       Grafica.Height := 333;
       Grafica.BackWall.Brush.Color := clWhite;
       Grafica.LeftWall.Brush.Color := clWhite;
       Grafica.Chart3DPercent := 100;
       Grafica.Legend.Alignment := laLeft;
       Grafica.Legend.ColorWidth := 10;
       Grafica.Legend.TextStyle := ltsPlain;

       SerieBarras:=TBarSeries.Create(Self);  //Nueva Linea

       Grafica.AddSeries(SerieBarras);  //Nueva Linea
       Grafica.Series[0].Add(12,'Hola');
      End;
Inc(i);
end;
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Componentes que no se ven en tiempo de ejecución Alcolea Varios 3 11-09-2006 02:18:03
Como mostrar el cuadro de dialogo de diseño de Tchart en tiempo de ejecución? JuanErasmo Gráficos 0 21-12-2005 20:33:22
redimensionar en tiempo de ejecución aranel OOP 2 26-11-2005 18:43:42
Casteo en tiempo de ejecución moesis OOP 4 21-07-2005 15:21:56
Tiempo de ejecucion? st7 Varios 3 11-05-2004 22:03:28


La franja horaria es GMT +2. Ahora son las 01:07:19.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi