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

Message ListMessage List     Post MessagePost Message

  Set Title - Y-axis
Posted by Vivian Peres on Nov-14-2014 02:09
Attachments:
Hello!

According to the picture, when I try to put the title of the Y axis, the first set of labels is
covering the title.

Here's my code:

c.xAxis().setTitle("Hz");

double[] topLabels = { 125, 250, 500, 1000, 2000, 4000, 8000};

for (int i = 0; i < topLabels.length; ++i)
        c.xAxis().addMark(topLabels[i], 0x000000, "<*yOffset=15*>" +topLabels[i],
     "Times New Roman Bold", 10).setDrawOnTop(false);

// The bottom row of labels, using dash lines as grid lines
double[] otherLabels = {750, 1500, 3000, 6000};
for (int i = 0; i < otherLabels.length; ++i) {
    Mark m = c.xAxis().addMark(otherLabels[i], -1, "" + otherLabels[i], "Arial");
    m.setDrawOnTop(false);
    m.setMarkColor(c.dashLineColor(0x000000, Chart.DashLine), 0x000000);
        }

Could anyone help me?
file not found: Sem t?tulo.png

  Re: Set Title - Y-axis
Posted by Peter Kwan on Nov-14-2014 02:56
Hi Vivian,

May be try to shift the x-axis title upwards by 15 pixels, just like the top labels.

c.xAxis().setTitle("<*yOffset=15*>My Title");

Regards
Peter Kwan

  Re: Set Title - Y-axis
Posted by Vivian Peres on Nov-14-2014 03:39
It works!

Again, thanks a lot Peter!