Ciekawe narzędzie, ale coś jest z nim nie tak.
Jeśłi odpalimy sobie taki np kod:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="content-type" content="text/html; charset=iso-8859-2"/>
Google Visualization API Sample
<script type="text/javascript" src="http://www.google.com/jsapi">
<script type="text/javascript"> google.load('visualization', '1',
{packages: ['piechart']});
<script type="text/javascript"> function drawVisualization() {
// Create and populate the data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Month');
data.addColumn('number', 'Sales');
data.addRows([
['January',{v:20, f:'$20M'}],
['February',{v:31, f:'$31M'}],
['March',{v:61, f:'$61M'}],
['April',{v:26, f:'$26M'}],
['January',{v:20, f:'$20M'}],
['February',{v:31, f:'$31M'}],
['March',{v:61, f:'$61M'}],
['April',{v:26, f:'$26M'}]
]);
// Create and draw the visualization.
new google.visualization.PieChart(
document.getElementById('visualization')).
draw(data, {is3D:true});
}
google.setOnLoadCallback(drawVisualization);
<body style="font-family: Arial;border: 0 none;font-size:20px;"> style="width: 300px; height: 300px;">
Wszystko gra, ale jak zmienimy wartość January na coś innego np tak:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="content-type" content="text/html; charset=iso-8859-2"/>
Google Visualization API Sample
<script type="text/javascript" src="http://www.google.com/jsapi">
<script type="text/javascript"> google.load('visualization', '1',
{packages: ['piechart']});
<script type="text/javascript"> function drawVisualization() {
// Create and populate the data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Month');
data.addColumn('number', 'Sales');
data.addRows([
['Wojciech Bek',{v:20, f:'$20M'}],
['February',{v:31, f:'$31M'}],
['March',{v:61, f:'$61M'}],
['April',{v:26, f:'$26M'}],
['January',{v:20, f:'$20M'}],
['February',{v:31, f:'$31M'}],
['March',{v:61, f:'$61M'}],
['April',{v:26, f:'$26M'}]
]);
// Create and draw the visualization.
new google.visualization.PieChart(
document.getElementById('visualization')).
draw(data, {is3D:true});
}
google.setOnLoadCallback(drawVisualization);
<body style="font-family: Arial;border: 0 none;font-size:20px;"> style="width: 300px; height: 300px;">
To kod wariuje i czcionka z 11px spada do 5px i nic z tym nie idzie zrobić chyba, żeby się bawić w buforowanie kodu wynikowego i podmienianie
stringów ale to dziwne obejście by było.
Ktoś wie dlaczego tak się dzieje, lub jak ustawić na sztywno wielkość czcionki bo w stylach się nie da ?