Make charts online using the Google Chart APIするチャートは、 GoogleチャートAPIを使用してオンライン

Posted on December 1, 2008 at 5:34 am 12月1日、午前5:34に2008年に投稿

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. 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それに動作します。

Here is an actual example of aここでの実際の例です。 chart created using Google Chart API GoogleのチャートAPIを使用してグラフを作成 :

イメージ

You can see that the chart was generated using a simple URL parameter manipulation:あなたは、そのチャートは、単純な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: ( chd chtは、少なくとも3つのパラメータで、 chl )に設定するためのグラフを生成することができます。以下にこれらのパラメータにする手順は:

Step 1: Define the Chart Type: cht ステップ1 : [グラフの種類を定義: cht

First you will need to define what type of chart you want.  A listing of all available chart types are located here:まず最初に使用するグラフの種類を定義する必要があります。すべての利用可能なグラフの種類のリストはここにあります: 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.この例では、私たち= p3は円グラフですchtが使用されますが作成されます。バーや折れ線グラフのように他の種類のチャートを作るには、チャートの種類と対応chtパラメータの値を参照する。

Step 2: Define the parameter for data and labels: chd and chl ステップ2 :データとラベルのためのパラメータ:定義chdとchl

For example, we want to chart the distribution of each of the four brands below:例えば、以下の4つのブランドのそれぞれの分布グラフに思う:

  1. BrandX=40 BrandX = 40
  2. BrandY=30ブランデー= 30
  3. BrandZ=20 BrandZ = 20
  4. BrandA=10 BrandA = 10

The data (chd) parameter will be: chd=t:40,30,20,10のデータを( )のパラメータになるchd : chd =トン: 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:注:この例ではテキストのエンコードを使用するように私を選んだ。下記のリンクをクリックして、他の種類のエンコーディングを使用するには: http://code.google.com/apis/chart/formats.html

The label parameter (chl) is chl=BrandX,BrandY,BrandZ,BrandAラベルのパラメータ( chl ) = BrandX 、ブランデー、 BrandZ 、 BrandA chlです

The label parameter values are comma delimited and should have the same number of values as the data parameter.パラメータの値をカンマ区切りのラベルとは、データの値のパラメータとして同じ番号が必要です。

Step 3: Define the size of the chart in pixel ステップ3 :ピクセルで、チャートのサイズを定義

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このフォーマットは、単純なchs=<width in pixels>x<height in pixels>のでチャートがある場合は250X100するには、我々はこのように言え: chs = 250X100

Step 4: Put the parameters together ステップ4 :一緒にパラメータを付ける

Append the parameters to the main URL:メインのURLには、パラメータを追加: http://chart.apis.google.com/chart? http://chart.apis.google.com/chartか?

+ parameter from step 1 + “&” + parameter from step 2 + “&” parameter from step 3 +ステップ1からパラメータ+ " & " + パラメータのステップ2から+ " & " パラメータは、手順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:は、 Webサービスのパラメータの順序としては、アンパサンド文字で区切ります限り" & "は重要ではありません注意してください。以下の例を参照してください:

http://chart.apis.google.com/chart?cht=p3&chd=t:40,30,20,10&chs=250×100&chl=BrandX|BrandY|BrandZ|BrandA http://chart.apis.google.com/chart?cht=p3&chd=t:40 、 30,20,10 & chs = 250 × 100 & chl = BrandX |ブランデー| BrandZ | BrandA

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.これはユーザーが簡単にGoogleのチャートAPIを使用して動的なグラフを作成することができますはっきりしている。これは、 Webプロジェクトの複雑なチャートのソリューションを購入したくないユーザーに最適です。

Ben Carigtan shows you how it’s done.ベンCarigtanどのように行うのが表示されます。

Enjoyed this post?この投稿を楽しんだか? Subscribe to Online Tech Tips viaチャンネル登録オンライン技術のヒントを経由 RSS Feed RSSフィード or viaまたは経由 Emailメール and receive free daily productivity tips.日々の生産性のヒントと受信は無料。

» Filed Under »ファイルの下で Google Software/Tips Googleソフトウェア/ヒント

おいしいに追加 Save this page このページを保存 Mixxは、 Stir it up on Mixx かき混ぜるそれをミックス
しかし Add to Reddit しかしに追加 StumbleUponの Stumble this page このページつまずく

Related Posts 関連記事

Please post your comments/suggestions! コメントを投稿してください/ご提案!