HighCharts question for network graph

Hi All, I have copied the code from highcharts for the network graph. It gave me several errors. I’ve been able to fix some but there’s some i just can’t figure out. Is someone able to help? I’d really appreciate it! I’m sorry i don’t know how to make this any easier to read, but a good way to replicate it is to take the network highchart code and paste it into a highchart graph. Here’s the code below. thanks all!

{

“chart”: {

“type”: “networkgraph”,

“height”: “60%”

},

“plotOptions”: {

“networkgraph”: {

“keys”: [“from”, “to”,“color”,“width”]

//Enable this section if you want the nodes and links to be animated

//This is more resource intensive and can cause low end machines to freeze.

// “layoutAlgorithm”: {

// “enableSimulation”: true,

// “friction”: -0.9

// }

}

},

“series”: [{

“dataLabels”: {

“enabled”: true,

“linkFormat”: “”,

“style”: {

“fontSize”: “10px”,

“fontWeight”: “normal”

}

},

//From Lang, To Lang, Link Width, Link Color

//Link color and width are set for just couple of links using analysis level calcs.

//This is just to demonstrate the capability.

“data”: [“getColumn”,0,1,2,3],

//Leaf nodes aren’t present in From Language getColumn and

//Top parent node isn’t in To Language column.

//Hence, got to get unique value from both columns to set nodes.

//Using an extra map wrapper to reuse the node weightage for radius and color.

“nodes”:[“map”,

[“map”,

//Unique langauges from both From and To Language columns

[“unique”,[“+”, [“getColumn”,0], [“getColumn”,1]]],

//Creating an intermediate object array to feed the outer map

{

“language”: [“item”],

//Get node level: 1 (top) - 7 (leaf)

“nodeLevel”:[“get”,

[“get”,

[“+”, //Adding a dummy value (explained below)

//Filter rows matching From Language

[“filter”,

[“getColumn”,0,4], //From Language, Level

//Where From Language = Language from (immediate) outer map

[“==”,[“get”,[“item”],0], [“item”,2]]

],

//Outer map is working on unique languages from both From and To columns.

//So, When processing a leaf node entry, which isn’t present in From Language,

//the above filter will return an empty array.

//Hence, adding a Dummy with value 7 to end of array to cover leaf nodes

[[“Dummy”,7]]

],

0 //Pick first array; All should be same as we are filtered for one language at a time

],

1 //Pick the language level

]

}

],

//Shaping the above intermediate object into node objects

{

“id”:[“get”,“item”,“language”], //Language from intermediate object

“color”: [“get”, //Pick a color based on level

[“getColorTheme”], //Returns colors from QuickSight theme

[“-”,

[“get”,[“item”],“nodeLevel”], //Node level from intermediate object

1 //Substracting one to convert level to 0 based index

]

],

“marker”: {

“radius”:[“-”, //Reversing level so that top node is biggest

10, //Using 10 so that leaf node isn’t too small

[“get”,[“item”],“nodeLevel”]

]

}

}

]

}
]
}

And then here are the errors i’m still getting.

  • 33:16 Warning: Missing property “type”,

  • 67:18 Warning: Incorrect type. Expected “object”.

  • 69:13 Warning: Incorrect type. Expected “object”,

  • 129:18 Warning: Incorrect type. Expected “string”

  • 131:22 Warning: Incorrect type. Expected “object”.

Hi @jeff.neubeker,
Could you provide us with a screenshot of the current state of your visual as well as the fields in your field well that are being utilized.

Normally when you receive ‘warning’ codes, it will not stop your visual from populating data; where as if it says ‘error’ instead of ‘warning’. But to go along with that, the ‘warning’ should create a yellow line underneath the portion of the code that it’s referring to, could you take a screenshot of your code portions that have those lines underneath as well so that we can see where the issue may be?

One additional thing to note when working with highcharts in QuickSight; the QS version of highcharts is still a base version and while some of the visual types may be included in the QS highcharts, some of the additional options may not be included.

Hi Brett. thanks for the response. I’ve done some more research and i think i had the data set up wrong. I’m working on it now, but do not want to waste anyones time if it was a simple data issue. I’ll let you know how it goes! Thanks again for the response.

1 Like

Hi @jeff.neubeker,
No worries, keep us posted and we can always circle back!