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

Message ListMessage List     Post MessagePost Message

  Y-axis label problem
Posted by jettaime on Aug-18-2012 14:16
Attachments:
Hi,

When the y-value of XYChart is small, the y-axis labels are strange.

If the y-value is big, this problem is disappeared.

How can I fix this problem?
scale.png

  Re: Y-axis label problem
Posted by Peter Kwan on Aug-19-2012 23:27
Hi jettaime,

The labels in your chart are at y = 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4. Your code probably has asked ChartDirector to round the numbers to integers (use no decimal place), so the labels become 0, 1, 1, 2, 2, 3, 3, 4.

If your intention is to create an y-axis with integer ticks only, please use Axis.setMinTickInc. For example:

//at least 1 unit between two ticks
c->yAxis()->setMinTickInc(1);

Hope this can help.

Regards
Peter Kwan

  Re: Y-axis label problem
Posted by nbhat on Oct-09-2015 20:42
Thanks Peter. This works!