TeeChart Delphi and TeeChart Java

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
Wheb
Newbie
Newbie
Posts: 8
Joined: Fri Jan 25, 2008 12:00 am
Location: Brazil

TeeChart Delphi and TeeChart Java

Post by Wheb » Wed Dec 23, 2009 7:43 pm

In Delphi I insert the values:

Code: Select all

Query:= TQuery.Create(Self);
 Query.Tag                     := 1000;
 Query.DatabaseName            := Protocolo_Receita_q.DatabaseName;
  Query.SQL.Add(' select trunc(dt_exame) dt_exame, ' +
                          '        sum(vl_exame) vl_exame    ' +
                          ' from   med_result_exame          ' +
                          ' where  nr_seq_exame   = ' + Med_Resultado_Exame_q.FieldByName('nr_seq_exame').AsString +
                          '   and  nr_seq_cliente = ' + nr_seq_cliente_ed.Text +
                          '   and  nvl(ie_valido,'+QuotedStr('S')+') <> ' + QuotedStr('N') + 
                          ' group by trunc(dt_exame) ' +
                          ' order by 1 ');

 TDBChart(Grafico).Series[i].Title                 := Med_Resultado_Exame_q.FieldByName('exame').AsString;
 TDBChart(Grafico).Series[i].Marks.Style           := smsValue;
  TDBChart(Grafico).Series[i].Marks.Visible         := True;
  TDBChart(Grafico).Series[i].XLabelsSource         := 'DT_EXAME';
  TDBChart(Grafico).Series[i].YValues.ValueSource   := 'VL_EXAME';
  TDBChart(Grafico).Series[i].DataSource            := Query;
  TDBChart(Grafico).Series[i].Active                := True;
  TDBChart(Grafico).Series[i].ShowInLegend          := True;
  TDBChart(Grafico).Legend.TextStyle                := ltsPlain;
  TDBChart(Grafico).LeftAxis.Inverted               := False;
And TeeChart show :
Image

In Java I insert the values:

for(WChartSerieValorVO valores : serie.getValores()){
DateTime dt1 = valores.getVlEixoX() != null ? new DateTime(((Timestamp)valores.getVlEixoX()).getTime()) : null;
Double db = valores.getVlEixoY() != null ? ((Number)valores.getVlEixoY()).doubleValue() : null;
s.add(dt1, db);
}

And TeeChart show :
Image

The values in Delphi and Java are the same, but the design does not. I need the design in Java is the same in Delphi. How do I do?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: TeeChart Delphi and TeeChart Java

Post by Narcís » Thu Dec 24, 2009 8:35 am

Hi Wheb,

Are you using the same settings for Java as you do in Delphi? Could you please attach simple example projects or code snippets we can run "as-is" to reproduce the problem here?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Wheb
Newbie
Newbie
Posts: 8
Joined: Fri Jan 25, 2008 12:00 am
Location: Brazil

Re: TeeChart Delphi and TeeChart Java

Post by Wheb » Thu Dec 24, 2009 12:06 pm

Sorry, I saw that I forgot to put the code line

Code: Select all

TDBChart(Grafico).Series[i].XValues.ValueSource   := 'DT_EXAME'; 
in Delphi, so the results were different.

Tanks;

Post Reply