2Abendsegler / GClh

GC little helper II - Some little things to make life easy (on www.geocaching.com). Powerful, configurable tool to improve and expand the geocaching pages.
GNU General Public License v2.0
59 stars 38 forks source link

[Statistic] Own scale of graphical monthly found statistics #2662

Open TopGodo opened 1 week ago

TopGodo commented 1 week ago

Is your feature request related to a problem? Please describe

During my visit to Assen I made 2500 finds in one day. This creates a peak in my monthly finds, which are normally ~400 finds per month. This peak makes all other months barely recognizable as a graph. Unbenannt

Describe the solution you'd like

It would be good if you could determine the scale of the graph on the Y-axis for your own statistics. In my case it would make sense to be able to set the scale to 500 max so that the other bars are easier to see again.

Additional context

Thanks for this great tool. I use it a lot and it is the most helpful addon I know.

2Abendsegler commented 1 week ago

Danke für deine Anfrage. Ich kann dein Problem nachvollziehen.

Ich habe mir die Grafik mal kurz angesehen. Sie besteht aus vielen einzelnen grafischen Elementen. Um deine Anforderung umzusetzen, müssten wir ziemlich viele dieser grafischen Elemente anpacken und ändern. Der Aufwand für eine derartige Entwicklung wäre nach meiner derzeitigen Einschätzung schon etwas umfangreicher.

So etwas lohnt sich aus unserer Sicht nur dann, wenn das Feature auch das Leben von mehr als nur einzelnen Cachern erleichtert. Hier gehe ich aber eher davon aus, dass nur ganz wenige Cacher von einer solchen Entwicklung profitieren würden.

Hätten wir viel Zeit und nichts zu tun, dann wäre es vielleicht noch etwas anderes. Im Moment haben wir aber eigentlich gar keine Zeit und hätten tatsächlich einiges zu tun, weil so viele Anpassungen auf den Webseiten erfolgt sind, die wir noch nicht eingearbeitet haben.

Sorry, ich sehe im Moment nicht, dass wir deine Anforderung umsetzen werden. Ich lasse das Issue noch ein paar Tage offen. Vielleicht haben meine Kollegen noch andere Ideen.

TopGodo commented 1 week ago

Sehr schade, wenn es zu aufwendig wird. Trotzdem vielen Dank für's Anschauen und das Feedback!

DieBatzen commented 4 days ago

Out of curiosity, I had a look into the issue and found a fairly simple way to implement the request: the code for drawing the chart is embedded in the page and therefore redrawing the chart with modified y-scale is straightforward.

This is how it looks like for @TopGodo when scaling by 500 finds per month: grafik

I'll provide a PR soon.

2Abendsegler commented 4 days ago

Yes, that looks really cool, well done again.

On the other hand, the feature is only useful for very few cacher. I couldn't even look at TopGodo's bar chart in an improved way. And it is only of benefit to TopGodo in its own statistics.

I had actually thought the other day that it would have to be made a bit more variable if the requirement were actually to be implemented. So no fixed setting, but something like for example with the Personal Cache Notes where you can easily change the height of the input area at the bottom with a slider. For our purpose, perhaps more at the top. So you would leave the scaling as it is, so for TopGodo up to 3000.

Slider for Personal Cache Notes: 1

Or a slider like the one on the old log form, perhaps a bit thinner: 2

This would allow everyone to simply move the height of the bar chart in each cacher's statistics so that they can read them better.

TopGodo commented 4 days ago

@DieBatzen That looks great! Thank you very much for your effort. This is exactly how I had imagined it.

@2Abendsegler Indeed, this setting to 500 is only useful in my statistics. The view of statistics of other users may require other Y-values as maximum. I can imagine how pointless this might look for others. Perhaps you can specify in the settings which maximum value should be set as the Y-axis. That way, every user would benefit.

In any case, thanks for implementing the idea with the slider in the next version!

capoaira commented 3 days ago

I actually like this feature, too.

Perhaps you can specify in the settings which maximum value should be set as the Y-axis. 

This is done by DieBatzen in the PR. 2Abendsegler suggested making it variable on the page itself. I really like the suggestion, since you may want to see sometimes the whole bars and sometimes limited.

DieBatzen commented 3 days ago

Agreed that this feature is probably useful for only very few cacher and therefore questionable to add as proposed. The suggestion of a slider to change the height dynamically sounds like a good compromise. A solution could look like the following:

Animation

What do you think?

TopGodo commented 2 days ago

I think it looks very good. I can live with this solution very well. Many thanks for that! Great!

2Abendsegler commented 1 day ago

@DieBatzen Looks great, thanks!

I only had a quick look at it because I'm on the road. I only have two small things.

  1. Is there anything that speaks against this feature also being available for other people's statistics?
  2. Could you perhaps put all the coding in a try-catch?
DieBatzen commented 1 day ago

@DieBatzen Looks great, thanks!

I only had a quick look at it because I'm on the road. I only have two small things.

1. Is there anything that speaks against this feature also being available for other people's statistics?

2. Could you perhaps put all the coding in a try-catch?
  1. Technically that would be possible. However, I find it somewhat difficult to recognize the added value of intervening in the statistics of other cachers. I think the improvement should be limited to your own statistics.
  2. Done.
DieBatzen commented 1 day ago

Here's an updated and maybe final version:

Animation

Height will be preserved for next visits,

2Abendsegler commented 1 day ago

To 1. This statistic is a good way to check how active a cacher is. If you compare the more recent statistical data with the past data. Sometimes this is more informative than just looking at the last finds. For example, if there are inconsistencies with a cache, I often use this to help me decide whether to go to the trouble of contacting the owner or not. Or if there is no response from the owner, the statistics may suggest that the cacher is not spending much time geocaching anymore. But sometimes I am just interested, for no particular reason, in what my friends or VIPs are up to, how many caches they have done recently and how active they still are. There are probably other reasons that are not so important to me at the moment. Actually, I find other people's statistics more interesting than my own.

Height will be preserved for next visits

Cool thing for the own statistics

DieBatzen commented 1 day ago

That sounds convincing.

Feature is now available for own statistics page and statistics tab on all non-hidden public profiles. Height will be preserved for own statistics only. PR is updated.