Page 1 of 1

time date scale on graph with no data

Posted: Wed Dec 10, 2014 7:34 am
by 17766258
When there is no data on the graph the time/date scale is not visible.
Is there a way to show the time scale also when there is no data on the graph?

Re: time date scale on graph with no data

Posted: Wed Dec 10, 2014 12:03 pm
by yeray
Hello,

In TeeChart HTML5/Javascript, a Chart needs a series with at least one value to draw the axes. But it can be a null point. Ie:

Code: Select all

  Chart1=new Tee.Chart("canvas1");
  Chart1.legend.visible=false;

  Chart1.addSeries(new Tee.PointXY([null]));//.addRandom(1);
  
  Chart1.axes.left.setMinMax(0, 100);
  Chart1.axes.bottom.setMinMax(0, 100);
  
  Chart1.draw();

Re: time date scale on graph with no data

Posted: Wed Dec 10, 2014 1:08 pm
by 17766258
This is not working well, when i add null series the format of my bottom axess is not Date/Time as I set it and it shows number.
In this specific chart I have only one Gant serie.
What I did to resolve the problem is add null point
mySer.add(null, null, startTime, startTime)


Thanks,
Amos

Re: time date scale on graph with no data

Posted: Wed Dec 10, 2014 2:46 pm
by yeray
Hi Amos,
samos wrote:This is not working well, when i add null series the format of my bottom axess is not Date/Time as I set it and it shows number.
In this specific chart I have only one Gant serie.
What I did to resolve the problem is add null point
mySer.add(null, null, startTime, startTime)
Sorry, I missed the DateTime part.
I'm glad to hear you found how to achieve it though!