I need help adding a marker to this donut diagram script I changed the use of raphael.js. I have everything I can do, except for the way to dynamically create a triangular marker.
JSFiddle: http://jsfiddle.net/aP7MK/73/
function donutChart(total, goal, avg){ var paper = Raphael("canvas", 400, 400); paper.customAttributes.arc = function (xloc, yloc, value, total, R) { var alpha = 360 / total * value, a = (90 - alpha) * Math.PI / 180, x = xloc + R * Math.cos(a), y = yloc - R * Math.sin(a), path; if (total == value) { path = [ ["M", xloc, yloc - R], ["A", R, R, 0, 1, 1, xloc - 0.01, yloc - R] ]; } else { path = [ ["M", xloc, yloc - R], ["A", R, R, 0, +(alpha > 180), 1, x, y] ]; } return { path: path }; }; var backCircle = paper.circle(100, 100, 40).attr({ "stroke": "#7BC2E5", "stroke-width": 14 }); var theArc = paper.path().attr({ "stroke": "#f5f5f5", "stroke-width": 14, arc: [100, 100, 0, 100, 40] });
Here is what I end up trying to create:

I donβt care about the style, I just need help with a marker element that will indicate where the avg argument is passed to the donutChart function inside the chart.