Hi Ken,
It appears that my initial diagnosis was correct, and
$.csv.hooks.castToScalar doesn't properly cast boolean values. However, the
solution I proposed wouldn't have worked either, since it csv.toArrays
appear to ignore the value entirely when you return false. At this point,
you basically have three options:
1. Explicitly iterate over your chartTbl 2D array and replace the string
'false' and 'true' with their boolean counterparts
for (var i = 0; i < chartTbl.length; i++) {
var row = chartTbl[i];
for (var j = 0; j < row.length; j++) {
if (row[j] === 'false') {
row[j] = false;
} else if (row[j] === 'true') {
row[j] = true;
}
}
}
2. Figure out how to get castToScalar to return false without it being
ignored.
3. Use our google.visualization.Query.I attached solutions 1 and 3 for you. Personally, I'd go with solution #3. On Tue Dec 09 2014 at 1:38:54 PM Ken Burkhalter <[email protected]> wrote: > > > On Monday, December 8, 2014 5:24:39 PM UTC-5, Sergey wrote: > >> Hi Ken, >> >> It's really difficult to read your code. Please *attach* the HTML and >> CSV file, or at least a sample of the CSV file, so that I can copy/paste >> them into my own environment. >> >> As for the discontinuity in your alert, it appears that Chrome truncates >> the text somewhere in the middle (look at the line for value 5.71). >> > > Sergey - My apologies. I misunderstood your prior request for "attached" > code to mean "insert it inline with the post, and not an image" > > The *code* is attached this time! :-) > > Along with the *csv file* I have been using for testing. That should > make any testing you do identical to my environment, which may make a > difference because as far as I can determine I have the same code as you > posted in the jsfiddle area but I am not getting any indication of the > "uncertainty" dashed lined that should be showing after 14:00 hours on the > chart. > > This is my current output chart... > > <https://lh5.googleusercontent.com/-EzoC6JUBwas/VIc_KBvJCHI/AAAAAAAACe8/AdSs5xkP2A4/s1600/graph.png> > > > Note that, for testing purposes, in my code I have inserted in lines 19 an > alert message to show the contents of the CSV table originally constructed > by csv.toArrays, and then in lines 32-33 a reverse transformation from > dataTable back to CSV to verify the integrity of the original translation. > It appears that the true/false contents are correctly being handled, so I > did not implement your suggested custom converter for the jQuery CSV parser. > > Hopefully with this exchange we can put the final nail in the coffin, and > solve the last part of the mystery. > [:-)} > > Thank you. > > -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to > [email protected]. > Visit this group at > http://groups.google.com/group/google-visualization-api. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
<<< text/html; charset=UTF-8; name="Chart-casting.html": Unrecognized >>>
--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.
