Author Topic: Display suggestion: replace pie chart  (Read 6197 times)

TRex

  • Eulexic
  • ***
  • Posts: 2041
  • ~50 miles from Chicago, in the Corn (maize) Belt
    • View Profile
Display suggestion: replace pie chart
« on: March 29, 2015, 04:22:53 AM »
Since some browsers don't seem to be able to display the pie chart beneath the 'Help' button, and
since I (and perhaps, others) find it difficult to accurately read it, and
since I know the pop-up when hovering over sometimes does not work, and
since the percentage is a truncated value,

I'd prefer to see something that would show actual numbers of common words found, a virgule, and the number of common words in the puzzle above a line showing the percentage to one or two places (still truncated, because I know adding calculations to handle rounding is a lot more work). It might look something like:
43 / 72
59.72%

Alan W

  • Administrator
  • Eulexic
  • *****
  • Posts: 4968
  • Melbourne, Australia
    • View Profile
    • Email
Re: Display suggestion: replace pie chart
« Reply #1 on: March 30, 2015, 12:11:34 PM »
I know adding calculations to handle rounding is a lot more work

I'm not sure if you're being a little sarcastic here, TRex, but I have to admit that rounding numbers is pretty simple (especially to a whole number) and it's sheer laziness on my part not to be doing it already.

I don't know if the lack of comments from other players means everyone else agrees with your suggestion, or that nobody else sees a need for a change, or that nobody else cares one way or the other. But probably the option of the pie chart should remain, for those who prefer a graphical presentation, so maybe we need a button, whose setting the site would "remember", to switch to a numerical display.

I must say, I'm impressed with your use of the word virgule for the "/" sign. Back in ancient times when I would sometimes dictate letters to a shorthand writer, I used the word stroke for that symbol. I can't remember if that was because the stenographers had told me that was what it was called, but at any rate that was what I thought was its usual name. Nowadays of course it is a slash, or else the retronym forward slash. Another name for it that I have read about is solidus, but I don't think I've ever encountered anyone actually calling it that.
Alan Walker
Creator of Lexigame websites

Linda

  • WordStar
  • ****
  • Posts: 7063
  • Cumbria, England
    • View Profile
Re: Display suggestion: replace pie chart
« Reply #2 on: March 30, 2015, 08:46:51 PM »
I hardly ever look at the chart but I must say I am mightily impressed with the recent changes, Alan, especially the Define and Counts options.  Thank you for making Chi such a fantastic place to be!! xx  >:D

rogue_mother

  • Eulexic
  • ***
  • Posts: 2165
  • I CAN'T BREATHE!
    • View Profile
Re: Display suggestion: replace pie chart
« Reply #3 on: March 31, 2015, 12:21:46 AM »

I don't know if the lack of comments from other players means everyone else agrees with your suggestion, or that nobody else sees a need for a change, or that nobody else cares one way or the other. But probably the option of the pie chart should remain, for those who prefer a graphical presentation, so maybe we need a button, whose setting the site would "remember", to switch to a numerical display.


In point of fact, I wrote multiple replies yesterday. I never posted them, though, because I could not control the snark factor. I had trouble getting past the idea of decimal points on a percentage, let alone whether they were rounded or truncated. The truth is that we each have different personalities, needs and expectations that we bring to the game, and you, Alan, go above and beyond to accommodate all of us.

I myself like the pie chart and see no need for a change.
Inside the Beltway, Washington, DC metropolitan area

TRex

  • Eulexic
  • ***
  • Posts: 2041
  • ~50 miles from Chicago, in the Corn (maize) Belt
    • View Profile
Re: Display suggestion: replace pie chart
« Reply #4 on: March 31, 2015, 02:26:19 PM »
I'm not sure if you're being a little sarcastic here, TRex, but I have to admit that rounding numbers is pretty simple (especially to a whole number) and it's sheer laziness on my part not to be doing it already.

No sarcasm intended. When I last programmed, it was necessary to get a couple of more points past the decimal than was to be used, parse the numbers, and create multiple IFs to account for the various possibilities. Just truncating an answer was a LOT easier.

I must say, I'm impressed with your use of the word virgule for the "/" sign.

Nothing to be impressed about. It was just the word I was taught many years ago.

TRex

  • Eulexic
  • ***
  • Posts: 2041
  • ~50 miles from Chicago, in the Corn (maize) Belt
    • View Profile
Re: Display suggestion: replace pie chart
« Reply #5 on: May 03, 2015, 02:30:36 AM »
Thanks, Alan!

Alan W

  • Administrator
  • Eulexic
  • *****
  • Posts: 4968
  • Melbourne, Australia
    • View Profile
    • Email
Re: Display suggestion: replace pie chart
« Reply #6 on: May 03, 2015, 09:54:06 AM »
In case anyone is wondering what TRex is thanking me for, the percentage of common words displayed when the mouse hovers over the pie chart is now shown to one decimal place - and it's rounded, not truncated!
Alan Walker
Creator of Lexigame websites

a non-amos

  • Glossologian
  • **
  • Posts: 1053
    • View Profile
Re: Display suggestion: replace pie chart
« Reply #7 on: May 04, 2015, 12:38:36 PM »
By the way, the easy way to do rounding on a system that does not support rounding: add 0.5 and truncate.

A variation of this method can be useful in other calculations.  If your intermediate result is 1.49999 (with the 9 repeating) this is mathematically equal to 1.5 (it is another representation of the same number) but this representation will round to 1 instead of 2.  This can be a real bother, especially when it is glaringly obvious that the computer is rounding incorrectly.  The solution is to add 0.50000001 and truncate.

The next question is where to put the 1.  If you know that your calculation will yield a result to only 4 decimals, you can put the 1 in the 5th decimal (or anywhere after that).  If you are uncertain how many decimals your calculation will yield, put the 1 in the second to last decimal place that is supported by your system.

It is counterintuitive that adding what looks like a small error can make the end result more accurate.  In reality, this counteracts small inaccuracies that are inherent in the system.

If you want to round to one decimal (rounding to the nearest tenth), multiply by 10 and then do the rounding and then divide by 10.

In general terms, multiply by (10^<number of places to the right of the decimal>) and then do the rounding and then divide by the same number.  This also works for rounding to the nearest 10s or 100s (number of digits to the right of the decimal is -1 or -2).

On the original topic, I like having the pie chart.  It's easy to observe progress from across the room.  If people want numbers and/or fractions that's OK too, but I like the pie chart.

- A
Carpe digitus.
(Roughly translated, this is possibly the world's oldest "pull my finger" joke)

Calilasseia

  • Cryptoverbalist
  • *
  • Posts: 523
  • Pass the dissection kit ...
    • View Profile
Re: Display suggestion: replace pie chart
« Reply #8 on: December 04, 2015, 09:17:46 PM »
If you're looking for a rounding function in JavaScript that will round properly toward the correct integer (in both positive and negative cases), then you'll need this code from my little file of helper functions ...

Code: [Select]

//Since there isn't yet a Math.sgn() function, we'll make our own and include it here ...

function User_Sgn(arg)
{
var tmp = 0;

if (arg < 0)
tmp = -1;

if (arg > 0)
tmp = 1;

return(tmp);

//End function
}


//Likewise, we'll create a version of Math.round() that is more in keeping with proper rounding ...

function User_Round(arg)
{

var sign = User_Sgn(arg);
var mag = Math.abs(arg);
var result = Math.round(mag)*sign;

return(result);
}

Remember: if the world's bees disappear, we become extinct with them ...