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

Message ListMessage List     Post MessagePost Message

  Busy Histogram with about 100+ points on X axis
Posted by vik30 on Jul-08-2011 08:12
Attachments:
Hello,

I want to plot a histogram that has approx 120-odd points on the X axis.
An initial standard attempt got me to produce a very crowded graph where most of the numbers are overlapping each other.

Any suggestions on what might help

- to drastically improve clarity
- is histogram the wrong choice in this case?
- other suggestions?

Thanks,
Vik
Histogram_XYZ.png

  Re: Busy Histogram with about 100+ points on X axis
Posted by Peter Kwan on Jul-09-2011 01:10
Hi vik30.

If some x-axis labels can be omitted, you may consider to omit some labels (eg. using Axis.setLabelStep).

For example, if the labels are 0, 1, 2, 3, ...., 100. Even if you omit some labels and just show 0, 10, 20, ...100, the chart is still understandable. On the other hand, if the labels are the name of all countries in the world, we cannot omit any label.

For example:

// omit some labels, so that the spacing among labels is at least 50 pixels
c.xAxis().setLabelStep(myLabels.Length * 50 / c.getPlotArea().getWidth());

Another thing I notice is that the bars are completely black. It is probably because the border color is black. The bar is so thin that you can only see the border. You may consider to change the bar border color to Chart.SameAsMainColor:

layer.setBorderColor(Chart.SameAsMainColor);

For thin bars, sometimes it may look better by setting the bars to touch:

layer.setBarGap(Chart.TouchBar);

Hope this can help.

Regards
Peter Kwan