Please forgive me if this is my error as i've only been using the API
2 days but I seem to have found a bug with the x axis labelling in
both Firefox 3.0.1 and IE 7.

With the following code, it's basically the same chart 4 times on the
same page, the first two render correctly, the remaining n charts
default to a much larger size with the labels overlapping themselves.

<html>
<head>
<script type="text/javascript" src="http://www.google.com/jsapi";></
script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["columnchart"]});
google.setOnLoadCallback(drawChart);
function drawChart()
{
        var data = new google.visualization.DataTable();
        data.addColumn('string', 'Value')
        data.addColumn('number', 'Self');
        data.addColumn('number', 'Boss');
        data.addColumn('number', 'Peer');
        data.addColumn('number', 'Staff');

        data.addRows(4);

        data.setValue(0, 0, 'When designing and managing systems\nand
processes puts patients first');
        data.setValue(0, 1, 3);
        data.setValue(0, 2, 2);
        data.setValue(0, 3, 1);
        data.setValue(0, 4, 0);


        data.setValue(1, 0, 'Shows clear appreciation of how\ntheir role can
improve patient care');
        data.setValue(1, 1, -2);
        data.setValue(1, 2, -4);
        data.setValue(1, 3, 2);
        data.setValue(1, 4, 1);


        data.setValue(2, 0, 'Provides needed support to enable\ngood patient
care');
        data.setValue(2, 1, -1);
        data.setValue(2, 2, 0);
        data.setValue(2, 3, 3);
        data.setValue(2, 4, 2);


        data.setValue(3, 0, 'Consistently looks for ways to\nimprove patient
care');
        data.setValue(3, 1, -2);
        data.setValue(3, 2, 2);
        data.setValue(3, 3, 4);
        data.setValue(3, 4, 2);



        var chart = new google.visualization.ColumnChart
(document.getElementById('chart_div'));
        chart.draw(data,
        {
                width: 800, height: 600, is3D: false, title: 'Putting Patients
First', legend: 'right'
        });

        var chart2 = new google.visualization.ColumnChart
(document.getElementById('chart_div2'));
        chart2.draw(data,
        {
                width: 800, height: 600, is3D: false, title: 'Putting Patients
First', legend: 'right'
        });

        var chart3 = new google.visualization.ColumnChart
(document.getElementById('chart_div3'));
        chart3.draw(data,
        {
                width: 800, height: 600, is3D: false, title: 'Putting Patients
First', legend: 'right'
        });

        var chart4 = new google.visualization.ColumnChart
(document.getElementById('chart_div4'));
        chart4.draw(data,
        {
                width: 800, height: 600, is3D: false, title: 'Putting Patients
First', legend: 'right'
        });


}
</script>


<style>
div{
        page-break-after: always
}

</style>

</head>
<body>
<div id="chart_div"></div><br><hr/><br>

<div id="chart_div2"></div><br><hr/><br>

<div id="chart_div3"></div><br><hr/><br>

<div id="chart_div4"></div><br><hr/><br>

</body>
</html>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to