ihasTaco / ServerQuery

A Discord Bot that queries game servers
Mozilla Public License 2.0
0 stars 0 forks source link

Trend Line Data Does Not Affect Graph Height #12

Closed ihasTaco closed 1 year ago

ihasTaco commented 1 year ago

In the current implementation of ServerQuery, the trend line data does not influence the height of the graph. Instead, the graph's height is determined solely by the maximum player count multiplied by two. This could lead to a misleading representation of the trend data, as the trend line may appear less prominent on the graph than it should be.

To enhance the accuracy and readability of the graph, the trend line data should be considered when determining the graph's height.

Steps to Reproduce:

Expected Outcome:

The graph height should adapt to the larger of the two values: the maximum player count (doubled) or the trend line data.

Actual Outcome:

The graph height is only influenced by the maximum player count (doubled), and does not adjust to accommodate the trend line data.

Suggested Fix:

Adjust the graph generation logic to consider both the maximum player count and the trend line data when setting the graph height. The graph height should be set to the larger of these two values to ensure an accurate and proportional representation of the trend data.

ihasTaco commented 1 year ago

I am testing a possible fix for this!

I needed to adjust the logic in the graph_area.js that sets the height of the graph

I have added logic that will get the peak value of the player data, and the peak value of the trend data. Then double it and then get the largest value between the two to get the height of the graph!

The test will take a few days unfortunately, but I will update this once I get the data

ihasTaco commented 1 year ago

This issue is pretty much fixed with the new additions to the develop build