Customized Chart 2

We can customize chart at any level, with filters and custom css Here we are representing chart with custom design of each node.

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_694″ , 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_694 .jOrgChart .node {
    font-size: 19px;
    border: 0px solid #e5e5e5;
    max-width: 150px;
}
.chart_694 .jOrgChart .node img {
    border-radius: 50%;
    box-shadow: 0px 0px 3px 1px #0000007d;
    margin-bottom: 10px !important;
    
}
.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;
}
    
}

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;
	}
Scroll to Top