SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Visit bVisual.net
Embedding Visio diagrams in
SharePoint and Teams using SPFx
David J Parker, Microsoft MVP (Visio)
March 2020
Microsoft MVP (Visio)
Independent Visio Consultant
bVisual.net
@VisioRules
visiorules.com
blog.bvisual.net
visualizinginformation.com
• Started as building architect (RIBA)
• Linked CAD to databases for merchant
banks in London & New York
• Switched to Visio in mid ‘90’s
• Founded bVisual in 1998
• Visio consultant, developer, trainer,
blogger, author
• 15 years MVP
• UK based, global reach
bit.ly/Visio2016Data
About David J Parker
Understanding the possibilities with Visio diagrams
Reviewing the Visio JavaScript API
Introducing the SharePoint Framework (SPFx)
Creating a SPFx WebPart
Supporting Microsoft Teams
Adding the Visio package
Agenda
Understanding the
possibilities with Visio
diagrams
SharePoint Web page
(View)
Web
Windows Desktop
(Create/Edit)
Windows Desktop
SharePoint / OneDrive for
Business
Cloud Store
Positioning Visio in the Web
Data source
Visio
document
JavaScript
C++
.Net
VB
VBA
VBA
Visio
document
Visio
document
Power BI
Visio
document
Visio
document
Power BI
Desktop
Interacting with Visio in the Cloud – March 2020
Visio documents in OneDrive or SharePoint
Edit in Visio Plan 2*
Create/
update
diagrams
View/Edit
data
View/
edit/
follow
hyperlinks
View/ edit
layers
Search
text and
data
Print /
Export
Edit in Visio
Plan 1
Simple
diagrams
Print /
Export to
pdf &
image
View in Visio File
Viewer
View data
Follow
hyperlinks
Search
text
View in
Visio Viewer
for iOS
View
layers
Search
text
* Windows only
A Solution with Visio embedded in a SharePoint page
Visio diagrams in file viewer or custom web pages
Visio Desktop Custom Template
Custom shapes
• Automate appearance, colours, icons, hyperlink
• Automatic high contrast text
Linked SharePoint Lists
• Centralise data for consistency
• Automatically update shape data and colours
Accessibility
• Automate Alt Text
• Automate text high contrast
• Expose navigation order to interface
Hyperlinks
• Visio page to Visio page
• Visio document to Visio document
• Visio shape to documentation
Validation rules
• Ensure correct structure
JavaScript API aided by Visio ShapeSheet
Page loaded
• Web part height adjusted suit the aspect ratio of the page
• Significant shapes listed in navigation order
• Legend is automatically displayed
List item selected
• Shape selected
• Shape text, alt title and description displayed
• Previous and Next buttons displayed
• Hyperlinks are grouped by type
Shape selected
• Arrows go to other pages
Mouse enters shape
• Custom tooltip appears
Shape data
• Values provides data for list and groupings
• Alt title and description automatically updated from
shape data
• Navigation order exposed in data
Shape hyperlinks
• Arrows can be clicked to go to other pages
• Some hyperlinks open a target Visio document within
the same web part
• Some hyperlinks open external links in a controlled
manner
Shape graphics
• Graphics change by data value or containment
• Icons displayed if specific data or hyperlinks present
Reviewing the Visio
JavaScript API
Hierarchy of Objects in the JavaScript API
Application Document
DocumentView
Page(s)
PageView
Selection/
Shape(s)
ShapeView
ShapDataItem(s)
Hyperlink(s)
Comment(s)
Comment(s)
Overview
Application Document
DocumentView
Page
PageView
PageCollection ShapeCollection Shape
ShapeView
ShapeDataItemCollection
HyperlinkCollection Hyperlink
ShapeDataItem
CommentCollection Comment
<<Interface>>
BoundingBox
<<Interface>>
Highlight
<<Interface>>
Position
RequestContext
Selection
<<Interface>>
DataRefreshCompleteEventArgs
<<Interface>>
DocumentLoadCompleteEventArgs
<<Interface>>
PageLoadCompleteEventArgs
<<Interface>>
PageRenderCompleteEventArgs
<<Interface>>
SelectionChangedEventArgs
<<Interface>>
ShapeMouseEnterEventArgs
<<Interface>>
ShapeMouseLeaveEventArgs
<<Enumeration>>
ErrorCodes
<<Enumeration>>
OverlayHorizontalAlignment
<<Enumeration>>
OverlayType
<<Enumeration>>
OverlayVerticalAlignment
<<Enumeration>>
ToolBarType
Visio JavaScript API
-context
-load(...)
-showBorders
-showToolbars
-set(...)
-showToolbar(...)
-toJSON()
-application
-getActivePage()
-context
-pages
-view
-load(...)
-set(...)
-setActivePage(...)
-startDataRefresh()
-toJSON()
-context
-disableHyperlinks
-load(...)
-set(...)
-disablePan
-disablePanZoomWindow
-disableZoom
-hideDiagramBoundary
-toJSON()
-allShapes
-activate()
-context
-height
-index
-load(...)
-set(...)
-toJSON()
-comments
-isBackground
-name
-shapes
-view
-width
-context
-load(...)
-set(...)
-zoom
-toJSON()
-context
-getCount()
-items
-toJSON()
-getItem(...)
-load(...)
-context
-getCount()
-items
-toJSON()
-getItem(...)
-load(...)
-getBounds()
-context
-hyperlinks
-id
-load(...)
-set(...)
-toJSON()
-comments
-name
-subShapes
-view
-select
-shapeDataItems
-text
-context
-addOverlay(...)
-set(...)
-highlight
-toJSON()
-load(...)
-removeOverlay(...)
-showOverlay(...)
-getCount()
-toJSON()
-getItem(...)
-load(...)
-context
-getCount()
-items
-toJSON()
-getItem(...)
-load(...)
-context
-description
-extraInfo
-load(...)
-toJSON()
-address
-subAddress
-context
-format
-formattedValue
-load(...)
-toJSON()
-label
-value
-context
-getCount()
-items
-toJSON()
-getItem(...)
-load(...)
-context
-date
-text
-load(...)
-toJSON()
-author
-set(...)
-height
-width
-x
-y
-color
-width
-x
-y
-(constructor)(url)
-document
-context
-shapes
-toJSON()
-load(...)
-document
-success
-success
-pageName
-success
-pageName
-success
-pageName
-shapeNames
-pageName
-shapeName
-pageName
-shapeName
-accessDenied
-unsupportedOperation
-generalException
-itemNotFound
-notImplemented
-center
-left
-right
-html
-image
-text
-bottom
-middle
-top
-commandBar
-pageNavigationBar
-statusBar
-context
-items
Classes
Interfaces
Enums
Application to Page
Classes
Application Document
DocumentView
Page
PageView
PageCollection ShapeCollection Shape
ShapeView
<<Interface>>
BoundingBox
<<Interface>>
Highlight
<<Interface>>
Position
RequestContext
Selection
<<Interface>>
DataRefreshCompleteEventArgs
<<Interface>>
DocumentLoadCompleteEven
<<Interface>>
PageLoadCompleteEventArgs
<<Interface>>
PageRenderCompleteEventArg<<Enumeration>>
ErrorCodes
<<Enumeration>>
ToolBarType
-context
-load(...)
-showBorders
-showToolbars
-set(...)
-showToolbar(...)
-toJSON()
-application
-getActivePage()
-context
-pages
-view
-load(...)
-set(...)
-setActivePage(...)
-startDataRefresh()
-toJSON()
-context
-disableHyperlinks
-load(...)
-set(...)
-disablePan
-disablePanZoomWindow
-disableZoom
-hideDiagramBoundary
-toJSON()
-allShapes
-activate()
-context
-height
-index
-load(...)
-set(...)
-toJSON()
-comments
-isBackground
-name
-shapes
-view
-width
-context
-load(...)
-set(...)
-zoom
-toJSON()
-context
-getCount()
-items
-toJSON()
-getItem(...)
-load(...)
-context
-getCount()
-items
-toJSON()
-getItem(...)
-load(...)
-getBounds()
-context
-hyperlinks
-id
-load(...)
-set(...)
-toJSON()
-comments
-name
-subShapes
-view
-select
-shapeDataItems
-text
-context
-addOverlay(...)
-set(...)
-highlight
-toJSON()
-load(...)
-removeOverlay(...)
-showOverlay(...)
-height
-width
-x
-y
-color
-width
-x
-y
-(constructor)(url)
-document
-context
-shapes
-toJSON()
-load(...)
-document
-success
-success
-pageName
-success
-pageName
-success-accessDenied -commandBar
Classes
• Application
• RequestContext
• Document
• DocumentView
• PageCollection
• Page
• PageView
Selection and Shape
Classes
Application Document
DocumentView
Page
PageView
PageCollection ShapeCollection Shape
ShapeView
ShapeDataItemCollection
HyperlinkCollection Hyperlink
ShapeDataItem
CommentCollection Comment
<<Interface>>
BoundingBox
<<Interface>>
Highlight
<<Interface>>
Position
RequestContext
Selection
<<Interface>>
DataRefreshCompleteEventArgs
<<Interface>>
DocumentLoadCompleteEventArgs
<<Interface>>
PageLoadCompleteEventArgs
<<Interface>>
PageRenderCompleteEventArgs<<Enumeration>>
ErrorCodes
<<Enumeration>>
ToolBarType
-context
-load(...)
-showBorders
-showToolbars
-set(...)
-showToolbar(...)
-toJSON()
-application
-getActivePage()
-context
-pages
-view
-load(...)
-set(...)
-setActivePage(...)
-startDataRefresh()
-toJSON()
-context
-disableHyperlinks
-load(...)
-set(...)
-disablePan
-disablePanZoomWindow
-disableZoom
-hideDiagramBoundary
-toJSON()
-allShapes
-activate()
-context
-height
-index
-load(...)
-set(...)
-toJSON()
-comments
-isBackground
-name
-shapes
-view
-width
-context
-load(...)
-set(...)
-zoom
-toJSON()
-context
-getCount()
-items
-toJSON()
-getItem(...)
-load(...)
-context
-getCount()
-items
-toJSON()
-getItem(...)
-load(...)
-getBounds()
-context
-hyperlinks
-id
-load(...)
-set(...)
-toJSON()
-comments
-name
-subShapes
-view
-select
-shapeDataItems
-text
-context
-addOverlay(...)
-set(...)
-highlight
-toJSON()
-load(...)
-removeOverlay(...)
-showOverlay(...)
-getCount()
-toJSON()
-getItem(...)
-load(...)
-context
-getCount()
-items
-toJSON()
-getItem(...)
-load(...)
-context
-description
-extraInfo
-load(...)
-toJSON()
-address
-subAddress
-context
-format
-formattedValue
-load(...)
-toJSON()
-label
-value
-context
-getCount()
-items
-toJSON()
-getItem(...)
-load(...)
-context
-date
-text
-load(...)
-toJSON()
-author
-set(...)
-height
-width
-x
-y
-color
-width
-x
-y
-(constructor)(url)
-document
-context
-shapes
-toJSON()
-load(...)
-document
-success
-success
-pageName
-success
-pageName
-success-accessDenied -commandBar
-context
-items
Classes
• ShapeCollection
• Selection
• Shape
• ShapeView
• ShapeDateItemCollection
• HyperlinkCollection
• CommentCollection
• ShapeDataItem
• Hyperlink
• Comment
Misc Interfaces and
Enums
DocumentView
PageView
ShapeView
<<Interface>>
BoundingBox
<<Interface>>
Highlight
<<Interface>>
Position
RequestContext
Selection
<<Interface>>
DataRefreshCompleteEventArgs
<<Interface>>
DocumentLoadCompleteEventA
<<Interface>>
PageLoadCompleteEventArgs
<<Interface>>
PageRenderCompleteEventArgs
<<Interface>>
SelectionChangedEventArgs
<<Interface>>
ShapeMouseEnterEventArgs
<<Interface>>
ShapeMouseLeaveEventArgs
<<Enumeration>>
ErrorCodes
<<Enumeration>>
OverlayHorizontalAlignment
<<Enumeration>>
OverlayType
<<Enumeration>>
OverlayVerticalAlignment
<<Enumeration>>
ToolBarType
-toJSON() -view
-load(...)
-setActivePage(...)
-startDataRefresh()
-context
-disableHyperlinks
-load(...)
-set(...)
-disablePan
-disablePanZoomWindow
-disableZoom
-hideDiagramBoundary
-toJSON()
-activate()
-load(...)
-set(...)
-toJSON()
-name
-shapes
-view
-width
-context
-load(...)
-set(...)
-zoom
-toJSON()
-getBounds()
-load(...)
-set(...)
-toJSON()
-subShapes
-view
-shapeDataItems
-text
-context
-addOverlay(...)
-set(...)
-highlight
-toJSON()
-load(...)
-removeOverlay(...)
-showOverlay(...)
-height
-width
-x
-y
-color
-width
-x
-y
-(constructor)(url)
-document
-context
-shapes
-toJSON()
-load(...)
-document
-success
-success
-pageName
-success
-pageName
-success
-pageName
-shapeNames
-pageName
-shapeName
-pageName
-shapeName
-accessDenied
-unsupportedOperation
-generalException
-itemNotFound
-notImplemented
-center
-left
-right
-html
-image
-text
-bottom
-middle
-top
-commandBar
-pageNavigationBar
-statusBar
Miscellaneous Interfaces
• BoundingBox
• Highlight
• Position
Enums
• ErrorCodes
• ToolBarType
• OverlayType
• OverlayHorizontalAlignment
• OverlayVerticalAlignment
EventArg Interfaces
DocumentView
PageView
ShapeView
CommentCollection Comment
<<Interface>>
BoundingBox
<<Interface>>
Highlight
<<Interface>>
Position
RequestContext
<<Interface>>
DataRefreshCompleteEventArgs
<<Interface>>
DocumentLoadCompleteEventArgs
<<Interface>>
PageLoadCompleteEventArgs
<<Interface>>
PageRenderCompleteEventArgs
<<Interface>>
SelectionChangedEventArgs
<<Interface>>
ShapeMouseEnterEventArgs
<<Interface>>
ShapeMouseLeaveEventArgs
<<Enumeration>>
ErrorCodes
<<Enumeration>>
OverlayHorizontalAlignment
<<Enumeration>>
OverlayType
<<Enumeration>>
OverlayVerticalAlignment
<<Enumeration>>
ToolBarType
Visio JavaScript API
-context
-disableHyperlinks
-load(...)
-set(...)
-disablePan
-disablePanZoomWindow
-disableZoom
-hideDiagramBoundary
-toJSON()
-activate()
-load(...)
-set(...)
-toJSON()
-context
-load(...)
-set(...)
-zoom
-toJSON()
-getBounds()
-load(...)
-set(...)
-toJSON()
-context
-addOverlay(...)
-set(...)
-highlight
-toJSON()
-load(...)
-removeOverlay(...)
-showOverlay(...)
-getCount()
-toJSON()
-getItem(...)
-load(...)
-context
-description
-extraInfo
-load(...)
-toJSON()
-address
-subAddress
-context
-getCount()
-items
-toJSON()
-getItem(...)
-load(...)
-context
-date
-text
-load(...)
-toJSON()
-author
-set(...)
-height
-width
-x
-y
-color
-width
-x
-y
-(constructor)(url)
-document
-shapes
-toJSON()
-load(...)
-document
-success
-success
-pageName
-success
-pageName
-success
-pageName
-shapeNames
-pageName
-shapeName
-pageName
-shapeName
-accessDenied
-unsupportedOperation
-generalException
-itemNotFound
-notImplemented
-center
-left
-right
-html
-image
-text
-bottom
-middle
-top
-commandBar
-pageNavigationBar
-statusBar
-context
-items
EventArgs Interfaces
• DataRefreshCompleteEventsArgs
• DocumentLoadCompleteEventArgs
• PageLoadEventArgs
• PageRefreshEventArgs
• SelectionChangedEventArgs
• ShapeMouseEnterEventArgs
• ShapeMouseLeaveEventArgs
Introducing the
SharePoint Framework
(SPFx)
SPFx is a page and web part model
• provides full support for client-side SharePoint development
It is framework-agnostic.
• use any JavaScript framework like React, Handlebars, Knockout, Angular, and more
End users can use SPFx client-side solutions
• if approved by the tenant administrators (or their delegates) on all sites
• including self-service team, group, or personal sites.
SPFx web parts are multi-functional
• can be added to both classic and modern pages
• can be made into Microsoft Teams Tabs or Personal Apps
What is the SharePoint Framework (SPFx )?
Toolset Comparison
nodeJs
• Asynchronous event-driven JS runtime
npm
• Node Package Manager
Visual Studio Code
• Code editor for modern web development
Yeoman
• Generic scaffolding system
TypeScript
• Syntactical superset of JavaScript, with static typing
Gulp
• Build tool
Creating a SharePoint
React Web Part
Creating a SharePoint and/or Teams web part
•docs.microsoft.com/sharepoint/dev/spfx/set-up-your-developer-tenant
Set up the Office 365 tenant
•docs.microsoft.com/sharepoint/dev/spfx/set-up-your-development-environment
•MUST be NodeLJ LTS version 10
Set up the development environment
•docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part
•Select React framework rather than No JavaScript framework
•Add url and zoomLevel extra properties, rather than the test* rows
Build a web part
•docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/using-web-part-as-ms-teams-tab
Add support for Teams
•docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/serve-your-web-part-in-a-sharepoint-page
Deploy to SharePoint
•Available as SharePoint web part, a Teams Tab or a Teams Personal App
Sync to Teams
Add Visio service to the web part
•npm install @types/office-js save
• Add type “office-js” to the tsconfig.json
Install OfficeJS
• Add external reference to visio-web-embedded.js in config/config.json
• Create src/shared/services folder
• Add index.ts file
• Add sample VisioService.ts file from bit.ly/2uQ5dn8
Add Visio Service
• Add import { VisioService } from "../../../shared/services";
• Update export visioService: VisioService;
Update Props interface
•Add .iframeHost{height: 600px;width:100%;}
Update styles
• Update render() by replacing most <div>s with iframeHost div
• Add componentDidMount() and componentDidUpdate()
Update tsx file
• Add import 'officejs';
• Add import { VisioService } from '../../shared/services';
• Update the interface with visioService: VisioService;
• Declare private _visioService: VisioService;
• Add onInit() function
• Add visioService: this._visioService, to the ReactElement
Update WebPart
Add Teams support for the Visio service
• docs.microsoft.com/javascript/api/overview/msteams-
client?view=msteams-client-js-latest
• npm install --save @microsoft/teams-js
Install Teams client SDK
• Add import * as microsoftTeams from "@microsoft/teams-js";
• Update export teamsContext: microsoftTeams.Context;
Update Props interface
• Add import * as microsoftTeams from "@microsoft/teams-js";
• Declare private _teamsContext: microsoftTeams.Context;
• Update onInit() function to add alternate retVal
• Update ReactElement teamsContext: this._teamsContext,Update WebPart
Deploy to SharePoint and Teams
•docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/serve-your-web-part-in-a-sharepoint-page
•>gulp bundle --ship
•>gulp package-solution --shipDeploy to SharePoint
•Available as SharePoint web part, a Teams Tab or a Teams Personal App
•Drag and drop the package in sites/AppCatlog/AppCatalog
•Tick make available to all sites
•Click Sync to Teams
Sync to Teams
Add the web part in SharePoint
Add the Tab in Teams
Add the Personal App in Teams
Learn how to integrate data with SmartShapes
Mastering Data Visualization with Microsoft
Visio…
Publisher’s website : bit.ly/Visio2016Data
Power Up Visio … a White Paper on Visio with
Power BI
Available from : bit.ly/PowerUpVisio
Š Copyright Microsoft Corporation. All rights reserved.
Creating Visio Tabs and Apps for Teams with SharePoint Framework (SPFx)
/bvisual.net/creating-visio-tabs-and-apps-for-teams-with-sharepoint-framework-spfx/
Visit bVisual.net
Thank you.
David J Parker, Microsoft MVP (Visio)
davidp@bvisual.net
blog.bvisual.net
@VisioRules

