The title said it all, i am using the google pie chart and i would like to
add a border arround the main area background. For the moment my idea is to
ditch the pie chart pis adding a black box with css behind the pie chart
div.
To be clear, i have a background image on the html page, on this page i
have the pie chart. I want a border around the pie chart to make a split
between the pie chart main area background and the page background.
}}
I google this question a lot but nothing seem good for my situation, maybe
its just my way that dosent work. I found these potential solution so far :
Use the mainArea.backgroundcolor.strock and .....color.strockwidth to set
color and width (didnt work when i tried to add it to the var option =
{..... code... }
My code is the following :
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
<meta charset="utf-8">
<!--Load the AJAX API-->
<script type="text/javascript"
src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
// Load the Visualization API and the piechart package.
google.load('visualization', '1.0', {'packages':['corechart']});
// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawChart);
// Callback that creates and populates a data table,
// instantiates the pie chart, passes in the data and
// draws it.
// get the php result
var countra1=parseInt(<?php echo json_encode($num_ra1); ?>) || 0;
var countrf2=parseInt(<?php echo json_encode($num_rf2); ?>) || 0;
var countni3=parseInt(<?php echo json_encode($num_ni3); ?>) || 0;
function drawChart() {
// Create the data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Réponse');
data.addColumn('number', 'Choix');
data.addRows([
['reduire affecter', countra1],
['reduire façon', countrf2],
['non important', countni3],
]);
// Set chart options
var options = {backgroundColor: '#bfbfbf',
'title':'votre opinion',
'width':660,
'height':495};
// Instantiate and draw our chart, passing in some options.
var chart = new
google.visualization.PieChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
--
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/c9906e9d-fe34-4a6b-8529-531250bb408f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.