Skip to content

Instantly share code, notes, and snippets.

View thinkb4code's full-sized avatar

Manish Singh Rana thinkb4code

View GitHub Profile
@thinkb4code
thinkb4code / bar-graph.html
Created February 11, 2020 19:35
Bar graph using SharePoint column formatting
<!-- This HTML is converted to JSON schema for column formatting -->
<div style="position: relative; width: 37px; height: 26px; background-color: #aaa;">
<!-- Div having color -->
<div style="position: absolute; bottom: 0; left: 0; height: 6px; border: 1px solid #333; width: 8px; z-index: 10000;"></div>
<div style="position: absolute; bottom: 0; left: 9px; height: 12px; border: 1px solid #333; width: 8px; z-index: 10000;"></div>
<div style="position: absolute; bottom: 0; left: 18px; height: 18px; border: 1px solid #333; width: 8px; z-index: 10000;"></div>
<div style="position: absolute; bottom: 0; left: 27px; height: 24px; border: 1px solid #333; width: 8px; z-index: 10000;"></div>
<!-- Div not having color -->
<div style="position: absolute; top: 0; left: 0; height: 18px; width: 9px; background-color: #fff; z-index: 10000;"></div>
<div style="position: absolute; top: 0; left: 9px; height: 12px; width: 9px; background-color: #fff; z-index: 10000;"></div>
@thinkb4code
thinkb4code / gist:d33e1c65628918af0dc465e4f32a7ba1
Last active October 2, 2019 19:33
Update home page layout, SPO using Powershell
$cred = Get-Credential -Message "Login to SPO"
Connect-PnPOnline https://<tenant>.sharepoint.com/sites/<site_coll> -Credentials $cred
$page = Get-PnPClientSidePage -Identity "Home.aspx"
$page.LayoutType
Set-PnPClientSidePage -Identity "Home.aspx" -LayoutType Home