Page 1 of 1

Datetime axes and barSize

Posted: Tue Apr 08, 2014 2:01 pm
by 17765867
It seems there is a bug when using datetime axis and bars. The bar sizes are not consistent. The problem exists with both 2d and 3d. The bars overlap in 2d mode.
I am using the version v1.5 of Teechart

Re: Datetime axes and barSize

Posted: Wed Apr 09, 2014 8:44 am
by yeray
Hello,

I'm trying to reproduce the problem with a simple 2D example but I'm afraid I can't.
Here it is the code I'm running:

Code: Select all

  Chart1=new Tee.Chart("canvas1");
  
  for (t=0; t<3; t++) {
	s = new Tee.Bar().addRandom();
	Chart1.addSeries(s);
	s.data.x=new Array(s.count());
  }
  
  msecsInADay=86400000; //24*60*60*1000

  var now=new Date(), tmp;

  for (t=0; t<Chart1.series.items[0].count(); t++) {
	  tmp=new Date(now.getTime() + t * msecsInADay);
	  
	  for (j=0; j<Chart1.series.count(); j++) {
		Chart1.series.items[j].data.x[t] = tmp;
	  }
  }
  
  Chart1.draw();
Find here the complete testing document:
testing.zip
(682 Bytes) Downloaded 809 times
Could you please modify the document above so we can reproduce the problem here?
Thanks in advance.