marcomachadosantos / gwt-chronoscope

Automatically exported from code.google.com/p/gwt-chronoscope
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Missing visualization on null value #118

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Replicate your code at http://timepedia.org/chronoscope/docs/gviz/
2. Remove the first value in cell (0,1)
3. View visualization, no value drawn

What is the expected output? What do you see instead?

(When I say "initial", I am referring to the starting time point. When I
say "middle", I am referring to a time point in the middle of the time
range. When I say "end", I am referring to the last time point of the time
range)

I expect to see the remaining points drawn and plotted. Instead, I see
nothing displayed at all for the column that is missing a starting value.

I tested this with google's line chart viz
(http://code.google.com/apis/visualization/documentation/gallery/linechart.html)
and even if I remove an initial starting value, I will be able to see the
remaining points plotted and connected.

On a side note, if I remove a value in the middle or at the end, there is
no problem.

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by dans...@gmail.com on 13 Apr 2009 at 6:35

GoogleCodeExporter commented 8 years ago
Google's Line Chart viz does not do denominations at the minute/second interval 
and
therefore, I am looking to implement your chronograph as it is much better in 
dealing
with this.

Original comment by dans...@gmail.com on 13 Apr 2009 at 6:37

GoogleCodeExporter commented 8 years ago
Can you describe step by step how you created the project please ?
That would help in understanding what's going on.

Original comment by pkirklew...@gabaedevelopment.com on 13 Jun 2009 at 8:17

GoogleCodeExporter commented 8 years ago
Okay let's say here is my data set:

DateTime   |    Product 1    | Product 2
xxxx:xx:xx       xx               xx
xxxx:xx:xx       xx               xx
xxxx:xx:xx       xx               xx
xxxx:xx:xx       xx               xx
xxxx:xx:xx       xx               xx
xxxx:xx:xx       xx               xx

This will product a perfect chronoscope plot.

However, let's say this is another set of data I am trying to plot:

DateTime   |    Product 1    | Product 2
xxxx:xx:xx       xx               
xxxx:xx:xx       xx               xx
xxxx:xx:xx       xx               xx
xxxx:xx:xx       xx               xx
xxxx:xx:xx       xx               xx
xxxx:xx:xx       xx               xx

Now, if you tried to draw this visualization, product 2 would not be displayed 
at all.

Original comment by dans...@gmail.com on 15 Jun 2009 at 3:42

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
in org.timepedia.chronoscope.client.data.DatasetRequest
      line:91
      // Make sure all double[] elements are the same length
      final int domainLength = domainData.length;
      for (int i = 0; i < rangeTupleData.size(); i++) {
        double[] tupleSlice = rangeTupleData.get(i);
        int currLength = tupleSlice.length;
        if (currLength != domainLength) {
          throw new IllegalArgumentException("tupleData[" + i + "].length=" + 
              currLength + " but domainData.length=" + domainLength);
        }
      }
      line 139:
      // Verify that multiDomain and multiRange have same number
      // of elements at each level
      for (int i = 1; i < mipmappedRangeTupleData.size(); i++) {
        Array2D mipmappedTupleSlice = mipmappedRangeTupleData.get(i);
        if (!mipmappedTupleSlice.isSameSize(mipmappedDomainData)) {
          throw new IllegalArgumentException(
              "i=" + i + ": domain and range mipmaps differ in size");
        }
      }
   has two method to check date's length.
   When they have differen length,it will throw exception and display nothing.
   I think it is designer's purpose here.

Original comment by huangron...@gmail.com on 12 Jan 2011 at 7:23

GoogleCodeExporter commented 8 years ago
Thanks for looking into this. 

Perhaps the designer meant it to perform as so, however when you look at it 
realistically from a user standpoint and data point of view, it should not 
throw an exception. Seems like a flaw that should be fixed.

Original comment by dans...@gmail.com on 12 Jan 2011 at 7:26

GoogleCodeExporter commented 8 years ago
DatasetRequest is dealing with a domain and range array that is expected to be 
the same length because otherwise it's not clear which range values go with 
which domain values.  Consider:

"domain" = [1, 2, 3, 4],
"range" = [10, 20, 40]

Is the value 40 for the third or the fourth point of the domain?

If I remember, the gviz secondary column gaps are dealt with by inserting NaN 
(not a number) where there are gaps, eg:

"range" = [10, 20, NaN, 40] 

If it only fails for leading gaps then inserting leading NaNs might work, will 
look into it.

Original comment by timepedia@gmail.com on 28 Jan 2011 at 6:43