Giter Club home page Giter Club logo

Comments (3)

NoAbdulrahman avatar NoAbdulrahman commented on May 23, 2024 1

The problem is solved by adding v-if=“dataLoaded” on the tree component and set the dataLoaded property to true loading the data. Also, I had to use json object instead of json string.

from vue.d3.tree.

David-Desmaisons avatar David-Desmaisons commented on May 23, 2024
this.tree = response.data.data;
this.tree=this.prepareData(this.tree);

This looks suspiscious. Try:

this.tree=this.prepareData(response.data.data);

from vue.d3.tree.

NoAbdulrahman avatar NoAbdulrahman commented on May 23, 2024

@David-Desmaisons Thanks David, I tried but still nothing is shown. Here is a sample of my data if you could have a look:

{
	"id": 0,
	"title": "Products",
	"children": [{
		"id": 1,
		"title": "Motivate up to down communication",
		"children": [{
			"id": 7,
			"title": "Ensure 100% of team members receive feedbacks quarterly"
		}, {
			"id": 8,
			"title": "Roll out anonymous feedback surveys from bottom to up quarterly"
		}]
	}, {
		"id": 2,
		"title": "Empower colleagues and thus improve products",
		"children": [{
			"id": 9,
			"title": "Track feedback from new sign-ups"
		}, {
			"id": 10,
			"title": "Schedule meetings of all department members every two weeks"
		}] 
	}]
}

To be specific, the small circle of the root is shown, only that circle, nothing else.
I think the problem is not in the data itself but in binding the data, I couldn't figure out how to do it.

from vue.d3.tree.

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.