Skip to main content link. Accesskey S
  • Log In
  • Help
  • IBM Logo
  • IBM Mashup Center wiki
  • All Wikis
  • All Forums
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • IBM Redbooks
Community Articles Product Documentation Learning Center IBM Redbooks This category IBM Mashup Center 3.0.0.1 Documentation Custom Search Scope...
Search
Product Documentation > Chart
  • New Article
  • Share Show Menu▼
  • Subscribe Show Menu▼

About the Original Author

Anna G O'Neal
Contribution Summary:
  • Articles authored: 175
  • Articles edited: 274
  • Comments Posted: 34

Recent articles by this author

Maintaining page IDs when importing spaces

After exporting a space to one server and then importing that space to another server, you might notice that the original IDs for that space and all its pages and widgets change. In cases where you do not want the IDs to change, you can run a stableid import command to import the space ZIP file ...

Adding a custom widget to the mashup builder

You can add a custom widget to the mashup build directly from the Add to Mashup Builder window in the catalog. Do the following steps: 1. Open the catalog.xml file for the widget in edit mode, and add the line in italic font: definition ...

IBM Mashup Center Trial Edition, Version 3.0.0.1

This is an evaluation version of IBM Mashup Center, version 3.0.0.1. The product media contains all the functionality of a fully licensed version of IBM Mashup Center, except for the following limitations: This software is valid for 60 days from installation. This software is only available for ...

Date formats do not match browser settings for language

When browser settings for language are set to engb, certain widgets that display start and end dates of events might incorrectly display the dates in American English format ((MMDDYYYY)) instead of United Kingdom English format (DDMMYYYY). For example, when you view a series of events in the ...

Connecting to the Mashup Center WebDAV when working with themes and skins

This topic provides information on WebDAV, including how to connect to the file store to work with Page Builder 2 static resources.

Community articleChart

Added by Anna G O'Neal | Edited by IBM contributor Anna G O'Neal on March 25, 2009 | Version 29
expanded Abstract
collapsed Abstract
No abstract provided.
Tags: v1.1, widget, widgets
Original IBM content
English
Brazilian Portuguese
German
French
Japanese
Korean
Spanish
Simplified Chinese
Traditional Chinese
The Chart widget displays data in a bar, pie, or line chart. The Chart widget can receive and display data in either XML or comma-separated value (CSV) format. You can configure the Chart widget in many ways. For example, you can add titles both above and below the chart and change the style. You can manipulate the data by adding labels and values as well as exclude columns and rows from the data. You can also add labels to the axis titles as well as prefixes and suffixes to the axis values.

These are the sections covered in this article:

CSV data
XML data
Types of charts
Configuration tips
Events
Example scenario 1
Example scenario 2

Let's look more closely at the types of data that the Chart widget can display: XML and CSV.

Comma-separated value (CSV) data



Here is a sample of CSV data:

Vegetables,Y2005,Y2006,Y2007,Total|
Potato,19,18,20,57|
Onion,6,7,6,19|
Carrot,10,11,12,33|
Cabbage,9,9,6,24|
Total,44,45,44,133

It can also accept CSV data that has data types defined, for example:

Vegetables,Y2005,Y2006,Y2007,Total|
string,string,string,string,string|
Potato,19,18,20,57|
Onion,6,7,6,19|
Carrot,10,11,12,33|
Cabbage,9,9,6,24|
Total,44,45,44,133

To download a sample file of CSV data, click here.

XML data


When graphing XML data, the data can be in the form of a feed or a raw XML document. Example 1 is a sample of XML data that can be graphed by the chart. This XML document contains sample (fictional) revenue data for four companies:

Example 1



<?xml
version="1.0"?
 

<root
 

        <series
 

                <title
 
AIG</title
 

                <data
 

                        <quarter
 
Q1</quarter
 

                        <amount
 
100000</amount
 

                </data
 

                <data
 

                        <quarter
 
Q2</quarter
 

                        <amount
 
200000</amount
 

                </data
 

                <data
 

                        <quarter
 
Q3</quarter
 

                        <amount
 
130000</amount
 

                </data
 

                <data
 

                        <quarter
 
Q4</quarter
 

                        <amount
 
