Talk:Sparkline in unicode: Difference between revisions

Content added Content deleted
Line 111: 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.
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 size determines the position of '''all the bin breaks'''), 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 defined ... To define the expected output, we would have to define the difference between the range of the sparkline and the range of the data,
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 dimension 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 determinate ... 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.
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 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 :-)
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.
We simply haven't clarified the terms of the task to the point where a single correct output is defined for edge cases.