Javascript Atlassian TreeMap-如何控制;父母;?

Javascript Atlassian TreeMap-如何控制;父母;?,javascript,amcharts,treemap,amcharts4,Javascript,Amcharts,Treemap,Amcharts4,我试图控制“父母”的价值,而不管“孩子” 在树形图中。现在,当孩子有价值时会发生什么。“父项”作为值接收子项的全部数量。 即使我给了父值。他没有提到它。 我的问题是: 我如何给家长一个新的值,您可以使用该值独立于孩子进行家长安排? JsonInput: const jsonData =[{ "name": "First", "value": 20000, //Parent value "children"

我试图控制“父母”的价值,而不管“孩子” 在树形图中。现在,当孩子有价值时会发生什么。“父项”作为值接收子项的全部数量。 即使我给了父值。他没有提到它。 我的问题是: 我如何给家长一个新的值,您可以使用该值独立于孩子进行家长安排?

JsonInput:

const jsonData =[{
  "name": "First",
  "value": 20000, //Parent value
  "children": [
    { "name": "A1", "value": 100 }, //children value
    { "name": "A2", "value": 60 }, //children value
    { "name": "A3", "value": 30 } //children value
  ]
}, {
  "name": "Second",
  "value": 140000, //Parent value
  "children": [
    { "name": "B1", "value": 135 }, //children value
    { "name": "B2", "value": 98 }, //children value
    { "name": "B3", "value": 56 } //children value
  ]
}]
代码:

我需要父项按“他的值字段”排序,而不是按“该父项的所有子项之和”排序我需要父项按“他的值字段”排序,而不是按“该父项的所有子项之和”排序
const level1 = chart.seriesTemplates.create("0");
let level1_column = level1.columns.template;
const level1_bullet = level1.bullets.push(new am4charts.LabelBullet());

level1_bullet.label.text =  "{value}";  //The value is the sum of the values of all his children.


const level2 = chart.seriesTemplates.create("1");
let level2_column = level2.columns.template;
const level2_bullet = level2.bullets.push(new am4charts.LabelBullet());

level2_bullet.label.text =  "{value}";  //The value is of the child.