Page 3 of 4

feature request

Posted: 19 Jun 2007 22:55
by griffin71
Could the scales of both axes be adapted to 'beautiful' values?
E.g. if your scale runs from 0 to 1024, it is normal to create 22 gridlines: 0, 50, 100, ...., 1000, 1050. On a small graph one might use 12 gridlines: 0, 100, 200, ... , 1000, 1100.
Algorithms for this are in existence, and it would enhance the readability of the graphs greatly.

Re: feature request

Posted: 29 Jun 2007 07:51
by Zojj
chrissicom wrote:What I did was only changing the graph from days in transit to seconds in transit since that is not a relative value affected by the daylength patch.
Cool! No problem. I hope people find your build useful.
griffin71 wrote:Could the scales of both axes be adapted to 'beautiful' values?
Good thought. I was lazy and kept the horiz grid spacing the same as TTD. If I change the graph it to use rounder increments (50,100,1000...), I think the horiz. grid spacing would need to vary... hmm

Re: Patch: New graphs

Posted: 01 Dec 2007 01:52
by Zojj
I'm considering continuing work on this patch.. mostly depends if it has a chance of being included in the trunk.

I plan on doing this:
1. Update to current trunk
2. Gray background option in the patch settings (normal, better with black bg, better with gray bg)
3. Rounded numbers on the Y-axis
4. Update coding style as required. Feedback from devs appreciated.

Post your thoughts or requests please!

Re: Patch: New graphs

Posted: 02 Dec 2007 22:45
by Volny
the more graphs the better! :) especially in multiplayer it is nice to compare your company with others! And if somebody doesnt like them, then he just dont have to use them :)
- one suggestion - maybe adding some cool eycandy - ie splines for connecting "dots" or "values" instead of current lines. This will make graphs much smoother. And also some kind of floating average.

Re: Patch: New graphs

Posted: 10 Dec 2007 12:25
by Bilbo
Volny wrote:the more graphs the better! :) especially in multiplayer it is nice to compare your company with others! And if somebody doesnt like them, then he just dont have to use them :)
- one suggestion - maybe adding some cool eycandy - ie splines for connecting "dots" or "values" instead of current lines. This will make graphs much smoother. And also some kind of floating average.
Smoother, but IMHO maybe inaccurate, as you never know what happens "between the points" and for values like 100,700,700,100 you may get some false peak between the two 700's with value perhaps like 800. Also, somebody will need to add support for splines to openttd (they are a bit more difficult than drawing simple lines, especially if you want some clipping and good drawing speed - although not so hard to implement, it still may be quite some work ...)

I don't think splines in these graphs are a good idea.

Re: Patch: New graphs

Posted: 11 Dec 2007 06:21
by Zojj
Bilbo wrote: for values like 100,700,700,100 you may get some false peak between the two 700's
True. If the point values are kept the same, then with a smooth curve the area (cumulative total) will be incorrect. I could keep the area the same and adjust the points... that would be better, but still inaccurate. I would use parabolic curves.

But not yet... I'm still waiting for someone to say this patch has a good chance of inclusion. :P

Re: Patch: New graphs

Posted: 15 Dec 2007 23:16
by orudge
Just to give my opinion on these graphs - I think they look rather good. Hopefully if the code is up to scratch they can be submitted to the repository. :)

Re: Patch: New graphs

Posted: 16 Dec 2007 14:22
by belugas
for the record, I second orudge

Re: Patch: New graphs

Posted: 16 Dec 2007 16:31
by Roujin
I haven't looked at your patch until now, and i haven't got a voice that counts in terms of trunk inclusion, but i just have to second all the others that find your graphs very useful. Also the "smooth" option is very promising if you want a bigger picture about what is happening, where all the spikes are just distracting.

I know that my trains sometimes manage to do two deliveries in a year, sometimes one. That's not the info I'm looking for in the graph ;)

So, great patch and hopefully a candidate for inclusion as orudge and belugas are saying...

Re: Patch: New graphs

Posted: 16 Dec 2007 18:54
by Zojj
Yay! Motivation :P

Re: Patch: New graphs

Posted: 01 Apr 2008 18:40
by jez
I love this patch, but it seems like it has not been maintained which is a real shame :-( player.h doesn't even exist anymore and so the current patch doesn't work at all for the latest SVN trunk. Anyone feel like updating it for the latest trunk? I might have to see if I can if nobody else will/has, because I like these graphs so much. :-)

Re: Patch: New graphs

Posted: 10 Apr 2008 04:35
by zypa
@zojj: Will there ever be a new version of this patch? I'd really love to see a new version

@chrissicom: You use this patch in your latest ChrisIN. Do you have a newer version than the one on this thread?

Re: Patch: New graphs

Posted: 15 Apr 2008 22:38
by Roest
There's hope. I got it up and running now. Still crashes when i click on key, the cargo payment rates dont work and the cargo graph legend doesn't seem to like ECS very much, but other than that it works

Edit: Cargo payment rates work, just not with ECS.

Re: Patch: New graphs

Posted: 16 Apr 2008 09:22
by Roest
And here it is. Works with latest trunk (12733).

Re: Patch: New graphs

Posted: 19 Apr 2008 01:36
by Zojj
Awesome! Thanks for updating my patch. I don't have time anymore =(

Re: Patch: New graphs

Posted: 21 Apr 2008 16:43
by wleader
I've noticed Roest's update of this patch makes an unneeded modification to variables.h. Its just something that can be cleaned up the next time it is updated.

Re: Patch: New graphs

Posted: 21 Apr 2008 16:44
by Roest
Hmm? It's probably been there before i meddled with it.

Re: Patch: New graphs

Posted: 22 Apr 2008 20:05
by Roest
update, should work with newindustries now,

please report any bugs you find

Re: Patch: New graphs

Posted: 07 May 2008 00:15
by AndiK
Hmm. I've got a suggestion: The growth views could do with an own vertical scaling. If absolute values are high and changes small, the growth graph is practically unreadable.

Very useful patch, though..

Re: Patch: New graphs

Posted: 16 May 2008 08:47
by Roest
updated to r13117
AndiK wrote:Hmm. I've got a suggestion: The growth views could do with an own vertical scaling. If absolute values are high and changes small, the growth graph is practically unreadable.

Very useful patch, though..
That issue is known, but don't have time to fix it right now.