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

Message ListMessage List     Post MessagePost Message

  Date labeling under automatically X-scaled bars
Posted by Richard Newmark on Mar-01-2011 17:38
Hello,
I've got a bar chart, with time/dates along the bottom x-axis, say from 1 Jan, to 31 December (but it could be any start & end date) . I get chartDirector to plot daily, or weekly, or monthly bars. The data comes in as a list of values, and a list of date/times in the label array.

I have no problem in getting the data to plot, but I can't figure out how to make sensible labeling inder the bars, as chartDirector automatically sets the x-axis scaling

I want there to be a single label under each bar. eg
Under each day bar  1/2/2011, 2/2/2011 etc  unless they are too squeezed together
Under each week bar  1/2/2011, 8/2/2011, 15/2/2011 etc
Under each month bar Jan 2011, Feb 2011 etc

Do you have any suggestions as to how to achieve this?

Thanks
Richard Newmark

  Re: Date labeling under automatically X-scaled bars
Posted by Richard Newmark on Mar-01-2011 17:48
I need to add, that on top of the bars, I am plotting a line graph of temperature (with many data points per day) . The start & end X times are the same as the bars, but I don't need any X-axis labeling of this temperature plot. However, I'm wondering if this data set is forcing the X-labels to come on at inappropriate times

  Re: Date labeling under automatically X-scaled bars
Posted by Richard Newmark on Mar-01-2011 18:49
I think my problem could be solved if the function layer1.setXData2 (Date[] dates) exists... I could put the times/dates for the temperature along the top, and keep them distinct from the bars.

Unfortunately, only function layer1.setXData (Date[] dates), so I'm stuck!

  Re: Date labeling under automatically X-scaled bars
Posted by Richard Newmark on Mar-01-2011 19:52
I'll shut up now.
I've solved my problem with          c.xAxis().setDateScale ( , , );

Just ignore my witterings!