About the "Performance history graph"
Moderator: OpenTTD Developers
-
- Engineer
- Posts: 5
- Joined: 17 Mar 2010 02:43
About the "Performance history graph"
Why the vertical scale numbers are not hundreds?
When the company reaches 1000 rating, the scale max number is 1104... how weird. Why display values you can't reach.
When the company reaches 1000 rating, the scale max number is 1104... how weird. Why display values you can't reach.
- Attachments
-
- screenshot
- openttd rating.PNG (34.49 KiB) Viewed 2569 times
Re: About the "Performance history graph"
The scale of the graph is generally not big enough to read actual values (ie you cannot see the difference between 1000 and 999), therefore its only use is to give a global impression. If you want to know precisely, open the window with the actual number.
Edit: The graph scales automatically to make sure all values fit in the display. Try a few other graphs to see.
Edit: The graph scales automatically to make sure all values fit in the display. Try a few other graphs to see.
Re: About the "Performance history graph"
The graph drawing code always makes sure that it can represent values up to 1100. Don't ask me why.
(Or, rather, up to 11/10 of the current maximum, 1000 in your case.)
(Or, rather, up to 11/10 of the current maximum, 1000 in your case.)
Code: Select all
// src_graph_gui.cpp:220
current_interval.highest = (11 * current_interval.highest) / 10;
current_interval.lowest = (11 * current_interval.lowest) / 10;
Re: About the "Performance history graph"
In all other graphics besides the company performance rating, there is no fixed maximum value. Because the graph is scaled taking into account the the current maximum value and the minimum value, and showing the highest and lowest lines too close to the borders seems "ugly", they are arbitrarily separated in a fixed interval from them. So, in short, the reason is because "it looks nice". The code for spacing the lowest value of the interval seems wrong, though.cirdan wrote:The graph drawing code always makes sure that it can represent values up to 1100. Don't ask me why.
(Or, rather, up to 11/10 of the current maximum, 1000 in your case.)
Code: Select all
// src_graph_gui.cpp:220 current_interval.highest = (11 * current_interval.highest) / 10; current_interval.lowest = (11 * current_interval.lowest) / 10;
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
-
- Tycoon
- Posts: 1534
- Joined: 14 Mar 2006 12:46
- Location: Netherlands
Re: About the "Performance history graph"
try drawing a graph yourself, any program will force some white-space above highest value in order to prevent a horizontal line to show a visual illusion of a bounding box/axis rather then an actual function
11/10th is a good rule
11/10th is a good rule
Re: About the "Performance history graph"
What difference is there between the highest value and the lowest value, so that a gap is nice to have above but not below the graph?
Re: About the "Performance history graph"
lowest should probably read 9/10 instead of 11/10...
but maybe there should be a special mode for "fixed maximum" like the performance rating
but maybe there should be a special mode for "fixed maximum" like the performance rating
Re: About the "Performance history graph"
Not if you have negative values.Eddi wrote:lowest should probably read 9/10 instead of 11/10...
Re: About the "Performance history graph"
ok, so we have three cases:
the upper bound is fixed for the performance rating (1000)
the lower bound is fixed for income and performance rating (0), maybe some others
the multiplicative scaling will not work for values close to 0
- there is a fixed {lower,upper} bound and the value is close to that bound, use the exact bound
- there is no fixed bound, or the value is far away, and the value is {positive,negative}, scale with 11/10 to produce a gap
- there is no fixed bound, or the value is far away, and the value is {negative,positive}, scale with 9/10 to produce a gap
the upper bound is fixed for the performance rating (1000)
the lower bound is fixed for income and performance rating (0), maybe some others
the multiplicative scaling will not work for values close to 0
Re: About the "Performance history graph"
You can effectively do away with the 9/10 rule, since all graphs in OpenTTD include 0, which means that you will never get a positive lowest reference value or a negative highest one.
In fact, the current system would work rather well if the 11/10 of the highest value were just clamped to the absolute upper bound when it exists.
In fact, the current system would work rather well if the 11/10 of the highest value were just clamped to the absolute upper bound when it exists.
-
- Tycoon
- Posts: 1396
- Joined: 23 Feb 2014 22:02
Re: About the "Performance history graph"
I see this issue has been around a while.
There may be a case for a small amount of space over 1000 but not for space that stretches with the graph...there should be an upper bound on top-stretch when there's a fixed max.
There may be a case for a small amount of space over 1000 but not for space that stretches with the graph...there should be an upper bound on top-stretch when there's a fixed max.
Who is online
Users browsing this forum: No registered users and 5 guests