Publish to web not showing graphs

Use this forum to post Vensim related questions.
Post Reply
aliakhavan89
Senior Member
Posts: 94
Joined: Sun Oct 21, 2018 7:09 am
Vensim version: DSS

Publish to web not showing graphs

Post by aliakhavan89 »

I'm trying to publish the model into web files, and I'm on Windows 11 version 22H2, Python 3.12.0, and Vensim 10.1.2, but the HTML file doesn't show the custom graph. How would I fix that?

FYI, I've attached the model and the web files. Also, I just installed Emscripten SDK and WASM complier, and I'm pointing to the right folders in Vensim settings.
Attachments
Model.zip
(214.88 KiB) Downloaded 95 times
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Publish to web not showing graphs

Post by Administrator »

What is the web address where you have uploaded this to?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
aliakhavan89
Senior Member
Posts: 94
Joined: Sun Oct 21, 2018 7:09 am
Vensim version: DSS

Re: Publish to web not showing graphs

Post by aliakhavan89 »

As I mentioned in the original post, the web files, including the HTML index file, are in the attachment. Also, I'm attaching a screenshot of what I see here.
Attachments
Screenshot 2023-11-17 at 14.15.27.jpg
Screenshot 2023-11-17 at 14.15.27.jpg (94.78 KiB) Viewed 4833 times
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Publish to web not showing graphs

Post by Administrator »

You need to upload it to a website for it to work. Running locally in a browser will not work.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Publish to web not showing graphs

Post by Administrator »

You can set up a server on your local machine. I'll send instructions when I'm back in front of a computer.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Publish to web not showing graphs

Post by Administrator »

https://www.vensim.com/documentation/4_ ... ng-on.html
You now need to copy all of these to a web server. There is plenty of information on the internet on how to do this,
https://developer.mozilla.org/en-US/doc ... web_server
If you browse to
C:\Users\Public\Vensim\COMP\wasm

there are two files (StartPythonWebserver.bat and WebServer.py). These can be copied to your "web" folder, and if you run "StartPythonWebserver.bat", it should start the Python script and set your machine up as a server. Then you can view the files in a browser without uploading to a website.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
aliakhavan89
Senior Member
Posts: 94
Joined: Sun Oct 21, 2018 7:09 am
Vensim version: DSS

Re: Publish to web not showing graphs

Post by aliakhavan89 »

Thank you very much, Tony. It worked. I see the machine is set up as server. Thanks again!
Attachments
Screenshot 2023-11-20 at 13.46.50.jpg
Screenshot 2023-11-20 at 13.46.50.jpg (136.76 KiB) Viewed 4768 times
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Publish to web not showing graphs

Post by Administrator »

For security reasons, you have to run via a server.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Post Reply