mit-cml / appinventor-sources

MIT App Inventor Public Open Source
http://appinventor.mit.edu/appinventor-sources/
Apache License 2.0
1.47k stars 2.05k forks source link

ChartData2D Component Needs Property to Define Range of Y Axis #2787

Open bobparks opened 1 year ago

bobparks commented 1 year ago

Describe the bug ChartData2D generates the range of the Y axis from the data, but this can be problematic when visualizing two comparable datasets that differ in the range of Y. It creates a false comparison, as shown below.

For example, if you looked at the annual ice duration data of these two lakes, top and bottom, they would seem similar. The range of the top lake, however, starts around 70 instead of 0.

Screenshot_20221216-170808 By changing the Y range to 0 for both (artificially adding a leading 0 to the data), the top graph shows a truer picture — that the top lake has less variation year-to-year than the bottom lake (it is more shallow and therefore a bit more resilient to climate change). Screenshot_20221216-170718

For kids to compare two datasets accurately, would be great to have a parameter in the ChartData2D properties panel to define this range.

@stezelMIT, @anqizzz8989

Affects

Expected behavior

Steps to reproduce

dhruvpatidar359 commented 1 year ago

This issue seems interesting to me , can anyone please guide me how i can track this issue in the code base , what steps i should follow ? -- i am beginner with this project , that's why i am asking .

stezelMIT commented 1 year ago

I believe @ewpatton already fixed that, correct Evan?

dhruvpatidar359 commented 1 year ago

@stezelMIT ok , if ewpatton has not corrected it then , i think that it can be corrected by doing some changes in the file Chart2DDataModel.java , please correct me if i am wrong .

dhruvpatidar359 commented 1 year ago

Hello @ewpatton sir ,is the issue resolved or i can work on this ?

dhruvpatidar359 commented 1 year ago

I checked it , the problem is still there in the current version , here you can see

dhruvpatidar359 commented 1 year ago

WhatsApp Image 2023-01-20 at 10 44 47 PM (1)

WhatsApp Image 2023-01-20 at 10 46 56 PM

stezelMIT commented 1 year ago

I think the issue has been addressed and is now on the test servers, but not merged yet. Correct @ewpatton @bobparks ?

ewpatton commented 1 year ago

That's correct. The branch in question needs to be cleaned up a bit because I implemented some other changes to spreadsheets that in hindsight didn't work so I backed them out. From the end user's POV it won't make any different but in terms of keeping the code base clean it's better for me to do the work to fix up the branch before publishing the PR.