isle-project / isle-editor

Editor for ISLE (Integrated Statistics Learning Environment) lessons.
https://isledocs.com
Other
16 stars 7 forks source link

[Bug]: labels on y axis for bar charts showing proportions rather than counts for counts #3459

Open keegankang opened 1 year ago

keegankang commented 1 year ago

Description

Suppose we go to:

Show Toolbox->Plots->Bar Chart, select a variable and Group By another variable, and check the Relative Frequencies box. A correct clustered bar chart will be shown (no issues here).

However

no_issues

if we now remove the variable in Group By (by clicking on the x button), most options are greyed out

Screenshot 2023-08-25 at 3 45 23 PM

and if we now click on Generate

proportion_counts

we see a bar chart where the y axis are counts, but the label is proportion.

Moreover, because the options to display "Total Percentages" are greyed out, you would need to Hide the Toolbox, and then Show Toolbox again to make a boxplot.

To summarize: After making a clustered bar chart with relative frequencies, all options to show proportions are greyed out, so if we want to make a simple bar chart, we need to hide / show the toolbox again to get back the option.

My concern is students would be confused about the meaning of proportion here.

Expected behavior

I would expect the options for generating bar charts NOT to be greyed out when the Group By:variable is removed.

To Reproduce

  1. Go to Toolboxes
  2. Go to Plots
  3. Go to Barchart
  4. Select a variable
  5. Select another variable for Group By
  6. Check the box Relative Frequencies inside each group
  7. Click on Generate
  8. Delete the Group By variable
  9. Options are now greyed out
  10. Clicking on Generate now shows a bar chart where the y axis are counts, but the label is Proportion

Version

0.76.21

Link to ISLE lesson

https://bucknell.kymetis.com/Math216FA2023/Lab1/

ISLE Code

No response

What browsers are you seeing the problem on?

Chrome, Safari

What browser version?

No response

Additional context

No response

gweinberg commented 1 year ago

this may have gotten fixed since the latest version of the editor; I can't reproduce the bug on lessons built with editor version 0.76.23; on those lessons, after making a grouped-by bar chart of relative frequencies, keeping the dialog open and un-checking "group by" retains the active option "total percentages" in the dialog, and if it's not selected then the axis of the bar chart is properly labeled as "count"