Customized Chart

Customized Chart 1

We can customized chart at any level, with filters and custom css Here we are representing a company departments and employees.

Click on Name to view popup.

Print Chart

CSS

To achieve similar chart as above, add CSS shown below to area from where you are managing your theme’s style, it can be style.css under theme folder, Additional CSS under customizer or under theme option panel. 

As shown below “.chart_682″ , replace 682 with your chart ID used in shortcode. You must have noticed this style is not for mobile and media query is used to avoid any conflicts. 

@media only screen and (min-width:767px) {
.chart_682 .jOrgChart .node {
    position: unset;
    font-size: 15px;
    border: 1px solid #e5e5e5;
    color: #333;
    width: 200px ;
    max-width: 200px ;
    
    border-radius: 8px;
    padding: 0 0px 0px 0px;
}

.chart_682 .jOrgChart .node img {
    width: 80px;
    float: left;
    margin-right: 10px;
    border-top-left-radius:8px;
    border-bottom-left-radius:8px;
}

.chart_682 .jOrgChart .node > a {
    display: inline-block;
    text-align: left;
        float: left;
        padding:5px !important;
        font-size:18px;
        width:100%;
        background-color: whitesmoke !important;
        border-radius: 8px;
        
}
.chart_682 .jOrgChart .node > a  small{

    clear:none;
}

.social_popup {
    padding: 20px 0 0;
}
.social_popup i {
    font-size: 21px;
    margin-right: 15px;
}

i.fa.fa-facebook {
    color: #3B5997;
}
i.fa.fa-twitter {
    color: #1DA0F1;
}

i.fa.fa-linkedin {
    color: #0077B5;
}
.white-popup {
    border-radius: 13px;
}
}

PHP

In order to display social media icon on popup like demo, copy PHP code shown below to your theme or child-theme functions.php file. You can modify it to display any information after popup content. Social media links can be pulled using “$user_id“.

Minimum version – 1.0.2

add_action("popup_content", "org_social_icon", 15, 2);

function org_social_icon($chart_id, $user_id) {
	
	$out = "";	
	$out .= "<div class='social_popup'>";
	$out .= '<i class="fa fa-facebook"></i>';
	$out .= '<i class="fa fa-twitter"></i>';
	$out .= '<i class="fa fa-linkedin"></i>';
	$out .= "</div>";
	echo $out;
	}