Is there a simple way to include images/icons within a chart using x and y coordinates?
I'm new to javascript and amcharts (am4charts) so any assistance would be greatly appreciated!
I've searched for solutions on stackoverflow, like this one on amChart CategoryAxes with icons, but haven't found anything helpful.
var chart = am4core.create("chartdiv", am4charts.XYChart);
chart.data = generateChartData();;
function generateChartData() {
var chartData = [];
var firstDate = new Date();
firstDate.setDate( firstDate.getDate() - 150 );
var visits = 0;
var values = 0;
var secondLine = 0;
var b = 0.6;
for ( var i = 0; i < 450; i++ ) {
var newDate = new Date( firstDate );
newDate.setDate( newDate.getDate() + i );
if(i > 80){
b = 0.4;
}
visits += Math.round((Math.random()<b?1:-1)*Math.random()*10);
values += 0;
secondLine += (Math.round((Math.random()<b?1:-1)*Math.random()*10))*0.5;
if(i==0){visits = 0;values = 0; secondLine =0;}
chartData.push( {date: newDate, visits: visits, values: values, secondLine: secondLine} );
}
return chartData;
}
'''