Failed to run code TypeError: Cannot set properties of undefined (setting ‘dataIndex’)

RamanaReddy V
Jun 5, 2023
Echart Issue

Apache ECharts is an open-sourced JavaScript visualization tool, which can run fluently on PC and mobile devices. It is compatible with most modern Web Browsers.

ISSUE:

I’m using ECharts Graph type .While pulling data from server & constructing graph nodes I got this issue. In my Graph contains lot nodes while presenting to user according my business use case.

RESOLUTION:

While constructing Graph node on client side I identified their is a duplicate node name present while retrieving data from server.

Code with Issue:

Duplicate node name issue

To resolve the above code issues we need to maintain the unique node names like below.

REF’s

  1. https://echarts.apache.org/en/index.html
  2. https://echarts.apache.org/examples/en/editor.html?c=graph-simple&lang=ts

--

--