Skip to content

Change time format of x-axis (ChartJS) #4498

Closed

Description

@itg-assistant

Tom-Lukas Rugen asked 2024-03-11 09:02:08 UTC

Hello,

we are currently building a dashboard application, where we display bar charts with data from a database.
The x-axis is set to 'Time' and we want to show only the hours and not the rest of the date.
However our problem is that the time is always displayed in a 12-hour format (am/pm) and not the 24-hour format we need,
We've tried using the 'DisplayFormats' option, but this didn't change anything.

Could you provide a small sample, of how to correctly use the ChartJS extension in this regard?

Activity

  1. itg-assistant commented on Jun 16, 2026

    @itg-assistant
    Author

    Julie (ITG) answered 2024-03-11 20:25:13 UTC

    "Could you provide a small sample, of how to correctly use the ChartJS extension in this regard?"

    Unfortunately, creating custom samples from scratch is outside the scope of the services we offer on this free support forum.
    You can either look at the pre-existing ChartJS samples here:
    https://docs.wisej.com/examples/examples/chartjs
    https://wisej-demobrowser.azurewebsites.net/#Extensions/ChartJS/Features

    Or you will need to provide a small sample, following the guidelines under "Before Posting an Issue" here: https://wisej.com/support/question/forum-guidelines In your case, this would be a sample that uses ChartJS, and has Time on the x-axis in a 12-hour format (am/pm).

    Alternatively, we can develop a sample from scratch for you, if you purchase a support package: [https://docs.wisej.com/license/services/professional-services

    ](https://docs.wisej.com/license/services/professional-services)Hope this helps,

    Julie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions