34
Views
2
Comments
About charts
Question
Application Type
Reactive

hi first of all my problem statement is to be i have flights data which is nothing but how many flights are depature from hyderbad airport here i want to display data how many pssengers are travelling from particular airline(indigo,etc) here in x axis i want to display tym in colum chart(hour wise) i want to display data of how  many passengers are tarvelled particular hour in x axis y axis passenger number

 

if user selected date and end date from that sate to thatdate display data here i create date picker i aware that now i want

to do how to make time in x-axis

 

my db is

id ,flightname, date,time(depature) passengers travelling

how to acheive it

2025-08-13 09-41-37
Shubham Sharma
Champion

Hi Sai,

To display the number of passengers traveling from a particular airline during a specific time range in OutSystems, you can perform the following steps:

1. Create a screen with a date picker to select the start and end dates.

2. Create a chart widget and select the column chart type.

3. In the chart's data source, create a data query that retrieves the flight data from the database, filtered by the start and end dates selected by the user. You can use the Between operator in the query to filter the data.

Something Like this : 

SELECT flightname, date, time, SUM(passengers_travelling) FROM FlightData WHERE date BETWEEN @start_date AND @end_date GROUP BY flightname, date, time 

4. Set the X-axis to the time field and the Y-axis to the SUM(passengers_travelling) field.

5. In the chart's series settings, set the flightname field as the series expression. This will display a separate chart for each airline.

6. In the chart's X-axis settings, change the axis type to Continuous and set the minimum and maximum values to 0 and 24 respectively.

7. To display the hour in the X-axis, you can format the axis label by using the FormatDateTime function.

FormatDateTime(Modulo(time,1),"hh") 

This will display the hour in the X-axis, with data grouped by hour, showing the number of passengers traveling during each hour.


Let me know if you need any other help





UserImage.jpg
Pydisetti sai

Thank you so much i will try if any help i will contact you

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.