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


Brand New STMicroelectronics M4T28-BR12SH1 TIMEKEEPER SNAPHAT Battery picture

Brand New STMicroelectronics M4T28-BR12SH1 TIMEKEEPER SNAPHAT Battery

$16.49



50 Pcs S8050 General Purpose NPN Transistor TO-92 40V 800ma 100Mhz USA Shipping picture

50 Pcs S8050 General Purpose NPN Transistor TO-92 40V 800ma 100Mhz USA Shipping

$4.89



BLF188XR RF Power LDMOS Transistor High Frequency Microwave Tube picture

BLF188XR RF Power LDMOS Transistor High Frequency Microwave Tube

$118.56



5 Pairs 2SB647AC & 2SD667AC (B647A / D667A) Transistors ~Fast 1st Class Shipping picture

5 Pairs 2SB647AC & 2SD667AC (B647A / D667A) Transistors ~Fast 1st Class Shipping

$6.69



2SC1307 New Replacement NPN Silicon Epitaxial Transistor C1307 picture

2SC1307 New Replacement NPN Silicon Epitaxial Transistor C1307

$10.95



TO-92 Assortment NPN PNP DIY kit 15 value 600pcs Transistor  picture

TO-92 Assortment NPN PNP DIY kit 15 value 600pcs Transistor

$11.52







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