Adding custom property to dataPoints- CanvasJS

Adding custom property to dataPoints- CanvasJS

by canvasjs

HTML

<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<div id="chartContainer" style="height: 360px; width: 100%;"></div><br/>

JavaScript

var chart = new CanvasJS.Chart("chartContainer",
	{        
      data: [
      {
        type: "pie",
          toolTipContent: "{customPropperty}: {y}",
        dataPoints: [
            { y: 71, customPropperty: "DataPoint 1" },
            { y: 55, customPropperty: "DataPoint 2" },
            { y: 50, customPropperty: "DataPoint 3" },
            { y: 65, customPropperty: "DataPoint 4" },
            { y: 95, customPropperty: "DataPoint 5" }
        ]
      }
      ]
    });
chart.render();