我正在使用 amchart4 开发分析仪表板来呈现图形。但我不知道如何根据条件更改项目符号颜色
var series2 = chart.series.push(new am4charts.LineSeries());
series2.dataFields.valueX = "PROJ_LF";
series2.dataFields.categoryY = "Roundtrip_Market";
series2.strokeWidth = 0;
var bullet1 = series2.bullets.push(new am4charts.Bullet());
bullet1.tooltipText = "Value: [bold]{valueX} %[/]";
var image = bullet1.createChild(am4core.Image);
image.href = "assets/images/proj_lf_red.png";
image.width = 7;
image.height = 41;
image.horizontalCenter = "middle";
image.verticalCenter = "middle";
var series3 = chart.series.push(new am4charts.LineSeries());
series3.dataFields.valueX = "LY_FLOWN";
series3.dataFields.categoryY = "Roundtrip_Market";
series3.strokeWidth = 0;
var bullet2 = series3.bullets.push(new am4charts.Bullet());
bullet2 .tooltipText = "Value: [bold]{valueX} %[/]";
var image1 = bullet2.createChild(am4core.Image);
image1.href = "assets/images/ly_flow.png";
image1.width = 7;
image1.height = 41;
image1.horizontalCenter = "middle";
image1.verticalCenter = "middle";
问题是关于bullet1,bullet2 现在,bullet1 颜色是RED,bullet2 是Black 但是,如果bullet1>bullet2 bullet1 颜色是RED,我需要动态改变颜色
如果 bullet2>bullet1 bullet1 颜色为绿色