highcharts / highcharts-vue

Other
686 stars 150 forks source link

Nodes not updated on network grapsh #223

Closed luinhon closed 1 year ago

luinhon commented 1 year ago

I trying update label of a node on network graph like below.

chartoption.series[0].nodes[idx].name = 'new name';

but, it's not updated.

'data' property values is updated like below, normally.

chartoption.series[0].data[idx].name = 'new name';

I think, for update 'nodes' property, another method is needed.

Denyllon commented 1 year ago

Hi @luinhon ,

Thank you for contacting us, and apologize for you've been waiting so long. Could you provide us with the minimal example of the problem? You can use one of the most favourite sandboxes like Codesandbox, or Stackblitz to create the demo. It will be much easier to help you to find out what's happening there.

Kind regards!

jszuminski commented 1 year ago

Thanks for the question @luinhon.

Nodes are objects of class Highcharts.Point (https://api.highcharts.com/class-reference/Highcharts.Point) and their properties are read-only.

If you want to update the name, you need to use point.update({ name: newName }) (https://api.highcharts.com/class-reference/Highcharts.Point#update)

Here's a demo: https://jsfiddle.net/BlackLabel/4wcnLtjy/

It seems that you have an issue with Highcharts, not Highcharts-Vue so I'm closing the issue.