Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Native Development

Reply
Developer
Suns33k3r
Posts: 25
Registered: ‎07-22-2012
My Carrier: Telstra

Drawing a simple chart in Cascades

I'm trying to implement a page using Cascades API and Native SDK. This page shall consist of a chart generated from the user input data and some text around it. This chart should be generated once and isn't needed to show any animation or dynamically change its shape or size, so using OpenGL for this task would be overhead, I think.

Apart of OpenGL, I have few possible ways for doing that:

 

  1. Use third-party javascript libraries for producing an image and somehow add surrounding text to it
  2. Use Native API to be able to draw whatever I want. The problem here is I haven't found anything similar to Canvas entity or Graphics class in previous Blackberry platfroms. Is there anything that could help me doing this?
  3. Use HTML5. How can I integrate HTML5 with the existing cascades code on a certain page?


So my question - what is the best way to achieve that goal? Have I missed something while doing research?

Thanks!

Please use plain text.
BlackBerry Development Advisor
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Carrier: N/A

Re: Drawing a simple chart in Cascades

If you want to achieve something using HTML5, have you taken a look at WebWorks? Indeed, it may serve your needs without the complexity of OpenGL:

https://developer.blackberry.com/html5/

 

Martin

 

Please use plain text.
New Contributor
Bomb3rman
Posts: 5
Registered: ‎08-06-2012
My Carrier: Bell

Re: Drawing a simple chart in Cascades

You can also use the Qt paint engine for this.

Please use plain text.
Developer
Suns33k3r
Posts: 25
Registered: ‎07-22-2012
My Carrier: Telstra

Re: Drawing a simple chart in Cascades

Thanks, guys! I'll try it out.

Please use plain text.
Developer
jtegen
Posts: 6,149
Registered: ‎10-27-2010
My Carrier: AT&T

Re: Drawing a simple chart in Cascades

There is also AIR that has many 3rd party chart libraries available that also includes all the animation you need. Plus it would be portable to other devices. Just something to consider as well.
Please use plain text.