I need to shift the x axis label in a trend

I'm able to reproduce the XY Chart now, thanks.

I suspect that rotate : 90 is rotating the label about the top left corner of the label and this is swinging it to the left of the rotation point. The XY Chart is based on AM Charts components and you can find some of the relevant documentation here:

https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/#Label_rotation

I can't see a way to modify the verticalCenter property through the XY Chart properties though.

@Ahmed_mohamed's solution may be the best workaround for now.


Comments:

  • You can delete xAxes.1 as it's not used.
  • You can clean up the Percent graph by making the bullets transparent.
    series.2.appearance.bullets.0.fill.opacity : 0
    series.2.appearance.bullets.0.stroke.opacity : 0
    You need to leave them enabled if you wan the tooltip to appear.

You might be interested in some tooltip formatting that I figured out and shared in Perspective XY Chart xAxes tooltip text {dateX}.

3 Likes