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


Jelenko Commodore LS VPF with Pump  picture

Jelenko Commodore LS VPF with Pump

$875.00



Vintage Holt Commodore Commercial Floor Scrubber Polisher Buffer Burnisher picture

Vintage Holt Commodore Commercial Floor Scrubber Polisher Buffer Burnisher

$599.99



Mitsubishi Control Board DM00N649.  SM76A127G02 . Ductless unit 47-0910KR (C64) picture

Mitsubishi Control Board DM00N649. SM76A127G02 . Ductless unit 47-0910KR (C64)

$120.00



3D MULTIMEDIA VIDEO CARD C64/V2 1MB picture

3D MULTIMEDIA VIDEO CARD C64/V2 1MB

$94.05



POLAR PLASTICS C64 Construction Film,6x100,4Mil,Clear PK 4 picture

POLAR PLASTICS C64 Construction Film,6x100,4Mil,Clear PK 4

$178.04



Kenwood TK290 TK-290 VHF 146-174 160ch 5watt DTMF Radio with charger/Antenna C64 picture

Kenwood TK290 TK-290 VHF 146-174 160ch 5watt DTMF Radio with charger/Antenna C64

$75.75







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