Open trusovandrey1 opened 4 years ago
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 } },
Did this with (this.$refs.flowChart.propsAPI.read())
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 } },