Weitere ähnliche Inhalte

Was ist angesagt?

Take the Next Step to S/4HANA with "RISE with SAP"
Take the Next Step to S/4HANA with "RISE with SAP"Take the Next Step to S/4HANA with "RISE with SAP"
Take the Next Step to S/4HANA with "RISE with SAP"
panayaofficial
 
Technical Overview of Microsoft SharePoint Online - Presented by Atidan
Technical Overview of Microsoft SharePoint Online - Presented by AtidanTechnical Overview of Microsoft SharePoint Online - Presented by Atidan
Technical Overview of Microsoft SharePoint Online - Presented by Atidan
David J Rosenthal
 

Was ist angesagt? (20)

SAP S/4HANA Cloud
SAP S/4HANA CloudSAP S/4HANA Cloud
SAP S/4HANA Cloud
 
Migration to share point online
Migration to share point onlineMigration to share point online
Migration to share point online
 
RISE PCE CAA Migration Options_wave4.pdf
RISE PCE CAA Migration Options_wave4.pdfRISE PCE CAA Migration Options_wave4.pdf
RISE PCE CAA Migration Options_wave4.pdf
 
Oracle EPM Cloud for Midsize Customers
Oracle EPM Cloud for Midsize CustomersOracle EPM Cloud for Midsize Customers
Oracle EPM Cloud for Midsize Customers
 
