orgchart

Is there any options for customizing search results template?


I need to customize default template of search results of BALKANGraph OrgChartJS. Where do i find the solution for customizing template?


Solution

  • BALKANGraph developer here

    you can customize the search result with CSS

    also you can implement your own search result ui by defining mySearchUI class:

    var mySearchUI = function () {
    };
    
    mySearchUI.prototype.init = function (obj) {
        this.obj = obj;
    };
    
    mySearchUI.prototype.hide = function () {
    
    };
    
    mySearchUI.prototype.show = function (callback) {
    
    };
    
    mySearchUI.prototype.addSearchControl = function () {
    
    };
    
    mySearchUI.prototype.find = function (value) {
    
    };
    

    And

    var chart = new OrgChart(document.getElementById("tree"), {
        nodeBinding: {
            field_0: "name"
        },
        nodes: [
            { id: 1, name: "Amber McKenzie" },
            { id: 2, pid: 1, name: "Ava Field" },
            { id: 3, pid: 1, name: "Peter Stevens" }
        ],
        searchUI: new mySearchUI()
    });