GraphAlchemist / Alchemy

Other
517 stars 232 forks source link

Editor and zoom controls do not show up #544

Open matysjan opened 9 years ago

matysjan commented 9 years ago

Hi,

editor and zoom controls don't show up. I tried Firefox 36 and Chrome 40. The results were the same.

Does anyone know what I'm doing wrong?

Here's my code:

<html>
    <head>
        <link rel="stylesheet" href="graph_alchemist/0.4.2/styles/vendor.css"/>
        <link rel="stylesheet" href="graph_alchemist/0.4.2/styles/alchemy.css"/>        
        <title>Graph</title>
    </head>
    <body>
        <h1>Testing</h1>

        <div class="alchemy" id="alchemy"></div>                
        <script src="graph_alchemist/0.4.2/scripts/vendor.js"></script>
        <script src="graph_alchemist/0.4.2/scripts/alchemy.js"></script>        
        <script type="text/javascript">
            var config = {
                dataSource: "simple-roles.json",                            

                linkDistance: function(){ return 40; },

                graphWidth: function(){ return 800; },
                graphHeight: function(){ return 600; },                                

                nodeTypes: {"type": ["Role"]},
                edgeTypes: {"type": ["APPROVES", "CONTAINS"]},

                nodeStyle: {  
                    "Role": {                        
                        "highlighted": {
                            "color": "orange",
                            "captionColor": "orange",
                        },    
                        "selected": {
                            "color": "red",
                            "captionColor": "red",
                        },
                    }   
                },    
                edgeStyle: {
                    "APPROVES": {
                      "width": 4,
                      "color": "#8A00B8",
                      "opacity": 0.8, 
                      "hidden": {
                        "opacity": 0
                      }
                    },
                    "CONTAINS": {
                      "width": 4,
                      "color": "#009933",
                      "opacity": 0.8,  
                      "hidden": {
                        "opacity": 0
                      }
                    }
                },

                nodeCaption: function(node){ return node.id; },             

                directedEdges: true,
                edgeArrowSize: 5,                                       

                showControlDash: true,                                                          

                showEditor: true,
                zoomControls: true,                                                                 

                showStats: true,                
                nodeStats: true,                

                showFilters: true,                
                edgeFilters: true,

                edgesToggle: true                       
            };

            alchemy.begin(config);
        </script>       
    </body>
</html>

I got these errors:

vendor.js (line 4): Unexpected value translate(NaN,NaN) parsing transform attribute.

alchemy.js (line 1453, col 17): TypeError: a.editor.Editor is not a constructor
ghost commented 9 years ago

I am having a similar problem, the edit and zoom controls do not show up. There are no errors thrown though. Is there something else that needs to be included for this to work perhaps?

Also, according to the Wiki, edgesToggle has not been implemented.

zeigernz commented 9 years ago

I am facing the same issue, here's my configuration:

alchemy.begin({
        dataSource: data2,
        graphWidth: function(){ return 1024; },
        graphHeight: function(){ return 768; },
        zoomControls: true,
        initialScale: 0.5,
        directedEdges: true
})
swapnil002 commented 8 years ago

Any update on this? Still facing this issue

abhinavsv3 commented 8 years ago

Hi Even I have the same issue. Would like to see some fix on it.

mmmurf commented 7 years ago

Same issue here.

anyhowes commented 6 years ago

Same issue!

naumanzchaudhry commented 6 years ago

Same issue here!