ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  xAxis().addZone(Date, Date, int) ??
Posted by Mark Fenbers on Nov-01-2018 00:36

I'm using Java and CD6.0.1 on RHEL7.  I want to add a vertical zone to my horizontal axis.  My X-Axis is defined by Date objects, i.e., layer.setXData(Date[]) and xy.xAxis().setDateScale(Date, Date), but there is no addZone() variant that takes a pair of Date arguments, only doubles.

So how do I place a vertical zone on my graph if my xAxis is defined by Dates?

  Re: xAxis().addZone(Date, Date, int) ??
Posted by Peter Kwan on Nov-01-2018 23:28
Hi Mark,

In ChartDirector, if you need to use "Date", but the API only supports "double", you can convert "Date" to "double" using Chart.CTime. For example:

c.xAxis().addZone(Chart.CTime(date1), Chart.CTime(date2), ...);

Hope this can help.

Peter Kwan