How do you set the fontName and fontSize for the tooltip? seems to
be inheriting something from my styles but I am not sure what....
chart.php
<?php
$data = array(10,11,12,13,14,15,16,17,18,19,20,21);
$tooltip = array(
'<b>CINE blah blah blah <br> blah blah blah blah blah</b>',
"blah blah 2",
" blah blah 3",
" blah blah 4",
"blah blah 5",
"Cblah blah 6",
"blah blah 7",
"blah blah 8",
"blah blah 9",
"blah blah 10",
"blah blah 11",
"blah blah 12",
);
$title = 'results';
$vAxis = "% correct";
$hAxis = 'Question';
$color = 'blue';
?>
<html>
<head>
<script type="text/javascript"
src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
data = new google.visualization.DataTable()
data.addColumn('string', 'Date');
data.addColumn('number');
data.addColumn({'type': 'string', 'role': 'tooltip', 'p': {'html':
true}});
<?php for ($x = 0; $x < 12; $x++) {
echo "data.addRow();\n";
echo "data.setValue(".$x.", 0, 'session 1');";
echo "data.setValue(".$x.", 1, ".$data[$x].");";
echo 'data.setValue('.$x.', 2, "'.$tooltip[$x].'");';
} ?>
var options = {
colors: ['<?php echo $color; ?>'],
width: '100%', height: '80%',
tooltip: {isHtml: true, textStyle:{fontName:"arial"}},
chartArea: {'width': '80%', 'height': '70%'},
is3D: true,
isStacked: true,
legend: {position: 'none'},
vAxis: {title: "<?php echo $vAxis; ?>",titleTextStyle: {color:
'red'}},
hAxis: {slantedText:true, title: '<?php echo $hAxis; ?>',
titleTextStyle: {color: 'red'}}
};
var chart = new
google.visualization.ColumnChart(document.getElementById('chart_div'));
chart.draw(data,options);
}
</script>
</head>
<body>
<div id="chart_div" style="width: 900px; height: 500px;"></div>
</body>
</html>
Thanks
Ted.
On Tuesday, September 25, 2012 4:04:19 AM UTC-4, visigoth wrote:
>
> We have pushed a new release to production.
>
> Documentation (and the release notes page) will soon be updated to
> reflect the changes made in this release.
> In the meantime, here is a short overview of what has been introduced:
>
> *Prominent changes*
>
> - *HTML Tooltip* - Support for custom HTML tooltip content for data
> points, categories and annotations (certain core charts only).
> - *Look Mom, No IFrame!* - With the exception of IE 8, charts are no
> longer drawn inside an IFrame by default. If you're feelin' retro you can
> bring it back by setting the option forceIFrame: true.
>
>
> *Other changes*
>
> - Removed the strictFirstColumnType option. As you recall this was a
> temporary remedy for backward compatibility. Please refer to this
> help<https://developers.google.com/chart/interactive/docs/customizing_axes#Help>section
> for proper solutions.
> - *GeoChart*: New option, tooltip.trigger, which works the same way as
> in the core charts.
> - *GeoChart*: Improved border colors.
> - *ChartRangeFilter*: You can now leave the control area while
> panning/zooming.
> - *ChartRangeFilter*: Fixed occasional crash when moving one handles
> over another.
> - Significant performance improvements when drawing charts with a
> domain axis of type date.
>
> Enjoy,
> The Google Chart Tools team
>
--
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/-/eQL-HM0fgMAJ.
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.