Inforln.com Baan 4 to LN Differences Training - Multisite & Common Data
Inforln.com Baan 4 to LN Differences Training - Multisite & Common DataInforln.com Baan 4 to LN Differences Training - Multisite & Common Data
Inforln.com Baan 4 to LN Differences Training - Multisite & Common Data
 
Planning Your Migration to SharePoint Online #SPBiz60
Planning Your Migration to SharePoint Online #SPBiz60Planning Your Migration to SharePoint Online #SPBiz60
Planning Your Migration to SharePoint Online #SPBiz60
 
Rise with SAP
Rise with SAPRise with SAP
Rise with SAP
 
Power bi introduction
Power bi introductionPower bi introduction
Power bi introduction
 
Collab 365 building business solutions on Office 365 and SharePoint Online
Collab 365 building business solutions on Office 365 and SharePoint OnlineCollab 365 building business solutions on Office 365 and SharePoint Online
Collab 365 building business solutions on Office 365 and SharePoint Online
 
Understand the SharePoint Basics
Understand the SharePoint BasicsUnderstand the SharePoint Basics
Understand the SharePoint Basics
 
Sap Cloud Migration
Sap Cloud MigrationSap Cloud Migration
Sap Cloud Migration
 
SharePoint Tutorial and SharePoint Training - Introduction
SharePoint Tutorial and SharePoint Training - IntroductionSharePoint Tutorial and SharePoint Training - Introduction
SharePoint Tutorial and SharePoint Training - Introduction
 
