I have tested with
var stylewert = {'style:' 'background-color: green;'};
or
var stylewert = {style: 'background-color: green;'};
but the setting
data.setProperties ( j, i, stylewert );
Hallo,
Ich möchte mit einem DataTable:
<html>
<head>
<Script type = "text / javascript" src = "http://www.google.com/
JSAPI '> </ script>
<script type='text/javascript'>
google.load ('Visualisierung', '1 ', {Pakete: [' table']});
google.setOnLoadCallback (drawMap_table_div);
Funktion drawMap_table_div () {
var data = new google.visualization.DataTable ();
...
for (var j = 0; j <<php echo $ zeilen_table_div>;? j + +)
{
for (var i = 0; i <<php echo $ spalten_table_div>;? i
+ +)
{
switch (spaltentyp_table_div [i])
{
Bei "string":
count = count +1;
var text = zellenwert_table_div [count];
data.setCell (j, i, text);
var stylewert = stylewert_table_div [count];
data.setProperties (j, i, {'style':
'Background-color: green;'});
count = count +1;
break;
Bei "Zahl":
var pos = parseFloat
(Zellenwert_table_div [count]);
var text = zellenwert_table_div [count +1];
data.setCell (j, i, pos, text);
var stylewert = stylewert_table_div [count +1];
data.setProperties (j, i, {'style':
'Background-color: green;'});
count = count +2;
break;
}
}
}
...
und stellen Sie die Eigenschaften von Zellen via data.setProperties. Kein
Problem, wenn ich
den Stil fest verbrannt via {'style': 'background-color: green;'}.
Aber wie kann ich die Eigenschaften von Variablen basiert?
data.setProperties
(J, i, stylewert); nicht funktionieren. Bitte helfen Sie.
is ignored, without any error message. Any ideas? Thanks.
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/M6LkjPKavJkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.