110000</amount
 

                </data
 
                       
        </series
 

        <series
 

                <title
 
COF</title
 

                <data
 

                        <quarter
 
Q1</quarter
 

                        <amount
 
200000</amount
 

                </data
 

                <data
 

                        <quarter
 
Q3</quarter
 

                        <amount
 
100000</amount
 

                </data
 

                <data
 

                        <quarter
 
Q4</quarter
 

                        <amount
 
150000</amount
 

                </data
 
                       
        </series
 

        <series
 

                <title
 
CSCO</title
 

                <data
 

                        <quarter
 
Q1</quarter
 

                        <amount
 
100000</amount
 

                </data
 

                <data
 

                        <quarter
 
Q2</quarter
 

                        <amount
 
77000</amount
 

                </data
 

                <data
 

                        <quarter
 
Q3</quarter
 

                        <amount
 
50000</amount
 

                </data
 

                <data
 

                        <quarter
 
Q4</quarter
 

                        <amount
 
30000</amount
 

                </data
 
                       
        </series
 

        <series
 

                <title
 
DELL</title
 

                <data
 

                        <quarter
 
Q1</quarter
 

                        <amount
 
100000</amount
 

                </data
 

                <data
 

                        <quarter
 
Q2</quarter
 

                        <amount
 
17700</amount
 

                </data
 

                <data
 

                        <quarter
 
Q4</quarter
 

                        <amount
 
150000</amount
 

                </data
 
                       
        </series
 

</root
 



Notice that certain quarter revenue data for is missing. In this case, the widget displays 0 for the missing quarter.

To download a sample XML document similar to Example 1, click here.

You can also format the data in the following way (see Example 2):

Example 2



<?xml version="1.0"?
 

<root
 

        <series
 

                <title
 
AIG</title
 

                <data
 

                        <quarter
 
Q1</quarter
 

                        <amount
 
100000</amount
 

                </data
 

        </series
 

        <series
 

                <title
 
AIG</title
 

                <data
 

                        <quarter
 
Q2</quarter
 

                        <amount
 
200000</amount
 

                </data
 

        </series
 

        <series
 

                <title
 
AIG</title
 

                <data
 

                        <quarter
 
Q3</quarter
 

                        <amount
 
130000</amount
 

                </data
 

        </series
 

        <series
 

                <title
 
AIG</title
 

                <data
 

                        <quarter
 
Q4</quarter
 

                        <amount
 
110000</amount
 

                </data
 
                       
        </series
 

        <series
 

                <title
 
COF</title
 

                <data
 

                        <quarter
 
Q1</quarter
 

                        <amount
 
200000</amount
 

                </data
 

        </series
 

        <series
 

                <title
 
COF</title
 

                <data
 

                        <quarter
 
Q3</quarter
 

                        <amount
 
100000</amount
 

                </data
 

        </series
 

        <series
 

                <title
 
COF</title
 

                <data
 
                       
                        <quarter
 
Q4</quarter
 

                        <amount
 
150000</amount
 

                </data
 
                       
        </series
 

        <series
 

                <title
 
CSCO</title
 
 
                <data
 

                        <quarter
 
Q1</quarter
 

                        <amount
 
100000</amount
 

                </data
 

        </series
 

        <series
 

                <title
 
CSCO</title
 

                <data
 

                        <quarter
 
Q2</quarter
 

                        <amount
 
77000</amount
 

                </data
 

        </series
 

        <series
 

                <title
 
CSCO</title
 

                <data
 

                        <quarter
 
Q3</quarter
 

                        <amount
 
50000</amount
 

                </data
 

        </series
 

        <series
 

                <title
 
CSCO</title
 

                <data
 

                        <quarter
 
Q4</quarter
 

                        <amount
 
30000</amount
 

                </data
 
                       
        </series
 

        <series
 

                <title
 
DELL</title
 

                <data
 

                        <quarter
 
Q1</quarter
 

                        <amount
 
100000</amount
 

                </data
 

        </series
 

        <series
 

                <title
 
DELL</title
 

                <data
 

                        <quarter
 
Q2</quarter
 

                        <amount
 
17700</amount
 

                </data
 

        </series
 

        <series
 

                <title
 
