BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 02-26-2008, 12:14 AM   #1
henrykui
New Member
 
Join Date: Feb 2008
Model: 7100T
PIN: N/A
Carrier: sad
Posts: 2
Default Chart Component

Please Login to Remove!

Hi, does anyone know if there is any chart component(bar chart, pie chart...) based on CLDC application in BlackBerry market?
or how do you develope your chart component(bar chart, pie chart...) based on CLDC application. would you mind giving me your solution?
I know J2ME ChartComponent (http://www.beanizer.org/site/index.p...-ver-1.5.html), but it is based on MIDP, can I use in CLDC application?
Thanks.

Last edited by henrykui; 02-26-2008 at 12:17 AM..
Offline  
Old 02-26-2008, 10:04 AM   #2
brcewane
Thumbs Must Hurt
 
Join Date: Aug 2007
Model: 8100
PIN: N/A
Carrier: Rogers
Posts: 140
Default

if you don't mind using wireless bandwidth you can always do something easy such as Google Charts API.. Send a URL via a GET HTTP request and it returns the chart image: Developerxxx39;s Guide - Google Chart API - Google Code
Offline  
Old 02-26-2008, 01:15 PM   #3
lhurtado
Knows Where the Search Button Is
 
Join Date: Mar 2007
Location: Chile
Model: 8300
Carrier: Movistar Chile
Posts: 28
Default try this...

Code:
class BarGraph extends Field implements DrawStyle{
    private int fieldWidth;
    private int fieldHeight;
        
    public BarGraph(){
        fieldHeight = 100;
        fieldWidth = Graphics.getScreenWidth();
    }
    
    protected void layout(int width, int height) {
        setExtent(getPreferredWidth(), getPreferredHeight());
    }
    
    public int getPreferredWidth() {
        return fieldWidth;
    }
    
    public int getPreferredHeight() {
        return fieldHeight;
    }
    
    protected void paint(Graphics graphics) {
         //here draw your graph...
         graphics.setColor(Color.BLACK);
         graphics.drawLine(.....
    }
}
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


6802 II Digital Thermocouple Thermometer Dual Channel 2*K-Type Temperature Meter picture

6802 II Digital Thermocouple Thermometer Dual Channel 2*K-Type Temperature Meter

$24.40



K-Type Thermocouple Probe Digital Thermometer Steel Sensor Spiral Cable  picture

K-Type Thermocouple Probe Digital Thermometer Steel Sensor Spiral Cable

$11.49



Digital Thermometer Dual Channel Input Thermocouple K J T E R N C/F Selection US picture

Digital Thermometer Dual Channel Input Thermocouple K J T E R N C/F Selection US

$25.99



K Type Temperature Sensor Probe 1.5M Cable 4mmx100mm Probe Thermocouple picture

K Type Temperature Sensor Probe 1.5M Cable 4mmx100mm Probe Thermocouple

$17.87



Watlow Thermocouple Probe ATJA30AA-Routoyo NOS picture

Watlow Thermocouple Probe ATJA30AA-Routoyo NOS

$249.95



Robertshaw Thermocouple 48

Robertshaw Thermocouple 48" 1980-048 Snap Fit Universal (51-1457)

$15.89







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.