开发者

Rendering HTML in titanium application

Hi everyone i am new to titanium(iphone) i am working on developing PieChart i want to use HTML in my code how can i use.. currently i have coded like this but its displaying blank page can anyone give me an idea of how to do this thanks in advance.

here is the code

var divTag = document.createElement('div');
divTag.id = "graph";
divTag.innerHTML = "Loading graph";
document.body.appendChild(divTag); */



var myData = new Array(['Communicate socially', 42], ['Engage in work for classes', 38], ['Be entertained', 10], ['Communi开发者_开发百科cate professionally', 7], 

['Not sure/Don\'t know', 2]);
    var colors = ['#C40000', '#750303', '#F9ECA2', '#FA9000', '#FA5400'];
    var myChart = new JSChart('graph', 'pie');
    myChart.setDataArray(myData);
    myChart.colorizePie(colors);
    myChart.setTitle('Students use the Internet most often to (%)');
    myChart.setTitleColor('#8E8E8E');
    myChart.setTitleFontSize(11);
    myChart.setTextPaddingTop(30);
    myChart.setSize(616, 321);
    myChart.setPiePosition(308, 170);
    myChart.setPieRadius(85);
    myChart.setPieUnitsColor('#555');
    myChart.setBackgroundImage('chart_bg.jpg');
    myChart.draw();


var divTag = document.createElement('div');
divTag.id = "graph";
divTag.innerHTML = "Loading graph";
document.body.appendChild(divTag); /* remove */
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