Sometimes you need to show Graphs on BlackBerry Applications, instead of using Google chart as image on the Applications,

you can use the Blackberry Charts samples below.

The following sample code demonstrates how to create custom graph fields. The sample contains the following classes:

  • BarGraphField – A custom field that draws a bar graph
  • BarScreen – A screen demonstrating the use of BarGraphField
  • BlackBerryGraphs – The main application
  • GraphDemoScreen – The introductory screen for the sample application that allows a BlackBerry smartphone user to choose the type of graph to preview
  • GraphField – The base class that the other *GraphFields extend
  • LegendField – A custom field that draws a legend
  • LineGraphField – A custom field that draws a line or scatter graph
  • LineScreen – A screen demonstrating the use of LineGraphField
  • PieGraphField – A custom field that draws a pie chart
  • PieScreen – A screen demonstrating the use of PieGraphField and LegendField

The entire sample can be downloaded here. The following are some sample screen shots that illustrate the custom graph fields.

To access the sample code, download the attached BlackBerryGraphs.download-pdf-renameto.zip file.

Bar Graph Demo on BlackBerry App

Line/Scatter Graph Demo on BlackBerry App

Pie Graph Demo on BlackBerry App

[1] http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800345/How_To_-_Create_graph_fields.html?nodeid=1889634&vernum=0