WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-22-2013, 12:24 PM
Ritesh Agrawal Ritesh Agrawal is offline
Member
 
Join Date: Mar 2013
Posts: 3
Using javascript with vizard

Hello friends,
I have some data visualization models in JavaScript like Scatter Plot, Parallel Coordinates , bar graph etc . Somehow I want to combine them with A.R and V.R , so after searching on net I found that vizard will be best solution to implement A.R and V.R . But I have no clue whether it is possible or not ? Is there any way through which I can directly include my JavaScript code in python / vizard ? Or any way through which I can make those models in vizard ?
My aim is to combine Data Visualization with A.R and V.R. I am basically looking for user interactive model.

Thanks
Reply With Quote
  #2  
Old 03-22-2013, 05:12 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
It's not clear how exactly you want to integrate these javascript visualizations with Vizard. However, Vizard comes with a vizhtml module that allows you to display an embedded html page within the graphics window. This basically allows you to execute javascript code and overlay the results.

Also, you might want to have a look at the 3rd party matplotlib Python library. This provides a high level interface for generating data plots.
Reply With Quote
  #3  
Old 03-25-2013, 03:26 AM
Ritesh Agrawal Ritesh Agrawal is offline
Member
 
Join Date: Mar 2013
Posts: 3
I want to embed my javascript based visualization model into a screen in virtual world. However vizhtml is not working with javascript. Nothing is displayed if I use vizhtml module to load website. For example if I try to open website www.d3js.org and when I go to examples page (containing Javascript based models) then nothing is displayed on the screen.
Is it possible to execeute that Javascript in window? Actually I want to implement similar model which is given in d3js.org (http://mbostock.github.com/d3/talk/2...-parallel.html). Please provide the suitable solution.

Thanks
Reply With Quote
  #4  
Old 03-29-2013, 12:58 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The embedded browser is based on the Windows native web browser control. It appears that the browser defaults to IE7 mode, and the web page you are trying to view is not compatible with IE7.

However, you can specify which version of IE to use for the embedded browser through a registry setting. The following sample code will force the embedded browser to use IE9 and then opens the sample page you previously mentioned.
Code:
import viz
viz.go()

import _winreg
reg = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, r'Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION',0,_winreg.KEY_ALL_ACCESS)
_winreg.SetValueEx(reg,'VizHTMLViewer.exe',0,_winreg.REG_DWORD,9999)

viz.window.displayHTML('http://mbostock.github.com/d3/talk/20111116/iris-parallel.html')
The chart appears to render properly within the browser now.
Reply With Quote
  #5  
Old 04-03-2013, 02:00 AM
Ritesh Agrawal Ritesh Agrawal is offline
Member
 
Join Date: Mar 2013
Posts: 3
Thanks a lot. It is working fine now. Actually I want to embed my model on the wall but it is always coming in front of the user.So is there any way so that browser can embed on any of the wall or object like screen? Please provide the suitable solution.


Thanks
Reply With Quote
  #6  
Old 03-03-2016, 07:51 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,462
Just an update here, if you want to force Vizard to use IE11 as the embedded browser to display html and javascript, use the following code:

Code:
import _winreg
reg = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, r'Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION',0,_winreg.KEY_ALL_ACCESS)
_winreg.SetValueEx(reg,'VizHTMLViewer.exe',0,_winreg.REG_DWORD,11001)
Reply With Quote
  #7  
Old 09-01-2016, 03:37 AM
meta meta is offline
Member
 
Join Date: Jul 2016
Posts: 1
Use of chrome to display html?

Hi, any change to use chrome & v8 engine for html?
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Realistic Light and Shadows Using Vizard and 3DS Max jde Vizard 4 07-13-2012 11:58 AM
Vizard 4 Beta Testing farshizzo Announcements 0 02-01-2011 11:46 AM
Vizard 4 Beta Testing farshizzo Vizard 0 02-01-2011 11:46 AM
Vizard tech tip: Using the Python Imaging Library (PIL) Jeff Vizard 0 03-23-2009 12:13 PM
Vizard tech tip: Text to Speech Jeff Vizard 1 01-15-2009 10:39 PM


All times are GMT -7. The time now is 02:36 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC