2323import com .flowingcode .vaadin .addons .demo .DemoSource ;
2424import com .flowingcode .vaadin .addons .orgchart .extra .TemplateLiteralRewriter ;
2525import com .vaadin .flow .component .dependency .CssImport ;
26+ import com .vaadin .flow .component .html .Anchor ;
27+ import com .vaadin .flow .component .html .Div ;
2628import com .vaadin .flow .component .orderedlayout .VerticalLayout ;
2729import com .vaadin .flow .router .PageTitle ;
2830import com .vaadin .flow .router .Route ;
3941@ CssImport ("./styles/orgchart/hybrid-demo-styles.css" )
4042public class HybridEnhancedChartDemo extends VerticalLayout {
4143
42- public HybridEnhancedChartDemo () {
44+ public HybridEnhancedChartDemo () {
4345 OrgChart orgchart = getExample1 ();
4446 String nodeTemplate = "<div class='title'>"
4547 + "${item.data.imageUrl?`<img class='avatar'src=${item.data.imageUrl}></img>`:''}"
@@ -55,10 +57,18 @@ public HybridEnhancedChartDemo() {
5557 // make the chart to show children as vertical starting in level 3
5658 orgchart .setChartVerticalDepth (3 );
5759
58- orgchart .setChartTitle ("My Organization Chart Demo - Example 4 - HYBRID CHART WITH CUSTOM TEMPLATE" );
60+ // images license
61+ Div iconsDiv = new Div ();
62+ Anchor iconsAnchor = new Anchor ("https://www.flaticon.com/free-icons/people" , "People icons created by Creartive - Flaticon" );
63+ iconsAnchor .setTitle ("people icons" );
64+ iconsDiv .add (iconsAnchor );
65+
66+ orgchart .setChartTitle ("My Organization Chart Demo - Example 4 - HYBRID CHART WITH CUSTOM TEMPLATE" + iconsDiv .getElement ());
5967
6068 setSizeFull ();
6169 add (orgchart );
70+
71+
6272 }
6373
6474 private OrgChart getExample1 () {
0 commit comments