Take the Next Step to S/4HANA with "RISE with SAP"
Take the Next Step to S/4HANA with "RISE with SAP"Take the Next Step to S/4HANA with "RISE with SAP"
Take the Next Step to S/4HANA with "RISE with SAP"
 
Technical Overview of Microsoft SharePoint Online - Presented by Atidan
Technical Overview of Microsoft SharePoint Online - Presented by AtidanTechnical Overview of Microsoft SharePoint Online - Presented by Atidan
Technical Overview of Microsoft SharePoint Online - Presented by Atidan
 
Sharepoint Basics
Sharepoint BasicsSharepoint Basics
Sharepoint Basics
 
SAP Cloud Platform - Integration, Extensibility & Services
SAP Cloud Platform - Integration, Extensibility & ServicesSAP Cloud Platform - Integration, Extensibility & Services
SAP Cloud Platform - Integration, Extensibility & Services
 
Overview of web services
Overview of web servicesOverview of web services
Overview of web services
 
Salesforce Training For Beginners | Salesforce Tutorial | Salesforce Training...
Salesforce Training For Beginners | Salesforce Tutorial | Salesforce Training...Salesforce Training For Beginners | Salesforce Tutorial | Salesforce Training...
Salesforce Training For Beginners | Salesforce Tutorial | Salesforce Training...
 
Top 10 New SharePoint Online Features
Top 10 New SharePoint Online FeaturesTop 10 New SharePoint Online Features
Top 10 New SharePoint Online Features
 
Siebel Upgrade Best Practices &amp; Processes V2
Siebel Upgrade Best Practices &amp; Processes V2Siebel Upgrade Best Practices &amp; Processes V2
Siebel Upgrade Best Practices &amp; Processes V2
 

Ähnlich wie Creating a Visio web part with SharePoint SPFx

How to integrate Visio 2013 and Visio Services 2013 with SharePoint to create...
How to integrate Visio 2013 and Visio Services 2013 with SharePoint to create...How to integrate Visio 2013 and Visio Services 2013 with SharePoint to create...
How to integrate Visio 2013 and Visio Services 2013 with SharePoint to create...
Knut Relbe-Moe [MVP, MCT]
 
Visio Services in SharePoint 2010
Visio Services in SharePoint 2010Visio Services in SharePoint 2010
Visio Services in SharePoint 2010
Alexander Meijers
 
Visio services in sharepoint 2013
Visio services in sharepoint 2013Visio services in sharepoint 2013
Visio services in sharepoint 2013
BIWUG
 
Hitchhiker’s Guide to SharePoint BI
Hitchhiker’s Guide to SharePoint BIHitchhiker’s Guide to SharePoint BI
Hitchhiker’s Guide to SharePoint BI
Andrew Brust
 

Ähnlich wie Creating a Visio web part with SharePoint SPFx (20)

Visio in the cloud
Visio in the cloudVisio in the cloud
Visio in the cloud
 
How to integrate Visio 2013 and Visio Services 2013 with SharePoint to create...
How to integrate Visio 2013 and Visio Services 2013 with SharePoint to create...How to integrate Visio 2013 and Visio Services 2013 with SharePoint to create...
How to integrate Visio 2013 and Visio Services 2013 with SharePoint to create...
 
Visio Services in SharePoint 2010
Visio Services in SharePoint 2010Visio Services in SharePoint 2010
Visio Services in SharePoint 2010
 
SPSOslo 2014 Visio Services
SPSOslo 2014 Visio Services SPSOslo 2014 Visio Services
SPSOslo 2014 Visio Services
 
Visio services in sharepoint 2013
Visio services in sharepoint 2013Visio services in sharepoint 2013
Visio services in sharepoint 2013
 
SPSOslo 2014 - Visio 2013 & Visio Services – A Quick Guide
SPSOslo 2014 - Visio 2013 & Visio Services – A Quick GuideSPSOslo 2014 - Visio 2013 & Visio Services – A Quick Guide
SPSOslo 2014 - Visio 2013 & Visio Services – A Quick Guide
 
Make your visio diagrams accessible to everyone
Make your visio diagrams accessible to everyoneMake your visio diagrams accessible to everyone
Make your visio diagrams accessible to everyone
 
Bpm portals with Visio and SharePoint
Bpm portals with Visio and SharePointBpm portals with Visio and SharePoint
Bpm portals with Visio and SharePoint
 
SPSNYC - Visio 2013 and Visio Services a quick guide
SPSNYC - Visio 2013 and Visio Services a quick guideSPSNYC - Visio 2013 and Visio Services a quick guide
SPSNYC - Visio 2013 and Visio Services a quick guide
 
Envision IT - SharePoint 2013 Web Content Managment
Envision IT - SharePoint 2013 Web Content Managment Envision IT - SharePoint 2013 Web Content Managment
Envision IT - SharePoint 2013 Web Content Managment
 
Hitchhiker’s Guide to SharePoint BI
Hitchhiker’s Guide to SharePoint BIHitchhiker’s Guide to SharePoint BI
Hitchhiker’s Guide to SharePoint BI
 
Microsoft Visio Detailed Presentation
Microsoft Visio Detailed PresentationMicrosoft Visio Detailed Presentation
Microsoft Visio Detailed Presentation
 
Share Point For Beginners V1
Share Point For Beginners V1Share Point For Beginners V1
Share Point For Beginners V1
 
Building dashboards with Visio Services
Building dashboards with Visio ServicesBuilding dashboards with Visio Services
Building dashboards with Visio Services
 
Data Visualization Made Easier in SharePoint 2010
Data Visualization Made Easier in SharePoint 2010Data Visualization Made Easier in SharePoint 2010
Data Visualization Made Easier in SharePoint 2010
 
Revit structure brochure
Revit structure    brochureRevit structure    brochure
Revit structure brochure
 
