Can you point me towards the location of Sigma.js' sigma.utils.xhr() function?

I came across a peculiar issue with lines 23 and 24 of sigma/plugins/sigma.neo4j.cypher/sigma.neo4j.cypher.js:

sigma.neo4j.send = function(neo4j, endpoint, method, data, callback) {
    var xhr = sigma.utils.xhr(),

Surprisingly, sigma/src/utils/sigma.utils.js does not contain any reference to that specific method. I am currently working with a clone of the most recent sigma repository. Can someone guide me on how to utilize the neo4j plugin without encountering this error:

TypeError: sigma.utils.xhr is not a function

The code snippet I'm using as an example is as follows:

    sigma.neo4j.cypher(
        { url: 'xxx', user: 'demo-app', password: 'xxx' },
        'MATCH (n) OPTIONAL MATCH (n)-[r]->(m) RETURN n,r,m LIMIT 100',
        { container: 'graph-container' } ,
        function(s) {
            console.log('Number of nodes :'+ s.graph.nodes().length);
            console.log('Number of edges :'+ s.graph.edges().length);
        }
);

Here are the necessary includes:

<script src="sigma/src/sigma.core.js"></script>
<script src="sigma/src/utils/sigma.utils.js"></script>
<script src="sigma/plugins/sigma.neo4j.cypher/sigma.neo4j.cypher.js">

Your assistance in resolving this matter would be greatly appreciated.

Answer №1

Perhaps the issue stems from not having all dependencies properly installed via npm install. After cloning and installing Sigma, I tested out the

sigma.js/examples/load-neo4j-cypher-query.html
and it functioned correctly.

I hope this information proves useful to you.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

I'm having difficulty implementing a vue-awesome icon on my project

I am attempting to utilize the standard window-close icon from vue-awesome. I have imported my vue-awesome using the following code: import 'vue-awesome/icons'; import Icon from 'vue-awesome/components/Icon.vue'; Vue.component('i ...

Attempting to delay iteration of NodeJS list until it has been fully populated

I have created a piece of code that uploads a file, runs it, and compares the output with expected results. Now, I want to enhance this functionality by running the uploaded file multiple times, each time comparing it against different expected outputs or ...

Preventing Div items from rearranging during size transitions using toggleClass

When I click on an element with the ID "id", I use toggleClass to resize a div from 10px to 500px in width. This is done partly to show/hide content. However, the issue arises when the transition occurs and the contents of the div start rearranging, overfl ...

After the completion of the AJAX request, navigate to the bottom of the specified

I have come across a solution on how to scroll to the bottom of a div here. However, it seems that it is not working for me, the same goes for autofocus. I suspect the problem lies in the fact that I am making an AJAX call, and it is not functioning prope ...

Passing "this" to the context provider value in React

While experimenting with the useContext in a class component, I decided to create a basic React (Next.js) application. The app consists of a single button that invokes a function in the context to update the state and trigger a re-render of the home compon ...

Enhancing User Experience with React Hover Effects

I'm currently in the process of developing a React component library, and I'm looking to enhance the components with some stylish flair. Everything seems to be working smoothly, but I'm interested in changing the background color when a user ...

Include a .done() callback within a customized function

In the small class, I have included these functions: var Ajax = { // Send new entry data to database endNewEntry: function (json) { $.post("/controllers/insertEntry.ajax.php", {"json": json}); }, loadView: function (view, target, extra) { ...

Storing a jquery ajax response for faster retrieval in javascript/browser

Is there a way to implement caching for ajax responses in JavaScript or the browser? According to the jquery.ajax documentation: The default behavior is that requests are always issued, but the browser may serve results from its cache. To prevent the ...

Unlocking the power of .NET with JavaScript

As a beginner in JavaScript, I am eager to leverage .NET using JavaScript without being restricted to a specific browser. My goal is to be able to execute my code in Internet Explorer, Edge, or Chrome. I have heard about different versions of JavaScript ...

Tips for assigning a cookie as the id of a div?

I've been tasked with making the selected menu stand out when the page is refreshed. I'm thinking of using a cookie to achieve this. Here's the HTML code: <div class="menuBar"> <div class="menuHeader ui-corner-top"> ...

Leveraging the ng-hide property of one controller to adjust the ng-style attribute of another controller through a centralized global controller

Seeking assistance with accessing the boolean value of ng-hide from one controller in order to alter CSS properties of another controller utilizing a global controller. Here is the jsfiddle link: https://jsfiddle.net/dqmtLxnt/ HTML <div ng-controller= ...

NodeJS/WebdriverJS: Error - 'Element is not connected to the webpage'

Hello there! I am new to WebDriver (chromedriver) and my knowledge of JavaScript syntax is quite basic, so please excuse me if my code appears messy. Currently, I have a clickAllElements(); function that identifies all elements within a class and performs ...

What is the best way to incorporate my Switch component into my Table component as a distinct column, while also maintaining separate states for each component?

My journey into learning React.js has been exciting so far. However, I am facing some confusion when it comes to stateful components. Currently, I am utilizing Bootstrap tables for creating a table and successfully fetching data using GET requests. Additio ...

Error encountered while trying to call callback functions

I encountered an error in my code, but I managed to resolve it independently. Could someone please provide an explanation of why the code wasn't working and delve into the mechanics behind the issue? Here is the code snippet: var listTables = functi ...

How can Angular2 detect when an entity is clicked within a window?

There are multiple items generated using *ngFor: <my-item *ngFor="let item of myArray" [p]="item"></my-item> I am able to handle a click event like this: <my-item ... (click)="doWork(item)"></my-item> However, I want to avoid a ...

Using session variables to store connection objects for database rollback

My web application is divided into multiple modules spread across different JSP pages. Currently, I am facing the challenge of using separate oracle connection objects on each page due to scope limitations. The problem arises when I need to rollback databa ...

The Arabic characters are not rendering correctly

As a beginner in html programming, I am looking to include Arabic text in my html file. I have added the following line containing Arabic text: <h1 dir="rtl">نص تجريبي لاختبار</h1> However, when I view the output, I am seeing u ...

The reason why JavaScript doesn't treat "1-1" as 0 in an operation like it does with "123" to 123 during calculations

When dealing with JavaScript, the difference between "123" and "1-2" can be confusing. While "123" is recognized as a string type with a numerical value, "1-2" is also a string type but it does not allow for multiplication. Why doesn't JavaScript hand ...

Is there a problem with Angular2 using TypeScript?

Currently, I am in the process of setting up my machine for Angular development by following the guidelines provided on https://angular.io/docs/ts/latest/quickstart.html As I proceeded to run "npm start" to launch my site, I encountered an issue with the ...

Finding the Text of an HTML Element

I need to retrieve the text content from an HTML element. For example, if I have <p>ABCD</p> I want the output to be ABCD It would look something like this: var html='<p>ABCD</p>'; var str = extractText(html); I belie ...