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


Parts Only - Amplifier, Radio Frequency AM - 6154 / GRT21 Rack Unit with Cover picture

Parts Only - Amplifier, Radio Frequency AM - 6154 / GRT21 Rack Unit with Cover

$75.00



MATRIX SYSTEMS SWITCH RADIO FREQUENCY MFR/PN 7705DRRIS picture

MATRIX SYSTEMS SWITCH RADIO FREQUENCY MFR/PN 7705DRRIS

$299.00



TSG-17 High Frequency RF/AM Radio Frequency Signal Generator 100kHz-150MH NEW picture

TSG-17 High Frequency RF/AM Radio Frequency Signal Generator 100kHz-150MH NEW

$75.05



Emf Meter,Electric Field, Radio Frequency (Rf) Field, Magnetic Field Strength Me picture

Emf Meter,Electric Field, Radio Frequency (Rf) Field, Magnetic Field Strength Me

$98.89



Lot of 50 HDW-IMP-80 Imprivata RF IDEAS Radio Frequency Proximity Reader picture

Lot of 50 HDW-IMP-80 Imprivata RF IDEAS Radio Frequency Proximity Reader

$489.99



NEW RADIO FREQUENCY Systems 920204 Rev S 4 Port GDM w/Accessories,QTY picture

NEW RADIO FREQUENCY Systems 920204 Rev S 4 Port GDM w/Accessories,QTY

$291.95







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