Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

How to load remote data? #23

Open
trusovandrey1 opened this issue Oct 18, 2020 · 1 comment
Open

How to load remote data? #23

trusovandrey1 opened this issue Oct 18, 2020 · 1 comment

Comments

@trusovandrey1
Copy link

trusovandrey1 commented Oct 18, 2020

Please advise how do I receive and render remote data?

G6 docs has example, but I don't know for sure how to correlate it with you editor? - https://g6.antv.vision/en/docs/manual/tutorial/example

That what I have, it loads data, but doesn't render.

<flow :data="mockData" :graph="customGraphConfig" :onNodeDoubleClick="showModalLocation" :onAfterChange="saveDataFromChart" />

data () { return { mockData: this.fetchData(), customGraphConfig: { layout: { type: 'radial', unitRadius: 50, center: [500, 300], }, grid: { number: 33, } } }

async fetchData () { const response = await fetch("https://api.npoint.io/2f71ed8920af3f07cd05"); const data = await response.json(); let mData = data; console.log(mData) return mData } },

@trusovandrey1
Copy link
Author

Did this with
(this.$refs.flowChart.propsAPI.read())

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant