Я попытался включить g.raphael pie в веб-просмотр в Titanium, используя пример g.raphael pie.Но когда я запускаю код на симуляторе iOS, он отображает только страницу без диаграммы, но отображает метки просто отлично.
«Круговая диаграмма с легендой, гиперссылками на двух первых секторах и эффектом наведения»
ниже приведен код g.raphael в моем файле chart.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>title</title>
<script src="raphael.lib"></script>
<script src="g.raphael.js"></script>
<script src="g.pie.js"></script>
<script>
window.onload = function () {
var r = Raphael("holder"),
pie = r.piechart(320, 240, 100, [55, 20, 13, 32, 5, 1, 2, 10], { legend: ["%%.%% - Enterprise Users", "IE Users"], legendpos: "west", href: ["http://raphaeljs.com", "http://g.raphaeljs.com"]});
r.text(320, 100, "Interactive Pie Chart").attr({ font: "20px sans-serif" });
pie.hover(function () {
this.sector.stop();
this.sector.scale(1.1, 1.1, this.cx, this.cy);
if (this.label) {
this.label[0].stop();
this.label[0].attr({ r: 7.5 });
this.label[1].attr({ "font-weight": 800 });
}
}, function () {
this.sector.animate({ transform: 's1 1 ' + this.cx + ' ' + this.cy }, 500, "bounce");
if (this.label) {
this.label[0].animate({ r: 5 }, 500, "bounce");
this.label[1].attr({ "font-weight": 400 });
}
});
};
</script>
</head>
<body class="raphael" id="g.raphael.dmitry.baranovskiy.com">
<div id="holder"></div>
<p>
Pie chart with legend, hyperlinks on two first sectors and hover effect.
</p>
</body>
</html>
, а это мой код Titanium для WebView
var win_rptWebView = Titanium.UI.createWindow({
title:'Web View',});
var webviewEx = Titanium.UI.createWebView({url:'chart.html'});
win_rptWebView.add(webviewEx);
Какотобразить диаграмму g.raphael в WebView в Titanium?Существуют ли учебники о том, как это сделать (диаграмма g.raphael + титан), чем проще объяснение, тем лучше.Я новый пользователь Titanium и g.Raphael, поэтому заранее прошу прощения, если другим это покажется простым.Заранее спасибо, ребята.