FelixdelasPozas / TrayWeather

Tray Weather is a simple application to retrieve and show weather information for a given geographic location in a small dialog and in the Windows OS system tray.
GNU General Public License v3.0
190 stars 22 forks source link

Make the day axis markers in the forecast graph 12 hours each #141

Closed obuw closed 9 months ago

obuw commented 1 year ago

Currently the hour markers in the forecast graph seem to follow an irregular pattern:

image

Hour 15, Hour 1, Hour 12, Hour 22, Hour 9, etc.

If the markers were placed every 12 hours, at Hour 00 and Hour 12, then it would be easier to understand what part of a day each section belongs to without having to hover over the individual bar, e.g. whether it will rain in the morning, noon, or afternoon.

13regent commented 1 year ago

I suggested the same thing in "Discussions" a few weeks back.

FelixdelasPozas commented 1 year ago

Hi @13regent and @obuw .

The markers are not placed in a exact value, those are called "ticks" in the graph and the only thing I can specify is the number (12 currently, file WeatherDialog.cpp line 336). I don't know if it can be placed like you want. The current number was chosen to have as many "tiks" as possible without the labels in the X axis being elided (if there are a lot, the Day(Hour) values can become just "..." making impossible to know the time and date of the value).

Currently I'm very busy with work and a master's degree, but I'll try to look into it during the holidays or after the January exams. Thanks for your patience.

Regards, Félix.

13regent commented 1 year ago

Hi...have you had a chance to look at this axis scaling issue?

FelixdelasPozas commented 1 year ago

Hi, I've been looking into sub-classing QDateTimeAxis and forcing on drawing the markers in 00 and 12 hours, but I really didn't have the time to finish it. But I've not forgotten about this. I just don't have much free time lately, I'm sorry.

Regards, Félix.

13regent commented 1 year ago

Its all good...thanks.

mikeapuli commented 10 months ago

Hi Félix,

Thanks for the great program - I'm wondering if you could have an option to make the day axis markers more frequent than every 3 hours? Say every 30mins or every hour? Not sure if I should start a separate thread for this. Please move if so, and thanks again!

FelixdelasPozas commented 9 months ago

Hi @obuw , @13regent & @mikeapuli .

In the next version (1.28.0) the markers will be placed exactly in the hours. Depending on the zoom of the graph the interval of the markers will be the divisors of 24 hours, that is 24,12,6,4,3,2 and 1, that way there always be a marker in 12 and 24 hours. With the exception of the borders, that markers are fixed depending on the data and the zoom.

screen1 screen2 screen3

I'll close the issue then, if you have a suggestion you'll be able to write even if closed.

Regards, Felix.