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

Message ListMessage List     Post MessagePost Message

  Showing Label for the last tick after moving ticks
Posted by Amrinder Singh on Oct-01-2013 03:30
Attachments:
Hey,

I was trying to draw a histogram like chart to represent the values in a time interval. I used
the setTickOffset and setLabelOffset to move the ticks and labels by -0.5. Now the values
show up how I expect them to.

However, I would like to label the last tick with the time the last interval ends. If I decide to
add a label and give the tick number as next tick number expected, I do not see the label
printed out.

Is there a way I can print a label for the new tick that shows up after moving the tick
offsets over? I am not using any scale for the x-axis.

Thanks
Amrinder

Code snippet:

chart.xAxis().setTickOffset(-0.5)
chart.xAxis().setLabelOffset(-0.5)

chart.xAxis().setLabels(x_labels)
chart.xAxis().addLabel(len(x_labels), "abcd")
graph.png

  Re: Showing Label for the last tick after moving ticks
Posted by Peter Kwan on Oct-02-2013 01:42
Hi Amrinder,

As the position you want to show the label is a fixed position (the lower right corner of the plot area), and is not related to the data or axis scale, you may consider to just add a custom label at that position. For example (in Python):

chart.addText(c.getPlotArea().getRightX(), c.getPlotArea().getBottomY() + 6, "abcd", "arial.ttf", 8, 0x000000, TopCenter)

Hope this can help.

Regards
Peter Kwan