Make charts online using the Google Chart API Fare i grafici online utilizzando l'API di Google Chart
Posted on December 1, 2008 at 5:34 am Pubblicato in data 1 dicembre 2008 a 5:34 am
The Google Chart API is a web service that you can connect to quickly generate charts for your blogs or websites. Since it is a web service, you will not have to install anything in your web server. All you need is a basic understanding on how it works. Google Chart API è un servizio Web che è possibile collegarsi rapidamente a generare i grafici per il tuo blog o siti web. Dato che si tratta di un servizio web, non dovrete installare nulla nel vostro server web. Tutto ciò di cui hai bisogno è una comprensione di base su come funziona.
Here is an actual example of a Ecco un esempio reale di un chart created using Google Chart API grafico creato con Google Chart API :
You can see that the chart was generated using a simple URL parameter manipulation: Potete vedere che il grafico è stato generato con una semplice manipolazione del parametro URL:
There are at least 3 parameters ( cht, chd and chl ) to set to be able to generate a chart. Below are the steps to make those parameters: Ci sono almeno 3 parametri (CHT, CHD e ChL) per impostare essere in grado di generare un grafico. Di seguito sono riportate le misure necessarie per rendere tali parametri:
Step 1: Define the Chart Type: cht Fase 1: Definire il tipo di grafico: CHT
First you will need to define what type of chart you want. A listing of all available chart types are located here: In primo luogo è necessario definire il tipo di grafico che si desidera. Un elenco di tutti i tipi di grafici disponibili si trovano qui: http://code.google.com/apis/chart/types.html
In the example that we will create, we will use cht=p3 which is a pie chart. To make other types of charts like bar or line charts, just browse the types of charts and put in the corresponding cht parameter value. In questo esempio che creeremo, useremo cht = P3, che è un grafico a torta. Per fare altri tipi di grafici come bar o linea di grafici, solo sfogliare i tipi di grafici e mettere in cht il corrispondente valore del parametro.
Step 2: Define the parameter for data and labels: chd and chl Passo 2: Definire il parametro per i dati e le etichette: CHD e ChL
For example, we want to chart the distribution of each of the four brands below: Ad esempio, vogliamo grafico della distribuzione di ciascuna delle quattro marche di seguito:
- BrandX=40 BrandX = 40
- BrandY=30 Brandy = 30
- BrandZ=20 BrandZ = 20
- BrandA=10 Branda = 10
The data (chd) parameter will be: chd=t:40,30,20,10 I dati (CHD) parametro sarà: CHD = t: 40,30,20,10
Note: In the example I chose to use Text Encoding. To use other types of encoding click on the link below: Nota: In questo esempio ho scelto di usare la codifica del testo. Per utilizzare altri tipi di codifica fare clic sul link qui sotto: http://code.google.com/apis/chart/formats.html
The label parameter (chl) is chl=BrandX,BrandY,BrandZ,BrandA L'etichetta parametro (ChL) è ChL = BrandX, brandy, BrandZ, Branda
The label parameter values are comma delimited and should have the same number of values as the data parameter. L'etichetta valori dei parametri sono delimitati da virgola e dovrebbe avere lo stesso numero di valori come parametro i dati.
Step 3: Define the size of the chart in pixel Fase 3: Definire le dimensioni del grafico in pixel
The format is a simple chs=<width in pixels>x<height in pixels> , so if we want to have a 250X100 chart, we put it like this: chs=250X100 Il formato è un semplice chs=<width in pixels>x<height in pixels> quindi se vogliamo avere un 250X100 grafico, abbiamo messo in questo modo: CHS = 250X100
Step 4: Put the parameters together Fase 4: Metti insieme i parametri
Append the parameters to the main URL: Aggiungi i parametri per l'URL principale: http://chart.apis.google.com/chart?
+ parameter from step 1 + “&” + parameter from step 2 + “&” parameter from step 3 + Parametro dal passo 1 + "&" + parametro dal punto 2 + "e" parametro la procedura dal punto 3
Note that the order of parameters in web services is not important as long as you separate them with the ampersand character “&”. See example below: Si noti che l'ordine dei parametri di servizi web non è importante quanto tempo separarle con ampersand il carattere "&". Vedere il seguente esempio:
It is clear that users can easily create dynamic charts using Google Chart API. This is ideal for users who don’t want to buy complex charting solutions for their web projects. E 'chiaro che gli utenti possono facilmente creare grafici dinamici utilizzando Google Chart API. Questo è ideale per gli utenti che non vogliono comprare complesse soluzioni grafiche per i loro progetti web.
Ben Carigtan shows you how it’s done. Ben Carigtan vi mostra come è fatto.
» Filed Under »Archiviato in Google Software/Tips Il software Google / suggerimenti
Save this page Salva questa pagina | Stir it up on Mixx Mescolare fino a Mixx | |
Add to Reddit Aggiungi al Reddit |
Related Posts Related Interventi
- How to make YouTube videos smaller Come rendere più piccoli i video di YouTube
- Excel Tutorial - How to make a simple graph or chart in Excel Excel Tutorial - Come fare un semplice grafico o grafico di Excel
- How to make a graph on excel Come fare un grafico su Excel
- GenerateData - Free online test data generator GenerateData - Disponibile on-line i dati di test generatore
- Multiple find and replace of content using Grep Multiple di ricerca e sostituzione di contenuti utilizzando Grep






















