Git Product home page Git Product logo

new-udorgchart's Introduction

New-UDOrgChart

Bringing the Google OrgChart to UD from https://github.com/RakanNimer/react-google-charts

Hello Folks

Brining you another new component for the mighty UniversalDashboard this is an implementation of the Google OrgChart but now ready to use in UniversalDashboard

Parameters

  • -Data Ok this is a 3 dimensional multi array that needs to have a header else the chart won't render (see example)
  • -Height Sets the height of the component this is a string value, an example of using this is in the demo below
  • -Width Sets the width of the component this is a string value, an example of using this is in the demo below

Demostration

I am blessed to be married with 4 kids (all girls) and some animals for good measure. So what better way to demonstrate this component than with my family orgchart

Import-Module -Name UniversalDashboard
Import-Module -Name UniversalDashboard.UDOrgChart
Get-UDDashboard | Stop-UDDashboard
Start-UDDashboard -Port 10005 -Dashboard (
    New-UDDashboard -Title "Powershell UniversalDashboard" -Content {
        $MultiArray = @()
        # MAKE SURE YOU GIVE THE ARRAY A HEADING THE THIRD HEADING IS A TOOLTIP
        $MultiArray += , @('Name', 'Position', 'ToolTip' )
        # THIS IS THE PERSON APPEARING AT THE TOP
        $MultiArray += , @('Mum', '', 'The Boss')
        # NEST THE PEOPLE UNDERNEATH BY RELATING THEM TO THE MASTER IN THE SECOND ENTRY ON THE ARRAY
        $MultiArray += , @('Dad', 'Mum', 'Second-In-Charge')
        $MultiArray += , @('Dad', 'Mum', '')
        #NOW ADDING MY CHILDREN AND ANIMALS ACCORDING TO WHO OWNS THEM
        $MultiArray += , @('Laila-Belle', 'Dad', 'Eldest Child')
        $MultiArray += , @('Pixie', 'Dad', 'Second Eldest')
        $MultiArray += , @('Zelda', 'Dad', 'Third Eldest')
        $MultiArray += , @('Aurora', 'Dad', 'Youngest')
        $MultiArray += , @('Penny', 'Laila-Belle', 'Hamster')
        $MultiArray += , @('Princess', 'Pixie', 'Youngest cat')
        $MultiArray += , @('Trumpet', 'Mum', 'Cat with attitude')
        $MultiArray += , @('Simba', 'Dad', 'My boy dog')
        $MultiArray += , @('Laurie', 'Mum', 'girl dog')
        New-UDOrgChart -Id "ORGCHART" -data @($MultiArray) -Width "500px" -Height "500px"
    }
)

Round-up

I hope that you will see the great potentials of using this, it does also support HTML, but I haven't got round to testing that just yet. It works in UD, and the parameters passed work, so that's a pass in my book.

new-udorgchart's People

Contributors

psdevuk avatar

Stargazers

Grzegorz Kulikowski avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.