UniqueLevels = [Level 0, Level 1, Level 2] Sample Input = [{name:"Level 0",data:[{name: "Job A",y: 0.26},{name: "Job B",y: 0.36}]}, {name:"Level 1",data:[{name: "Job C",y: 0.96},{name: "Job D",y: 0.29}]}, {name:"Level 2",data:[{name: "Job E,y: 0.96},{name: "Job F",y: 0.29}, {name: "Job G",y: 0.29}]}] The provided input is intended to be used to generate a column chart in Highchart. Although the chart generation works, there seems to be an issue with the output as it is not as expected.
The expected output should display 'Level 0', 'Level 1', and 'Level 2' on the x-axis. For Level 0, 'Job A' and 'Job B' should be displayed. For Level 1, 'Job C' and 'Job D' are expected. And for Level 2, 'Job E', 'Job F', and 'Job G' need to be shown.
The current output shows 'Job A', 'Job C', and 'Job E' for Level 0. Then, it displays 'Job B', 'Job D', and 'Job F' for Level 1. Finally, only 'Job G' is visible for Level 2.
The data appears correctly in the console but the generated chart does not match the expected output. Assistance to resolve this discrepancy would be greatly appreciated.
Thanks.
Expected output:In x axis level 0,level 1, level 2 need to be there. For level 0 Job A and Job B need to populate, for level 1 Job C and Job D need to populate, for level 2 Job E, Job F and Job G need to populate
Highchart.Chart('container1', { chart: { type: 'column' }, xAxis : { categories : UniqueLevels }, series: Sample Input })enter image description here