Page 1 of 1

Problem with setRoundFirstLabel

Posted: Fri Jul 31, 2009 2:03 pm
by 15354003
Image

Code: Select all

                chart.getAxes().getBottom().getLabels().setDateTimeFormat("d hh:mm");
		chart.getAxes().getBottom().setIncrement(Utils.getDateTimeStep(DateTimeStep.ONEDAY));
		chart.getAxes().getBottom().getTitle().setText("Date");

		chart.getAxes().getBottom().getLabels().setRoundFirstLabel(true);
		chart.getAxes().getBottom().setStartPosition(1);

                        com.steema.teechart.DateTime cd1 = new com.steema.teechart.DateTime(c1.getTime().getTime());
			com.steema.teechart.DateTime cd2 = new com.steema.teechart.DateTime(c2.getTime().getTime());
			chart.getAxes().getBottom().setMinMax(cd1, cd2);
c1 - 00:00:00 first date interval
c2 - 23:59:59 last date interval
My timezone +3h

I had like set axis line to 00:00

Sorry my English
Dmitry

Re: Problem with setRoundFirstLabel

Posted: Fri Jul 31, 2009 2:56 pm
by yeray
Hi Demetrio,

Yes, it seems that the hour is not rounded or calculated correctly. So I've added this to the wish list to be fixed in future releases.
In the meanwhile you could force the 00:00 time to be shown as follows:

Code: Select all

chart.getAxes().getBottom().getLabels().setDateTimeFormat("d 00:00");

Re: Problem with setRoundFirstLabel

Posted: Fri Jul 31, 2009 3:40 pm
by 15354003
Set chart.getAxes().getBottom().getLabels().setDateTimeFormat("d 00:00"); is not correctly.
Just you changed label but not axis. I'l like that FIRST axis set to 00:00 and next... next... next

I use area chart with series.setStairs(true); and I set left border to 00:00:00(N - value) and right border 23:59:59( 0 - value) for my histogram

Code: Select all

						com.steema.teechart.DateTime dd = new com.steema.teechart.DateTime(cStart.getTime().getTime());
						series.add(dd, value);

						dd = new com.steema.teechart.DateTime(cRight.getTime().getTime());
						series.add(dd, 0);

Re: Problem with setRoundFirstLabel

Posted: Fri Jul 31, 2009 5:48 pm
by 15354003
How can I set first Label for DateTime axis?

Re: Problem with setRoundFirstLabel

Posted: Sun Aug 02, 2009 4:52 pm
by 15354003
I've decided my problem so TimeZone.setDefault(TimeZone.getTimeZone("GMT+0"));
I'm waiting your bug fix.
Best regards
Dmitry

Re: Problem with setRoundFirstLabel

Posted: Tue Aug 04, 2009 10:30 am
by yeray
Hi Dmitry,

I'm not sure to understand your problem. Is it possible that you are looking for SetMinMax axis function?
If not, could you please attach a simple example project we can run as-is to reproduce the problem here?

Thanks in advance.

Re: Problem with setRoundFirstLabel

Posted: Tue Aug 04, 2009 1:10 pm
by 15354003
Yes I use function setMinMax(c1, c2) c1=00:00:00 c2=23:59:59

if set setRoundFirstLabel = true first vertical axis is 4:00:00 ( for my GMT +3)
if i set GMT+0 first vertical axis is 00:00:00 ( correct for me)

Re: Problem with setRoundFirstLabel

Posted: Tue Aug 04, 2009 1:41 pm
by yeray
Hi Dmitry,

Then I'm afraid that you probably should translate your dates to GMT+0 before using them as dates.