Forum Discussion
Visio Javascript API for VIsio Online
Hello,
Visio Online is the new way to view and share Visio diagrams on the web. We are pleased to announce general availability of Visio JavaScript APIs . These APIs are the first step towards enabling developers to extend capabilities of Visio Online in a SharePoint page. Here are few resources to get you started:
1. API Release Blog on Dev.Office.com
If you have been using Visio Web Services API, we request you to migrate your solutions to new Visio Online JavaScript APIs. Here is the migration blog that will guide you through the process.
Note that these APIs are not applicable for Office Add-ins Platform.
If you have any questions, feel free to drop a comment below or mail to TellVisio [at] Microsoft [dot] com
Regards
Visio Product Team
11 Replies
I have created a sample SharePoint Framework web part using the Visio JavaScript API some time ago, in case someone is interested.
You can check the source code here:
https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-visio
And I have a blog post with some details here:
https://joelfmrodrigues.wordpress.com/2018/08/27/sharepoint-framework-with-visio-javascript-apis/
Any feedback is welcome.
- jouni kamppiCopper Contributor
Hi
I'm using Visio Online inside Sharepoint page (classic): script editor web part, iframe .....
In IE11 there this error in console:
SCRIPT70: Permission denied
visio-web-embedded.js (20,38847)Everythins seems to be working but whats that error?
Jouni
- Rahul.Mittal
Microsoft
Hi Jouni
Sorry that you faced this. Would you be able to provide the code snippet where you are seeing this console error?
You can also use tellVisio [at] microsoft [dot] com for providing more details regarding this or any other feedback that you have related to the Visio Online APIs.
Regards
Rahul Mittal | Program Manager | Microsoft Visio
- Darren GrahamCopper Contributor
Hello
Are there any plans for the API to work on web parts on modern pages and more specifically be able to do web part connections...send shape data to, highlight shapes from, choice filters etc
Example - Looking to create SharePoint pages where a user can select a shape from the visio web part (process flow chart) and that will filter the document library web part to show the documents corresponding to the step within the process. This works with the shape data value corresponding to a column value in the document library.
The API will work on classic pages...any sign of when this will be available in MODERN?
Regards
Darren
- David Sisques DanielCopper ContributorIn our company we have office 365 and sharepoint since August. We want to publish certain documentation in sharepoint for the knowledge of all the employees. Some of the documents are in Visio and we are using the javascript api to publish it. But we have some problem caused because we do not know and we do not find how to control the style of the iframe content. We want to remove the border, the scroll and the margins, but we do not know how or we have seen any example.
- Rahul.Mittal
Microsoft
Hi David
It is good to hear that you want to use Visio Online APIs for publishing documents on SharePoint. You can find more details in the API reference and some examples in this blog.
Regarding the issues faced, you can change the styling of the iframe by getting the iframe element through it's id and applying the properties. Something like
document.getElementById("embed-iframe").style.marginTop = "10px";As scroll bars help the user in panning the diagram, you can hide the scroll bars, by disabling the pan capability by calling the below API.
document.view.disablePan = true;
Regards
Rahul Mittal | Microsoft Visio
- KanchanKumbharCopper Contributor
Hello Rahul.Mittal ,
The link you mentioned in the above post regarding API doesn't exists anymore. Could you please share the latest links of API's.
I am very new to Visio online.
I am using Embed web part on Modern Site to show Visio file .I need to hide the header and footer of it.
Would you like to put some highlights on it, how can I achieve it?
- Rishabh Agrawal
Microsoft
Thanks David for your query. Adding Rahul.Mittal from my team who can best answer this question.