I use python, JSON ,and Google Visualization to get the data and create an
HTML output (please see below). The problem that I have is I would like to
add a tooltip to one of my table's columns to show a description. However,
when I added "{"type":"string","role":"tooltip"}" as of my last column, it
add that information as a last column not a hidden tooltip. I appreciate
if you can help me on that.
Thanks
<html>
<script src="https://www.google.com/jsapi"
type="text/javascript"></script>
<script>
google.load('visualization', '1', {packages:['table']});
google.setOnLoadCallback(drawTable1);
function drawTable1() {
var json_table = new
google.visualization.Table(document.getElementById('table_div_json1'));
var json_data = new
google.visualization.DataTable({"rows":[{"c":[{"v":"FNTX_BSRF_ML_PSI"},{"v":977.72},{"v":978.31},{"v":0.992},{"v":-0.0},{"v":"This
is a
Test"}]},{"c":[{"v":"FNTX_MDL_US_PSI"},{"v":398.81},{"v":399.01},{"v":0.992},{"v":-0.0},{"v":"This
is a
Test"}]},{"c":[{"v":"FNTX_MDL_DS_PSI"},{"v":391.55},{"v":391.36},{"v":0.992},{"v":-0.8309},{"v":"FNTX_BSRF_ML_PSI"}]},{"c":[{"v":"FNTX_WHEL_US_PSI"},{"v":245.45},{"v":244.46},{"v":0.991},{"v":0.0},{"v":"FNTX_BSRF_ML_PSI"}]},{"c":[{"v":"FNTX_WHEL_DS_PSI"},{"v":1287.86},{"v":1287.62},{"v":0.991},{"v":-0.0},{"v":"FNTX_BSRF_ML_PSI"}]},{"c":[{"v":"FNTX_ORLA_ML_PSI"},{"v":35.77},{"v":36.17},{"v":0.99},{"v":0.0},{"v":"FNTX_BSRF_ML_PSI"}]}],"cols":[{"type":"string","id":"Pressure
Transmitter","label":"Pressure Transmitter"},{"type":"number","id":"Value
(Trainer)","label":"Value (Trainer)"},{"type":"number","id":"Value
(Leakdetc)","label":"Value (Leakdetc)"},{"type":"number","id":"Confidence
(Leakdetc)","label":"Confidence (Leakdetc)"},{"type":"number","id":"Error
(Trainer & Leakdetc)","label":"Error (Trainer &
Leakdetc)"},{"type":"string","role":"tooltip"}]}, 0.6);
var formatter = new google.visualization.ColorFormat();
formatter.addRange(0, 0.4, 'white', 'orange');
formatter.format(json_data, 3);
var options = {'showRowNumber': true};
options['width'] = 600;
options['height'] = null;
options['page'] = 'enable';
options['pageSize'] = 25;
options['pagingSymbols'] = {prev: 'prev', next: 'next'};
options['pagingButtonsConfiguration'] = 'auto';
options['allowHtml'] = true;
json_table.draw(json_data, options);
}
</script>
<body>
<H1 align ="center">Confidence and Value check - </H1>
<table align="center">
<tr valign ="top">
<td style="width:30%">
<div id="table_div_json1" style="width:550"></div>
</td>
</tr>
</table>
</body>
</html>
--
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.