## Graph2d | Groups Example

This example shows the groups visibility functionality within Graph2d. Groups have their own visibility option. By using this, all graph2d instances using those groups would show or hide that group. If you have multiple instances sharing the same data and groups, you can use the groups.visibility option to set it on an instance level. The graphs below all share the same groups, items and initial options. We then use a setOptions like so:

            graph2d1.setOptions({
                groups:{
                    visibility:{
                        0:true,               // group id:0 visible
                        1:false,              // group id:1 hidden
                        2:false,              // group id:2 hidden
                        3:false,              // group id:3 hidden
                        "__ungrouped__":false // default group hidden
                    }
                }
            })