开发者

how to display a pie chart in blackberry application [closed]

开发者 https://www.devze.com 2023-04-07 05:15 出处:网络
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post.
Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 7 years ago.

Improve this question

How to display a 开发者_C百科pie chart in blackberry application using rim apis? Are there controls available in the rim apis or how can it be done? Can some help me by sharing the code snippet


The Google Chart API allows you to provide a URL to the Google service, which in turn returns a chart image. This capability is useful from the BlackBerry smartphone because data can be passed from the BlackBerry smartphone and generates a corresponding chart image on the BlackBerry smartphone.

here are the type of the chat you can do

Here are the chat types defined in Google API.

public static final String LINE_C = "lc";
public static final String LINE_S = "ls";
public static final String LINE_XY = "lxy";
public static final String BAR_HORIZONTAL_STACKED = "bhs";
public static final String BAR_VERTICAL_STACKED = "bvs";
public static final String BAR_HORIZONTAL_GROUPED = "bhg";
public static final String BAR_VERTICAL_GROUPED = "bvg";
public static final String BAR_ = "b";
public static final String PIE = "p";
public static final String PIE_3D = "p3";
public static final String PIE_CONCENTRIC = "pc";
public static final String VENN = "v";
public static final String SCATTER = "s";
public static final String RADAR = "r";
public static final String RADAR_SPLINES = "rs";
public static final String MAP = "t";
public static final String GOOGLE_O_METER = "gom";
public static final String QR_CODE = "qr";

The all you need to do is to request the chat URL. it will download as image to your device. The URL format is given below.

http://chart.apis.google.com/chart?&cht=p3&chd=t:250,100,40&chs=320x200&chl=Apple|Grapes|Mango

cht = chart type chd = chart data chs = chart size chl = chart label

Enjoy.

0

精彩评论

暂无评论...
验证码 换一张
取 消