We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

x value label on Datetime axis not shown at correct postion

the label on the date time x-axis is always shown wrong.

the value should be shown below the columns but it is in between.

see the attached screenshot

The trackball in 2022, where the label at the x line, is more right, between the columns of 2022 and 2023

this happens to all dates. 

Any idea how to fix it?

Bildschirm­foto 2023-03-04 um 18.32.23.png

3 Replies

LA Lavanya Anaimuthu Syncfusion Team March 6, 2023 01:56 PM UTC

Hi Matthias Koch,

We have reviewed your screenshot and suspect that two series were added side by side, causing the axis labels to align with the center of the two series instead of being in a single column series. We kindly request you to share us with more information on your requirement in detail along with chart code snippets and replication procedure so that it will help us assist you in a better way.


Lavanya A.

MK Matthias Koch March 7, 2023 09:51 AM UTC

Hi Lavanya,

in the screenshot, you see a stacked graph. 

the one marked with the trackball has the x-axis value: of 2022, and the one right to that (so total right) has the x value of 2023.  The label for 2022 is between 2022 and 2023, whereas the 2023 label is not shown. 

Also, in the graph, you can see the label for 2020 which is on the right of the graph 2020. where the 2021 label isn't shown, 

and there is no graph as the y value is zero.

I would expect that the label on a DateTime X-Axis is also shown in the middle of StackedGraph. 

does this help?

YG Yuvaraj Gajaraj Syncfusion Team March 8, 2023 01:53 PM UTC

Hi Matthias,

To achieve your requirement, we suggest the DateTimeCategoryAxis which is help you to place the axis label between the ticks and avoid place after the series. We have shared the code snippet and related document below for your reference.

Code snippet:

primaryXAxis: DateTimeCategoryAxis(),


UG, https://help.syncfusion.com/flutter/cartesian-charts/axis-types#date-time-category-axis



Live Chat Icon For mobile
Up arrow icon