Append the marker to the map container chart svgcontainer htmlelement appendchild holder i am not sure what your logic would be for changing colors but let s say we want to change every 2nd of 3 markers to red and every 3 of 3 markers to green here s an updated createcustommarker function