36
Views
1
Comments
Increase length of Line Graph

Hello Community,

I'm creating a line graph where I can view my CPU usage. The data pulls in every 5 minutes.

Now I have created a button where on click of that it will show the CPU usage of machine of pervious day.

Since my records are fetched in every 5 minutes I'm getting my graph of previous day but not in proper manner.


You can see the middle graph it is showing for 1 hour but when I click on 1 Day button then it will show something like this 

How can I sort it in better manner? and also, the middle graph is showing 15th march record, how to remove that also?

this is my aggregate I'm using.

2024-11-07 03-28-42
Stuart Harris
Champion

Hi Dev,

Thanks for your question. I think we will need a little more information.

I assume you are using the LineChart from OutSystems charts.

I am wondering how you are formatting the times in the data series. Could you share that? The problem with the data series is it is text, and you have to pass in the date/time in a format the chart will understand.  It looks like some are formatted as times, and others as just a date. Mixing formats like this won't work within a single data series.

Here is an example where I have formatted the data series for the last 30 days using FormatDateTime(DateTime, "d MMM HH:mm").  The chart control appears to understand this format and present points in the correct order.

Also if you are working 10 hours a day (according to your graphs), I hope you are getting some time off! :)

I hope this helps!

Kind regards,

Stuart

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