protovis

Raphaël and D3.JS - Better Browser Compatibility

老子叫甜甜 提交于 2019-12-03 20:38:56
Is it possible to use D3 and Raphael together so that visualizations are produced by D3 (using D3's API to produce svg output) and correctly visualized in IE by Raphael ? I appreciate any example/sample code. Yes you can. We've improved r2d3 from a compatibility project to an IE fallback for D3. This was achieved by having D3 wrap Raphael elements which we extended with methods such as setAttribute. This enables D3 to work with Raphael elements like they were DOM nodes. The project still needs some work to iron out issues with things like groups, but I encourage you to check it out to see if

Trouble with Tornado and JavaScript Libraries

≯℡__Kan透↙ 提交于 2019-12-01 17:48:25
I'm trying to write a simple python web application using the Tornado web server and am having trouble using the JavaScript libraries I need. I wanted to use the Protovis JavaScript plotting library, so I added the following 'Hello World' code snippet to my template.html: <script type="text/javascript" src="/protovis-d3.2.js"></script> <script type="text/javascript+protovis"> new pv.Panel() .width(150) .height(150) .anchor("center") .add(pv.Label) .text("Hello, world!") .root.render(); </script> Whenever I run the webserver, however, and try accessing the page, I get the following error at the

Trouble with Tornado and JavaScript Libraries

拜拜、爱过 提交于 2019-12-01 17:47:41
问题 I'm trying to write a simple python web application using the Tornado web server and am having trouble using the JavaScript libraries I need. I wanted to use the Protovis JavaScript plotting library, so I added the following 'Hello World' code snippet to my template.html: <script type="text/javascript" src="/protovis-d3.2.js"></script> <script type="text/javascript+protovis"> new pv.Panel() .width(150) .height(150) .anchor("center") .add(pv.Label) .text("Hello, world!") .root.render(); <

Trigger resize event on print

僤鯓⒐⒋嵵緔 提交于 2019-11-30 17:50:52
I have a div in which I create a chart using protovis . The div has width: 100% and height: 100% and the code to create the chart uses $('#chart').width() and $('#chart').height() to get the size of the div at render time and fill the page with the chart. I capture the resize event on the window and adjust the div and the chart so that it resizes when the window resizes. Now I need to print. I would have hoped that when the browser is rendering the page for the printer it issues a resize but it doesn't, at least Safari and Firefox don't. Chrome does something strange in which it resizes only