Jump to content

Talk:Sparkline in unicode: Difference between revisions

m
Line 111:
The range of the diagram can be close to that of the data, but it '''can't''' be co-extensive. It '''has''' to be bigger if it is not going to exclude a minimum or maximum data point.
 
How much bigger ? Well the margin can be an epsilon, but it can't be zero without losing at least one data point from the sparkline. As the task description doesn't define the size of this non-zero margin (and its precise sizedimension determines the position of '''all the bin breaks''' and the precise size of all the bins), I '''don't''' think that we can really give a test case like test 2 above, and define what the output should be. It isn't yet defineddeterminate ... To define the expected output, we would have to define the difference between the range of the sparkline and the range of the data,
 
We would also have to define whether there was a margin at both ends of the scale or only at one end.
 
If we try to fudge it with a special case for points that should formally have been dropped off one end or other of the scale, then we are simply saying that we do know that the range of the diagram is really bigger than that of the data, but we don't want to define by how much. That means that the precise size of each bin, and the precise location of all the edges, is also undefined. All we really know about them is that they are '''definitely not''' quite where we have drawn them :-)
 
We simply haven't clarified the terms of the task to the point where a single correct output is defined for edge cases.
9,655

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.