Our implementation is current relying on amCharts v3.
https://www.amcharts.com/docs/v3/
Our UI exposes a subset of the features but many can be added via the Source tab of the Chart Properties dialog. These settings are stored in the data-amchart
attribute of the chart element. This you could retrieve in a standard User Script and modify if needed. The snippet below adds your horizontal guide via a script (use #line as the selector for your script). This would also allow you to use a data field for the value and lineColor.
let chartConfig = JSON.parse( results.attr('data-amchart') );
chartConfig.guides = [
{
"value": 10,
"lineColor": "#CC0000",
"lineAlpha": 1,
"fillAlpha": 0
}
]
results.attr('data-amchart', JSON.stringify( chartConfig ) )
Hope this helps,
Erik