This is pie chart in one of the samples, "healthtracker.js".
I added an extra line to apply a custom template for the
tooltip.
$("#ChartStep").ejChart(
{
series: [
{
points: [
{ x: 'Carbohydrate', y: 10, visible: true, interior: "#D3C1D4" },
{ x: 'Fat', y: 90, visible: true, interior: "#B26CAB" },
],
type: 'pie', animation: false,
style: { opacity: 0.8, borderWidth: 1, borderColor: "#D3C1D4" },
pointsTooltipTemplateID: 'customTooltip',
},
],
margin: { top: 0, bottom: 0, left: 10, right: 10 },
showTooltip: true,
textColor: 'Black',
backInterior: "#122412",
size: { height: 225, width: 225 },
legend: { visible: false, textOption: { textColor: 'Black', font: { size: '12px' } }, position: 'bottom' }
});
and the tooltip template is as follows
<div id="customTemplate" class="hide custom-template">
#point.x#</br>
#point.y#
</div>
But this is giving me a javascript error,
saying TypeError i.xAxis is undefined. These custom
tooltips work on other line charts, and if I don't include
the custom tooltip, I am able to see the default tooltip.
Is there anything im missing here!!!?