TechFuse 2012: SharePoint business applications at your fingertips
TechFuse 2012: SharePoint business applications at your fingertipsTechFuse 2012: SharePoint business applications at your fingertips
TechFuse 2012: SharePoint business applications at your fingertips
 
Sp biz conf - using office graph api
Sp biz conf - using office graph apiSp biz conf - using office graph api
Sp biz conf - using office graph api
 
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - Roadmap
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - RoadmapECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - Roadmap
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - Roadmap
 
Building modern intranets with share point communication sites aug 2018 kloud
Building modern intranets with share point communication sites aug 2018   kloudBuilding modern intranets with share point communication sites aug 2018   kloud
Building modern intranets with share point communication sites aug 2018 kloud
 

KĂźrzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

KĂźrzlich hochgeladen (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Creating a Visio web part with SharePoint SPFx

  • 1. Visit bVisual.net Embedding Visio diagrams in SharePoint and Teams using SPFx David J Parker, Microsoft MVP (Visio) March 2020
  • 2. Microsoft MVP (Visio) Independent Visio Consultant bVisual.net @VisioRules visiorules.com blog.bvisual.net visualizinginformation.com • Started as building architect (RIBA) • Linked CAD to databases for merchant banks in London & New York • Switched to Visio in mid ‘90’s • Founded bVisual in 1998 • Visio consultant, developer, trainer, blogger, author • 15 years MVP • UK based, global reach bit.ly/Visio2016Data About David J Parker
  • 3. Understanding the possibilities with Visio diagrams Reviewing the Visio JavaScript API Introducing the SharePoint Framework (SPFx) Creating a SPFx WebPart Supporting Microsoft Teams Adding the Visio package Agenda
  • 5. SharePoint Web page (View) Web Windows Desktop (Create/Edit) Windows Desktop SharePoint / OneDrive for Business Cloud Store Positioning Visio in the Web Data source Visio document JavaScript C++ .Net VB VBA VBA Visio document Visio document Power BI Visio document Visio document Power BI Desktop
  • 6. Interacting with Visio in the Cloud – March 2020 Visio documents in OneDrive or SharePoint Edit in Visio Plan 2* Create/ update diagrams View/Edit data View/ edit/ follow hyperlinks View/ edit layers Search text and data Print / Export Edit in Visio Plan 1 Simple diagrams Print / Export to pdf & image View in Visio File Viewer View data Follow hyperlinks Search text View in Visio Viewer for iOS View layers Search text * Windows only
  • 7. A Solution with Visio embedded in a SharePoint page
  • 8. Visio diagrams in file viewer or custom web pages
  • 9. Visio Desktop Custom Template Custom shapes • Automate appearance, colours, icons, hyperlink • Automatic high contrast text Linked SharePoint Lists • Centralise data for consistency • Automatically update shape data and colours Accessibility • Automate Alt Text • Automate text high contrast • Expose navigation order to interface Hyperlinks • Visio page to Visio page • Visio document to Visio document • Visio shape to documentation Validation rules • Ensure correct structure
  • 10. JavaScript API aided by Visio ShapeSheet Page loaded • Web part height adjusted suit the aspect ratio of the page • Significant shapes listed in navigation order • Legend is automatically displayed List item selected • Shape selected • Shape text, alt title and description displayed • Previous and Next buttons displayed • Hyperlinks are grouped by type Shape selected • Arrows go to other pages Mouse enters shape • Custom tooltip appears Shape data • Values provides data for list and groupings • Alt title and description automatically updated from shape data • Navigation order exposed in data Shape hyperlinks • Arrows can be clicked to go to other pages • Some hyperlinks open a target Visio document within the same web part • Some hyperlinks open external links in a controlled manner Shape graphics • Graphics change by data value or containment • Icons displayed if specific data or hyperlinks present
  • 12. Hierarchy of Objects in the JavaScript API Application Document DocumentView Page(s) PageView Selection/ Shape(s) ShapeView ShapDataItem(s) Hyperlink(s) Comment(s) Comment(s)
  • 13. Overview Application Document DocumentView Page PageView PageCollection ShapeCollection Shape ShapeView ShapeDataItemCollection HyperlinkCollection Hyperlink ShapeDataItem CommentCollection Comment <<Interface>> BoundingBox <<Interface>> Highlight <<Interface>> Position RequestContext Selection <<Interface>> DataRefreshCompleteEventArgs <<Interface>> DocumentLoadCompleteEventArgs <<Interface>> PageLoadCompleteEventArgs <<Interface>> PageRenderCompleteEventArgs <<Interface>> SelectionChangedEventArgs <<Interface>> ShapeMouseEnterEventArgs <<Interface>> ShapeMouseLeaveEventArgs <<Enumeration>> ErrorCodes <<Enumeration>> OverlayHorizontalAlignment <<Enumeration>> OverlayType <<Enumeration>> OverlayVerticalAlignment <<Enumeration>> ToolBarType Visio JavaScript API -context -load(...) -showBorders -showToolbars -set(...) -showToolbar(...) -toJSON() -application -getActivePage() -context -pages -view -load(...) -set(...) -setActivePage(...) -startDataRefresh() -toJSON() -context -disableHyperlinks -load(...) -set(...) -disablePan -disablePanZoomWindow -disableZoom -hideDiagramBoundary -toJSON() -allShapes -activate() -context -height -index -load(...) -set(...) -toJSON() -comments -isBackground -name -shapes -view -width -context -load(...) -set(...) -zoom -toJSON() -context -getCount() -items -toJSON() -getItem(...) -load(...) -context -getCount() -items -toJSON() -getItem(...) -load(...) -getBounds() -context -hyperlinks -id -load(...) -set(...) -toJSON() -comments -name -subShapes -view -select -shapeDataItems -text -context -addOverlay(...) -set(...) -highlight -toJSON() -load(...) -removeOverlay(...) -showOverlay(...) -getCount() -toJSON() -getItem(...) -load(...) -context -getCount() -items -toJSON() -getItem(...) -load(...) -context -description -extraInfo -load(...) -toJSON() -address -subAddress -context -format -formattedValue -load(...) -toJSON() -label -value -context -getCount() -items -toJSON() -getItem(...) -load(...) -context -date -text -load(...) -toJSON() -author -set(...) -height -width -x -y -color -width -x -y -(constructor)(url) -document -context -shapes -toJSON() -load(...) -document -success -success -pageName -success -pageName -success -pageName -shapeNames -pageName -shapeName -pageName -shapeName -accessDenied -unsupportedOperation -generalException -itemNotFound -notImplemented -center -left -right -html -image -text -bottom -middle -top -commandBar -pageNavigationBar -statusBar -context -items Classes Interfaces Enums
  • 14. Application to Page Classes Application Document DocumentView Page PageView PageCollection ShapeCollection Shape ShapeView <<Interface>> BoundingBox <<Interface>> Highlight <<Interface>> Position RequestContext Selection <<Interface>> DataRefreshCompleteEventArgs <<Interface>> DocumentLoadCompleteEven <<Interface>> PageLoadCompleteEventArgs <<Interface>> PageRenderCompleteEventArg<<Enumeration>> ErrorCodes <<Enumeration>> ToolBarType -context -load(...) -showBorders -showToolbars -set(...) -showToolbar(...) -toJSON() -application -getActivePage() -context -pages -view -load(...) -set(...) -setActivePage(...) -startDataRefresh() -toJSON() -context -disableHyperlinks -load(...) -set(...) -disablePan -disablePanZoomWindow -disableZoom -hideDiagramBoundary -toJSON() -allShapes -activate() -context -height -index -load(...) -set(...) -toJSON() -comments -isBackground -name -shapes -view -width -context -load(...) -set(...) -zoom -toJSON() -context -getCount() -items -toJSON() -getItem(...) -load(...) -context -getCount() -items -toJSON() -getItem(...) -load(...) -getBounds() -context -hyperlinks -id -load(...) -set(...) -toJSON() -comments -name -subShapes -view -select -shapeDataItems -text -context -addOverlay(...) -set(...) -highlight -toJSON() -load(...) -removeOverlay(...) -showOverlay(...) -height -width -x -y -color -width -x -y -(constructor)(url) -document -context -shapes -toJSON() -load(...) -document -success -success -pageName -success -pageName -success-accessDenied -commandBar Classes • Application • RequestContext • Document • DocumentView • PageCollection • Page • PageView
  • 15. Selection and Shape Classes Application Document DocumentView Page PageView PageCollection ShapeCollection Shape ShapeView ShapeDataItemCollection HyperlinkCollection Hyperlink ShapeDataItem CommentCollection Comment <<Interface>> BoundingBox <<Interface>> Highlight <<Interface>> Position RequestContext Selection <<Interface>> DataRefreshCompleteEventArgs <<Interface>> DocumentLoadCompleteEventArgs <<Interface>> PageLoadCompleteEventArgs <<Interface>> PageRenderCompleteEventArgs<<Enumeration>> ErrorCodes <<Enumeration>> ToolBarType -context -load(...) -showBorders -showToolbars -set(...) -showToolbar(...) -toJSON() -application -getActivePage() -context -pages -view -load(...) -set(...) -setActivePage(...) -startDataRefresh() -toJSON() -context -disableHyperlinks -load(...) -set(...) -disablePan -disablePanZoomWindow -disableZoom -hideDiagramBoundary -toJSON() -allShapes -activate() -context -height -index -load(...) -set(...) -toJSON() -comments -isBackground -name -shapes -view -width -context -load(...) -set(...) -zoom -toJSON() -context -getCount() -items -toJSON() -getItem(...) -load(...) -context -getCount() -items -toJSON() -getItem(...) -load(...) -getBounds() -context -hyperlinks -id -load(...) -set(...) -toJSON() -comments -name -subShapes -view -select -shapeDataItems -text -context -addOverlay(...) -set(...) -highlight -toJSON() -load(...) -removeOverlay(...) -showOverlay(...) -getCount() -toJSON() -getItem(...) -load(...) -context -getCount() -items -toJSON() -getItem(...) -load(...) -context -description -extraInfo -load(...) -toJSON() -address -subAddress -context -format -formattedValue -load(...) -toJSON() -label -value -context -getCount() -items -toJSON() -getItem(...) -load(...) -context -date -text -load(...) -toJSON() -author -set(...) -height -width -x -y -color -width -x -y -(constructor)(url) -document -context -shapes -toJSON() -load(...) -document -success -success -pageName -success -pageName -success-accessDenied -commandBar -context -items Classes • ShapeCollection • Selection • Shape • ShapeView • ShapeDateItemCollection • HyperlinkCollection • CommentCollection • ShapeDataItem • Hyperlink • Comment
  • 16. Misc Interfaces and Enums DocumentView PageView ShapeView <<Interface>> BoundingBox <<Interface>> Highlight <<Interface>> Position RequestContext Selection <<Interface>> DataRefreshCompleteEventArgs <<Interface>> DocumentLoadCompleteEventA <<Interface>> PageLoadCompleteEventArgs <<Interface>> PageRenderCompleteEventArgs <<Interface>> SelectionChangedEventArgs <<Interface>> ShapeMouseEnterEventArgs <<Interface>> ShapeMouseLeaveEventArgs <<Enumeration>> ErrorCodes <<Enumeration>> OverlayHorizontalAlignment <<Enumeration>> OverlayType <<Enumeration>> OverlayVerticalAlignment <<Enumeration>> ToolBarType -toJSON() -view -load(...) -setActivePage(...) -startDataRefresh() -context -disableHyperlinks -load(...) -set(...) -disablePan -disablePanZoomWindow -disableZoom -hideDiagramBoundary -toJSON() -activate() -load(...) -set(...) -toJSON() -name -shapes -view -width -context -load(...) -set(...) -zoom -toJSON() -getBounds() -load(...) -set(...) -toJSON() -subShapes -view -shapeDataItems -text -context -addOverlay(...) -set(...) -highlight -toJSON() -load(...) -removeOverlay(...) -showOverlay(...) -height -width -x -y -color -width -x -y -(constructor)(url) -document -context -shapes -toJSON() -load(...) -document -success -success -pageName -success -pageName -success -pageName -shapeNames -pageName -shapeName -pageName -shapeName -accessDenied -unsupportedOperation -generalException -itemNotFound -notImplemented -center -left -right -html -image -text -bottom -middle -top -commandBar -pageNavigationBar -statusBar Miscellaneous Interfaces • BoundingBox • Highlight • Position Enums • ErrorCodes • ToolBarType • OverlayType • OverlayHorizontalAlignment • OverlayVerticalAlignment
  • 17. EventArg Interfaces DocumentView PageView ShapeView CommentCollection Comment <<Interface>> BoundingBox <<Interface>> Highlight <<Interface>> Position RequestContext <<Interface>> DataRefreshCompleteEventArgs <<Interface>> DocumentLoadCompleteEventArgs <<Interface>> PageLoadCompleteEventArgs <<Interface>> PageRenderCompleteEventArgs <<Interface>> SelectionChangedEventArgs <<Interface>> ShapeMouseEnterEventArgs <<Interface>> ShapeMouseLeaveEventArgs <<Enumeration>> ErrorCodes <<Enumeration>> OverlayHorizontalAlignment <<Enumeration>> OverlayType <<Enumeration>> OverlayVerticalAlignment <<Enumeration>> ToolBarType Visio JavaScript API -context -disableHyperlinks -load(...) -set(...) -disablePan -disablePanZoomWindow -disableZoom -hideDiagramBoundary -toJSON() -activate() -load(...) -set(...) -toJSON() -context -load(...) -set(...) -zoom -toJSON() -getBounds() -load(...) -set(...) -toJSON() -context -addOverlay(...) -set(...) -highlight -toJSON() -load(...) -removeOverlay(...) -showOverlay(...) -getCount() -toJSON() -getItem(...) -load(...) -context -description -extraInfo -load(...) -toJSON() -address -subAddress -context -getCount() -items -toJSON() -getItem(...) -load(...) -context -date -text -load(...) -toJSON() -author -set(...) -height -width -x -y -color -width -x -y -(constructor)(url) -document -shapes -toJSON() -load(...) -document -success -success -pageName -success -pageName -success -pageName -shapeNames -pageName -shapeName -pageName -shapeName -accessDenied -unsupportedOperation -generalException -itemNotFound -notImplemented -center -left -right -html -image -text -bottom -middle -top -commandBar -pageNavigationBar -statusBar -context -items EventArgs Interfaces • DataRefreshCompleteEventsArgs • DocumentLoadCompleteEventArgs • PageLoadEventArgs • PageRefreshEventArgs • SelectionChangedEventArgs • ShapeMouseEnterEventArgs • ShapeMouseLeaveEventArgs
  • 19. SPFx is a page and web part model • provides full support for client-side SharePoint development It is framework-agnostic. • use any JavaScript framework like React, Handlebars, Knockout, Angular, and more End users can use SPFx client-side solutions • if approved by the tenant administrators (or their delegates) on all sites • including self-service team, group, or personal sites. SPFx web parts are multi-functional • can be added to both classic and modern pages • can be made into Microsoft Teams Tabs or Personal Apps What is the SharePoint Framework (SPFx )?
  • 20. Toolset Comparison nodeJs • Asynchronous event-driven JS runtime npm • Node Package Manager Visual Studio Code • Code editor for modern web development Yeoman • Generic scaffolding system TypeScript • Syntactical superset of JavaScript, with static typing Gulp • Build tool
  • 22. Creating a SharePoint and/or Teams web part •docs.microsoft.com/sharepoint/dev/spfx/set-up-your-developer-tenant Set up the Office 365 tenant •docs.microsoft.com/sharepoint/dev/spfx/set-up-your-development-environment •MUST be NodeLJ LTS version 10 Set up the development environment •docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part •Select React framework rather than No JavaScript framework •Add url and zoomLevel extra properties, rather than the test* rows Build a web part •docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/using-web-part-as-ms-teams-tab Add support for Teams •docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/serve-your-web-part-in-a-sharepoint-page Deploy to SharePoint •Available as SharePoint web part, a Teams Tab or a Teams Personal App Sync to Teams
  • 23. Add Visio service to the web part •npm install @types/office-js save • Add type “office-js” to the tsconfig.json Install OfficeJS • Add external reference to visio-web-embedded.js in config/config.json • Create src/shared/services folder • Add index.ts file • Add sample VisioService.ts file from bit.ly/2uQ5dn8 Add Visio Service • Add import { VisioService } from "../../../shared/services"; • Update export visioService: VisioService; Update Props interface •Add .iframeHost{height: 600px;width:100%;} Update styles • Update render() by replacing most <div>s with iframeHost div • Add componentDidMount() and componentDidUpdate() Update tsx file • Add import 'officejs'; • Add import { VisioService } from '../../shared/services'; • Update the interface with visioService: VisioService; • Declare private _visioService: VisioService; • Add onInit() function • Add visioService: this._visioService, to the ReactElement Update WebPart
  • 24. Add Teams support for the Visio service • docs.microsoft.com/javascript/api/overview/msteams- client?view=msteams-client-js-latest • npm install --save @microsoft/teams-js Install Teams client SDK • Add import * as microsoftTeams from "@microsoft/teams-js"; • Update export teamsContext: microsoftTeams.Context; Update Props interface • Add import * as microsoftTeams from "@microsoft/teams-js"; • Declare private _teamsContext: microsoftTeams.Context; • Update onInit() function to add alternate retVal • Update ReactElement teamsContext: this._teamsContext,Update WebPart
  • 25. Deploy to SharePoint and Teams •docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/serve-your-web-part-in-a-sharepoint-page •>gulp bundle --ship •>gulp package-solution --shipDeploy to SharePoint •Available as SharePoint web part, a Teams Tab or a Teams Personal App •Drag and drop the package in sites/AppCatlog/AppCatalog •Tick make available to all sites •Click Sync to Teams Sync to Teams Add the web part in SharePoint Add the Tab in Teams Add the Personal App in Teams
  • 26. Learn how to integrate data with SmartShapes Mastering Data Visualization with Microsoft Visio… Publisher’s website : bit.ly/Visio2016Data Power Up Visio … a White Paper on Visio with Power BI Available from : bit.ly/PowerUpVisio
  • 27. Š Copyright Microsoft Corporation. All rights reserved. Creating Visio Tabs and Apps for Teams with SharePoint Framework (SPFx) /bvisual.net/creating-visio-tabs-and-apps-for-teams-with-sharepoint-framework-spfx/
  • 28. Visit bVisual.net Thank you. David J Parker, Microsoft MVP (Visio) davidp@bvisual.net blog.bvisual.net @VisioRules

Hinweis der Redaktion

  1. I am proud to have been a Microsoft MVP for 15 years, but before that I was a European Business Partner for Visio Corporation until they were acquired by Microsoft in 2000. At that time I was mainly concerned with visualizing the location of personnel and equipment in trading floors and comms rooms of large merchant banks in London and New York. Visio provided the graphical interface into the reams of information held in the corporate database, but it was normally presented to end users as paper plots and prints, created as weekly or monthly reports. We could respond to ad-hoc queries by using our Visio and database skills to locate, highlight and display or print particular regions or assets, but often this required a little bit of coding skills to facilitate it. Indeed, one of my main reasons for starting to use Visio was its graphical flexibility and ability to link shapes to database records. How much easier would it have been if I could have embedded my Visio drawings into PowerBI, and link the shapes to the database directly? The end-user could then ask their own questions, without having to get me to write some custom code. See http://bvisual.net/Case_Studies/ChaseManhattanBank.aspx for a case study of my experiences back then. See http://visio.mvps.org/History/default.html for history of Visio
  2. https://docs.microsoft.com/javascript/api/visio https://docs.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview
  3. JavaScript API
  4. Search text can be entered utilizing SharePoint search of both shape text and shape data Visio diagrams that contain a match are displayed in a list A customised SharePoint web page is opened The first page of the Visio document is loaded and the web part height automatically changes to suit the aspect ratio of the page, maintaining the width as a constant thus allowing the web page height to vary The significant shapes are listed in navigation order if a user selects a list item, then the shape text, Alt title and description are displayed Previous and Next buttons displayed automatically to assist navigation Any hyperlinks are grouped by type A legend is automatically displayed Arrows can be clicked to go to other pages Taller diagrams can be scrolled vertically The shape text automatically displays black or white for the highest contrast The pan & zoom window can be opened The tooltip appears automatically when the cursor enters a shape Can use the pan and zoom window to re-position the visible area The diagram can be toggled between cross-functional and simple flowchart The grade plates automatically appear if displayed without swimlanes Each shape automatically displays icons to denote if specific data or hyperlinks are present
  5. This was all achieved with just the custom ShapeSheet formulas, and built-in Visio functionality, such as linking to external data. In fact, all of the custom shapes were only provided in the document stencil of the template, so no custom stencils were provided, and the template could be delivered as a content type in a SharePoint library for all diagram creators to utilise.
  6. https://docs.microsoft.com/javascript/api/visio https://docs.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview
  7. The Visio JavaScript API provides read-only access to the Visio documents, and the hierarchy of the classes available can conceptually understood as follows: This is broadly a small subset of the Visio desktop API, with a similar hierarchy. There is more detail of the API at docs.microsoft.com/javascript/api/visio, and an overview is available at docs.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview. Here is a breakdown of the classes, interfaces and enums:
  8. These classes provide context of the Visio diagram in view, and there can only be one Document object within the web part at any time. It is important to realise that a Page needs to be loaded into view before any of its contents, such as shapes or comments can be accessed. Most of the UI elements that are visible in the default Visio file viewer can be made visible or invisible in the Application or DocumentView objects. Each page, and shape, can contain a collection of comments. It is often useful to disable the hyperlinks in the web-part and to handle them either in a panel alongside or within a popup dialog. This will provide the opportunity to intercept and transform these hyperlinks into something more useful, such as allowing the switching the Visio document within the web-part.
  9. The sub-shapes, data, hyperlinks and comments of each shape can be loaded, but there is no access to any data held in the User-Defined Cells section of the Visio shapes. This means that any values, such as the navigation order, that Visio desktop stores in this section must be made visible in the Shape Data section if its value needs to accessed using the JavaScript API. In addition to setting the selected shape within the visible page, there is the ability to add text, image or html overlays to shapes. Note that the ShapeDataItem object does not have the Type or Visible properties that can be found in the Visio desktop shape objects. Similarly, the Hyperlink object does not have a Visible property. Therefore it is usually best not to display the built-in Shape Info panel which does not control the display of these items.
  10. These few interfaces and enums provide a structure to some properties.
  11. There are very few events available within the API, but they are sufficient to create interactive dashboards.
  12. It runs in the context of the current user and connection in the browser. There are no iFrames for the customization (JavaScript is embedded directly to the page). The controls are rendered in the normal page DOM. The controls are responsive and accessible by nature. It enables the developer to access the lifecycle in addition to render, load, serialize and deserialize, configuration changes, and more. It is framework-agnostic. You can use any JavaScript framework that you like: React, Handlebars, Knockout, Angular, and more. The toolchain is based on common open source client development tools such as npm, TypeScript, Yeoman, webpack, and gulp. Performance is reliable. End users can use SPFx client-side solutions that are approved by the tenant administrators (or their delegates) on all sites, including self-service team, group, or personal sites. SPFx web parts can be added to both classic and modern pages
  13. SharePoint Framework (SPFx) is a webpart component and page model that fully supports customer-side SharePoint development tasks, provides easy integration with SharePoint data, and supports open source tools. With SharePoint Framework, you can use modern web technologies and tools in your preferred development environment to create productive applications and experiences that are responsive and usable on mobile from the first Day. SharePoint Framework works for SharePoint locally and SharePoint Online (SharePoint 2016 Feature Pack 2 and SharePoint 2019). The main features of SharePoint Framework are: It runs in the context of the current user and the connection in the browser. There is no iFrame for customization (JavaScript is embedded directly in the page). Controls are displayed in a normal page DOM. The controls are responsive and accessible by nature. It allows the developer to access the lifecycle, in addition to rendering, loading, serialization and de-serialization tasks, configuration modification, and much more. It does not depend on infrastructure. You can use any JavaScript infrastructure that's right for you: React, Handlebars, Knockout, Angular and more. The toolchain uses common open source customer development tools, such as npm, TypeScript, Yeoman, webpack and Gulp. Reliable performance. End-users can use customer-side SPFx solutions approved by customer administrators (or their delegates) on all sites, including group sites, personal sites or self-service team sites. WebPart SPFx components can be added to classic and modern pages.
  14. Andrew Connell, MVP at Voitanus https://www.voitanos.io/understanding-the-sharepoint-framework-development-toolchain-email-course
  15. https://docs.microsoft.com/javascript/api/visio https://docs.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview
  16. https://docs.microsoft.com/sharepoint/dev/spfx/set-up-your-developer-tenant https://docs.microsoft.com/sharepoint/dev/spfx/set-up-your-development-environment https://docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part https://docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/serve-your-web-part-in-a-sharepoint-page https://docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/using-web-part-as-ms-teams-tab https://bvisualnet.sharepoint.com/sites/AppCatalog/AppCatalog/Forms/AllItems.aspx HelloWorldProp.ts HelloWorld.tsx               <p className={ styles.description }>{escape(this.props.url)}</p>               <p className={ styles.description }>{escape(this.props.zoomLevel)}</p> HelloWorldWebPart.ts         url: string;         zoomlevel: string;               }),               PropertyPaneTextField('url', {                 label: 'Visio Document URL',                 multiline: true               }),               PropertyPaneTextField('zoomlevel', {                 label: 'Zoom Level’ HelloWorldWebPart.manifest.json ,       "url": "https://bvisualnet.sharepoint.com/:u:/r/vol/_layouts/15/Doc.aspx?sourcedoc=%7BCB3B9A82-B678-48C8-AF58-44446BD27C1B%7D&file=GAP.vsdx&action=default",       "zoomlevel": "100"
  17. https://docs.microsoft.com/javascript/api/overview?view=visio-js-1.1 The JavaScript API for Office enables you to create web applications that interact with the object models in Office host applications. Use this section to learn more about the classes, methods, and other types available for building Office Add-ins. "officejs": { "path": "https://appsforoffice.microsoft.com/embedded/1.0/visio-web-embedded.js", "globalName": "officejs" } Tsx <div id='iframeHost' className={styles.iframeHost}></div> export * from "./VisioService"; .iframeHost{ height: 600px; width:100%; }     public componentDidMount() {         if (this.props.url) {           this.props.visioService.load(this.props.url, this.props.zoomLevel);         }       }        public async componentDidUpdate(prevProps: IHelloWorldProps) {         if ((this.props.url && this.props.url !== prevProps.url) ||           (this.props.zoomLevel != prevProps.zoomLevel)) {           this.props.visioService.load(this.props.url, this.props.zoomLevel);         }       } private _visioService: VisioService;   public onInit(): Promise<void> {     this._visioService = new VisioService(this.context);     let retVal: Promise<any> = Promise.resolve();     return retVal;   } visioService: this._visioService,
  18. https://docs.microsoft.com/javascript/api/overview?view=visio-js-1.1     if (this.context.sdks.microsoftTeams) {       retVal = new Promise((resolve, reject) => {           microsoftTeams.getContext(context => {           this._teamsContext = context;           resolve();         });       });     }
  19. https://docs.microsoft.com/sharepoint/dev/spfx/set-up-your-developer-tenant https://docs.microsoft.com/sharepoint/dev/spfx/set-up-your-development-environment https://docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part https://docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/serve-your-web-part-in-a-sharepoint-page https://docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/using-web-part-as-ms-teams-tab https://bvisualnet.sharepoint.com/sites/AppCatalog/AppCatalog/Forms/AllItems.aspx HelloWorldProp.ts HelloWorld.tsx               <p className={ styles.description }>{escape(this.props.url)}</p>               <p className={ styles.description }>{escape(this.props.zoomLevel)}</p> HelloWorldWebPart.ts         url: string;         zoomlevel: string;               }),               PropertyPaneTextField('url', {                 label: 'Visio Document URL',                 multiline: true               }),               PropertyPaneTextField('zoomlevel', {                 label: 'Zoom Level’ HelloWorldWebPart.manifest.json ,       "url": "https://bvisualnet.sharepoint.com/:u:/r/vol/_layouts/15/Doc.aspx?sourcedoc=%7BCB3B9A82-B678-48C8-AF58-44446BD27C1B%7D&file=GAP.vsdx&action=default",       "zoomlevel": "100"
  20. Of course, I would encourage you all to invest in my book about data visualization with Visio, which covers just about everything except Power BI, so I have also written a White Paper that you can download via my website.