We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Cannot initiate custom tooltip on pie

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!!!?

3 Replies

GS Gowrimathi S Syncfusion Team September 20, 2013 06:40 AM UTC

Hi Pradeep

Thanks for sharing the details with us.

We have tested the reported issue with your changes and we are able to reproduce the pie chart issue. We will fix this issue and this fix will be included in version 1 of JS Essential studio release.

Please let us know if you need any further assistance.

Regards
Gowrimathi S

 



PR Pradeep September 23, 2013 05:32 AM UTC

Thanks. Nope,  nothing else at this point.


GS Gowrimathi S Syncfusion Team October 3, 2013 05:37 AM UTC

Thanks for the update, Please let me know if you have any further assistance

Regards
Gowrimathi S

Loader.
Live Chat Icon For mobile
Up arrow icon