I am new to angularjs and google charts, I am using google charts for donut pie charts but I have ended up with no option to change the default legend marker for donut pie charts which is a circle.
So how can I add custom legend marker to pie chart using google charts?
Here is my code (Index.html):
<body ng-controller="MainCtrl">
<div google-chart chart="chart"></div>
</body>
Script.js:
var app = angular.module('myApp', [ 'googlechart' ]);
app.controller('MainCtrl', function($scope) {
var chart1 = {};
chart1.type = "PieChart";
chart1.data = [
['Component', 'cost'],
['Software', 50000],
['Hardware', 80000]
];
chart1.data.push(['Services',20000]);
chart1.options = {
displayExactValues: true,
pieSliceText:'value',
donut:'true',
pieHole:.5,
width: 400,
height: 200,
chartArea: {left:10,top:10,bottom:0,height:"100%"}
};
$scope.chart = chart1;
});
Any suggestions are welcome. Thanks