Giter Site home page Giter Site logo

Comments (5)

thlaegler avatar thlaegler commented on May 31, 2024 1

Hi @dctim,
this is just based on the simple-graph example from here https://github.com/Nhogs/popoto-examples/blob/master/simple-graph/index.html
I added d3-voronoi.v1.min.js after d3 and before popoto.

<!doctype html>
<html>
<head>
<title>example - Popoto.js</title>
	<link rel="stylesheet"
		href="https://unpkg.com/popoto/dist/popoto.min.css">
</head>

<body class="ppt-body">

	<section class="ppt-section-main">

		<div class="ppt-container-graph">
			<nav id="popoto-taxonomy" class="ppt-taxo-nav">
				<!-- Label/taxonomy filter will be generated here -->
			</nav>
			<div id="popoto-graph" class="ppt-div-graph">
				<!-- Graph will be generated here-->
			</div>
		</div>

		<div id="popoto-query" class="ppt-container-query">
			<!-- Query viewer will be generated here -->
		</div>

		<div id="popoto-cypher" class="ppt-container-cypher">
			<!-- Cypher query viewer will be generated here -->
		</div>

		<div class="ppt-section-header">
			<!-- The total results count is updated with a listener defined below -->
			RESULTS <span id="result-total-count" class="ppt-count"></span>
		</div>

		<div id="popoto-results" class="ppt-container-results">
			<!-- Results will be generated here -->
		</div>

	</section>

	<script src="https://unpkg.com/jquery" charset="utf-8"></script>
	<script src="https://unpkg.com/d3" charset="utf-8"></script>
	<script src="https://d3js.org/d3-voronoi.v1.min.js"></script>
	<script src="https://unpkg.com/popoto"></script>
	<script type="text/javascript">
		
		popoto.rest.CYPHER_URL = "http://localhost:7474/db/data/transaction/commit";
		popoto.rest.AUTHORIZATION = "Basic " + btoa("xxx:yyy");
		popoto.provider.node.Provider = {
		        "APP": {
		            "returnAttributes": ["key", "name"],
		            "constraintAttribute": "key",
		            "autoExpandRelations": true
		        },
		        "INTERFACE": {
		            "returnAttributes": ["key", "name"],
		            "constraintAttribute": "key"
		        }
		    };
		popoto.result.onTotalResultCount(function (count) {
	        document.getElementById("result-total-count").innerHTML = "(" + count + ")";
	    });
		popoto.query.RESULTS_PAGE_SIZE = 100;
		popoto.tools.TOGGLE_FULL_SCREEN = true;
		// popoto.graph.centerRootNode();
		popoto.logger.LEVEL = popoto.logger.LogLevels.DEBUG;
		popoto.start("APP");
		
	</script>
</body>
</html>

from popoto-examples.

 avatar commented on May 31, 2024

Hi Jessie, I kind of encounter the first problem you mentioned. Have you got any clues on how this happened? Thanks!

from popoto-examples.

thlaegler avatar thlaegler commented on May 31, 2024

It's nowhere mentioned in the docs. Adding d3-voronoi.js fixed that issue for me:
<script src="https://d3js.org/d3-voronoi.v1.min.js"></script>

from popoto-examples.

dctim avatar dctim commented on May 31, 2024

It's nowhere mentioned in the docs. Adding d3-voronoi.js fixed that issue for me:
<script src="https://d3js.org/d3-voronoi.v1.min.js"></script>

Hi @thlaegler , Where exactly did you put the script src? I hit the same issue.

from popoto-examples.

Popotojs avatar Popotojs commented on May 31, 2024

Hi this issue is happening because Popoto is not using latest version of d3
Popoto is still using D3 v.5.15.0 which still includes voronoi module

To fix it you can use older version of D3:

<script src="https://unpkg.com/[email protected]" charset="utf-8"></script>

from popoto-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.