show time (hour:min) instead of (year-month-day) in graphs x axis in Charts

UserBird Dataiker, Alpha Tester Posts: 535 Dataiker


it's a very dumb question but I cannot figure this out. Is there any way to show time (hour:min) instead of (year-month-day) in graphs x axis ?

I'm looking at data on 1 day or a few hours. I can filter by hour of day and that's great, but I could have the time in the legend that would be even better.

I guess otherwise I need to draw my own graphs in the notebook? Or I should prepare the data with a time column..?



Best Answer

  • Arnaud_PICHERY
    Arnaud_PICHERY Dataiker Alumni Posts: 4 ✭✭✭✭✭
    Answer ✓

    Hi Jeremy,

    You can display the hour in the x-avis if you select a Line Chart and configure the x-avis as displayed in the following screenshot. The date part will still be printed though.

    To display only the time component (HH:mm), you should indeed add a new column using a Preparation recipe and then use this column as x-axis. One way to do it is to extract the Hour component from your date and then to create a "Time" column using the Formula :

    if (Hour < 10, "0", "")+Hour+":00"

    Note that this solution will also work for the Scatter plot chart.

    Hope this helps,


    VP Engineering, Dataiku


Setup Info
      Help me…