DELL</title
 

                <data
 

                        <quarter
 
Q4</quarter
 

                        <amount
 
150000</amount
 

                </data
 
                       
        </series
 

</root
 



To download a sample XML document similar to Example 2, click here.

You can also format the data in the following way (see Example 3):

Example 3



<?xml version="1.0"?
 

<root
 

        <series
 

                <title
 
AIG</title
 

                <data
 

                        <xx
 

                                <yy
 

                                        <quarter
 
Q1</quarter
 

                                </yy
 

                        </xx
 

                        <amount
 
100000</amount
 

                </data
 

                <data
 

                        <xx
 

                                <yy
 

                                        <quarter
 
Q2</quarter
 

                                </yy
 

                        </xx
 

                        <amount
 
200000</amount
 

                </data
 

                <data
 

                        <xx
 

                                <yy
 

                                        <quarter
 
Q3</quarter
 

                                </yy
 

                        </xx
 

                        <amount
 
130000</amount
 

                </data
 

                <data
 

                        <xx
 

                                <yy
 

                                        <quarter
 
Q4</quarter
 

                                </yy
 

                        </xx
 

                        <amount
 
110000</amount
 

                </data
 
                       
        </series
 

        <series
 

                <title
 
COF</title
 

                <data
 

                        <xx
 

                                <yy
 

                                        <quarter
 
Q1</quarter
 

                                </yy
 

                        </xx
 

                        <amount
 
200000</amount
 

                </data
 

                <data
 

                        <xx
 

                                <yy
 

                                        <quarter
 
Q3
expanded Attachments (0)
collapsed Attachments (0)
expanded Versions (21)
collapsed Versions (21)
Version Comparison     
VersionDateChanged by              Summary of changes
37Oct 22, 2009 3:05:26 PMAnna G O'Neal  IBM contributor
36Aug 17, 2009 12:51:22 PMAnna G O'Neal  IBM contributor
35Aug 17, 2009 12:16:46 PMAnna G O'Neal  IBM contributor
34Aug 12, 2009 9:57:51 AMAnna G O'Neal  IBM contributor
33Aug 12, 2009 9:12:54 AMAnna G O'Neal  IBM contributor
32May 26, 2009 10:15:21 AMAnna G O'Neal  IBM contributor
31Mar 26, 2009 4:29:38 PMAnna G O'Neal  IBM contributor
30Mar 25, 2009 1:00:16 PMAnna G O'Neal  IBM contributor
This version (29)Mar 25, 2009 11:57:20 AMAnna G O'Neal  IBM contributor
28Mar 25, 2009 11:24:41 AMAnna G O'Neal  IBM contributor
27Mar 25, 2009 10:59:53 AMAnna G O'Neal  IBM contributor
26Mar 25, 2009 10:53:29 AMAnna G O'Neal  IBM contributor
25Mar 25, 2009 10:16:15 AMAnna G O'Neal  IBM contributor
24Mar 25, 2009 9:53:42 AMAnna G O'Neal  IBM contributor
23Mar 25, 2009 9:49:40 AMAnna G O'Neal  IBM contributor
22Mar 24, 2009 3:31:27 PMAnna G O'Neal  IBM contributor
21Mar 24, 2009 2:57:23 PMAnna G O'Neal  IBM contributor
20Dec 9, 2008 4:22:07 PMAnna G O'Neal  IBM contributor
19Dec 7, 2008 12:14:36 PMAnna G O'Neal  IBM contributor
18Dec 7, 2008 12:11:03 PMAnna G O'Neal  IBM contributor
16Nov 21, 2008 9:54:53 AMAnna G O'Neal  IBM contributor
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedHelpAbout
  • IBM Collaboration Solutions wikis
  • IBM developerWorks
  • IBM Software support
  • Twitter LinkIBMSocialBizUX on Twitter
  • FacebookIBMSocialBizUX on Facebook
  • ForumsLotus product forums
  • BlogsIBM Social Business UX blog
  • Community LinkIBM Collaboration Solutions
  • Wiki Help
  • Forgot user name/password
  • Wiki design feedback
  • Content feedback
  • About the wiki
  • About IBM
  • Privacy
  • Accessibility
  • IBM Terms of use
  • Wiki terms of use