03-05-2010 01:05 PM
Are there any plans to add a Canvas element to the BlackBerry browser ( or at least in the widget implementation) ?
I have looked at several graphing libraries (jsgraphs, raphael, bluff, etc...) and every time I want to implement anything I am taken back by the lack of canvas support.
Are there any graphing options that I can use today on the Widget platform?
03-05-2010 03:18 PM
Canvas will be supported with Webkit when it is introduced in the BlackBerry OS. What you can use today for graphing is SVG Tiny 1.1.
09-01-2010 04:50 AM
In modern browsers this will work in any web page when called from window.onload:
var box = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); box.setAttribute('width', 600); box.setAttribute('height', 400); box.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); box.setAttribute('version', '1.1'); document.body.appendChild(box); var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); rect.setAttribute('width', 100); rect.setAttribute('height', 100); rect.setAttribute('x', 100); rect.setAttribute('y', 100); rect.setAttribute('stroke-width', 5); rect.setAttribute('stroke', '#0000FF'); rect.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); box.appendChild(rect);
... but this doesn't seem to give any results on the BlackBerry OS version 5. Is inline SVG even supported in version 5?
In BlackBerry OS v6 with the WebKit engine, the charts work out of the box.
09-01-2010 09:05 AM
In OS 5.0 SVG is supported in an <object> element with the proper type set. The inline <svg> element is not supported in 5.0.