Try your hand at analyzing royal sentiment in Dataiku DSS! Learn more

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

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

hi,



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..?



 



 



Thanks!

Jeremie

0 Kudos
2 Replies
Dataiker Alumni

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,



Arnaud,

VP Engineering, Dataiku

Dataiker
Dataiker
Author
perfect! thanks!
0 Kudos