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


8 AWG Gauge PV Wire 1000/2000 Volt Pre-Cut 15-500 Ft Solar Installation RED picture

8 AWG Gauge PV Wire 1000/2000 Volt Pre-Cut 15-500 Ft Solar Installation RED

$80.00



20 Gauge 3 Conductor Electrical Wire, 32.8FT Black Stranded 20/3 Low Voltage Cab picture

20 Gauge 3 Conductor Electrical Wire, 32.8FT Black Stranded 20/3 Low Voltage Cab

$23.83



WindyNation 6/3 SOOW SO 6 Gauge 3 Conductor Portable Power Cord 600V Cable Wire picture

WindyNation 6/3 SOOW SO 6 Gauge 3 Conductor Portable Power Cord 600V Cable Wire

$34.40



WindyNation 14/3 14 AWG 3 Conductor SJOOW Cable Cord Wire 300V Portable Power picture

WindyNation 14/3 14 AWG 3 Conductor SJOOW Cable Cord Wire 300V Portable Power

$14.79



Marine Grade Wire Duplex Boat Cable Tinned Copper USA Made - AWG Gauge All Sizes picture

Marine Grade Wire Duplex Boat Cable Tinned Copper USA Made - AWG Gauge All Sizes

$204.68



104100 100' 10/4 SOOW Wire Cord Cable Portable Power 10 Gauge 4 Conductor picture

104100 100' 10/4 SOOW Wire Cord Cable Portable Power 10 Gauge 4 Conductor

$294.36







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