Line With Custom Bullets

Besides a bunch of predefined bullets (our charts support round, square, triangle, bubble, diamond bullet shapes) you can use your own images as bullets of your graphs. You can set one bullet for all the graph and also use individual bullets for specific data points to indicate some difference of these plots.

by Rogério Saraceni

HTML

<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
<div id="chartdiv"></div>

CSS

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

#chartdiv {
  width: 100%;
  height: 500px;
}

JavaScript

var chart = AmCharts.makeChart("chartdiv", {
	    "type": "serial",
	    "theme": "none",
	    
	    "dataProvider": [
		    {
		        "year": "Jan",
		        "value": 57.5
		    }, 
		    {
		        "year": "Feb",
		        "value": 0
		    },
		    {
		        "year": "Mar",
		        "value": 0
		    },
		    {
		        "year": "Apr",
		        "value": 0
		    },
		    {
		        "year": "May",
		        "value": 0
		    },
		    {
		        "year": "Jun",
		        "value": 0
		    },
		    {
		        "year": "Jul",
		        "value": 0
		    },
		    {
		        "year": "Aug",
		        "value": 0
		    },
		    {
		        "year": "Set",
		        "value": 0
		    },
		    {
		        "year": "Oct",
		        "value": 0
		    },
		    {
		        "year": "Nov",
		        "value": 0
		    },
		    {
		        "year": "Dec",
		        "value": 0
		    },
	    ],
	    
	    "valueAxes": [{
	        "axisAlpha": 0,
          "gridAlpha": 0.1,     
	    }],
	    
	    "graphs": [{
	        "bullet": "round",
	        "valueField": "value",
	        "balloonText":"[[category]] Value:[[value]]%",
	        "labelText": "[[value]]%",
	        
		    "precision": 2,
	    }],
	    
	    "categoryField": "year",
	    
	    "categoryAxis": {
	        "axisAlpha": 0,
	        "gridAlpha": 0,
	      
	    },
      
	    "export": {
	        "enabled": true
	    }
	});