我正在使用谷歌图表创建折线图。我在谷歌搜索下面有这些代码。如何为这些代码行添加线条样式(虚线)的属性?
$sth = mysql_query("SELECT * FROM table");
$rows = array();
//flag is not needed
$flag = true;
$table = array();
$table['cols'] = array(
array('label' => 'Month', 'type' => 'string'),
array('label' => 'a', 'type' => 'number'),
array('label' => 'b', 'type' => 'number'),
array('label' => 'c', 'type' => 'number'),
array('label' => 'd', 'type' => 'number')
);
$rows = array();
while($r = mysql_fetch_assoc($sth)) {
$temp = array();
$temp[] = array('v' => (string) $r['Month']);
// Values of each slice
$temp[] = array('v' => $r['a']);
// Values of each slice
$temp[] = array('v' => $r['b']);
// Values of each slice
$temp[] = array('v' => $r['c']);
// Values of each slice
$temp[] = array('v' => $r['d']);
$rows[] = array('c' => $temp);
}
$table['rows'] = $rows;
$jsonTable = json_encode($table);
//echo $jsonTable;