Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9171845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:13:07+00:00 2026-06-17T16:13:07+00:00

I want to use Highlighter functionality in to a PieChart. My code is function

  • 0

I want to use Highlighter functionality in to a PieChart. My code is

function device_ownership_graph(titleOfGraph, corporateOwned,
        corporateShared, employeeOwned) {

    var arrCorporateOwned = [ 'Corporate-Owned', corporateOwned ];
    var arrCorporateShared = [ 'Corporate-Shared', corporateShared ];
    var arrEmployeeOwned = [ 'Employee-Owned', employeeOwned ];

    $.jqplot.config.enablePlugins = true;
    /*Here we construct graph*/
    $.jqplot('device_ownership_graph', [ [ arrCorporateOwned, arrCorporateShared, arrEmployeeOwned ] ], {
        title : {
            text : titleOfGraph, // title for the plot,
            show : true,
            fontSize : 14,
            textColor : '#808080',
            textAlign : 'center'
        },
        seriesColors : [ "#00b0f0", "#ffc000", "#92d050"],
        seriesDefaults : {
            // Make this a pie chart.
            renderer : jQuery.jqplot.PieRenderer,
            shadow: false,
            rendererOptions : {
                // Put data labels on the pie slices.
                // By default, labels show the percentage of the slice.
                showDataLabels : true,
                startAngle: 90,
                sliceMargin: 1,
                //highlightMouseOver: true
                highlightMouseDown: true

            }
        },
        legend : {
            renderer : $.jqplot.PieLegendRenderer,
            show : true,
            rendererOptions : {
                numberRows : 1,
                numberColumns : 3,
                disableIEFading : false
            },
            location : 'n',
            placement : 'outsideGrid',
            marginTop : '0px',
            marginBottom : '0px'
        },
        grid : {
            drawGridlines: false,
            show : true,
            background : 'transparent',
            borderWidth : 1,
            shadow : false
        },
        highlighter: {
            showTooltip: true,
            tooltipFade: true
        }

    });
    $('#device_ownership_graph .jqplot-data-label').css('color', '#000000');

    $('#device_ownership_graph').bind('jqplotDataHighlight', function (ev, seriesIndex, pointIndex, data) { alert('series: '+seriesIndex+', point: '+pointIndex+', data: '+data);}); 
}

Problem

I am getting two different errors in two different browsers when mouse-move event on slices.

Chrome : –

Uncaught TypeError: Cannot read property 'formatter' of undefined jqplot.highlighter.min.js:57

Mozila :-

q._xaxis._ticks[0] is undefined

And one more issue, when I use highlightMouseDown: true its working (showing an alert) but when I use highlightMouseOver: true its not working.

What am I doing wrong in my code? Please help me.


UPDATE : 22 Jan 2013


I want the behavior of highlighter as it works in BarGraph. I used alert() in my given code, but that code is only for testing of highliter.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:13:07+00:00Added an answer on June 17, 2026 at 4:13 pm

    Both of the errors you are getting refer to the same problem. This line in jqplot.highlighter.min.js is the one:

    var w=q._xaxis._ticks[0].formatter;
    

    Chrome can’t access the formatter property because q._xaxis._ticks is undefined (as reported in Firefox).

    The solution (inspired by How to display tooltips on jqplot pie chart) is to add the following code into your seriesDefaults configuration:

    highlighter: {
        show: true,
        formatString:'%s', 
        tooltipLocation:'sw', 
        useAxesFormatters:false
    }
    

    In your case, seriesDefaults would then look like:

    seriesDefaults:{
        // Make this a pie chart.
        renderer : jQuery.jqplot.PieRenderer,
        shadow: false,
        rendererOptions : {
            // Put data labels on the pie slices.
            // By default, labels show the percentage of the slice.
            showDataLabels : true,
            startAngle: 90,
            sliceMargin: 1,
            highlightMouseOver: true
            //highlightMouseDown: true
        },
        highlighter: {
            show: true,
            //formatString:'%s', 
            //tooltipLocation:'sw', 
            useAxesFormatters:false
        }
    }
    

    The important thing is setting useAxesFormatters to false. Pie graphs don’t have axes, hence the earlier error regarding q._xaxis._ticks being undefined.

    Note that you will likely need the commented out formatString and tooltipLocation properties when you move away from using alert-based tooltips.

    Edit:

    I am assuming you mean the kind of highlighting that is found on this page: http://www.jqplot.com/deploy/dist/examples/barTest.html

    In that last highlighter configuration you currently have:

    highlighter: {
        showTooltip: true,
        tooltipFade: true
    }
    

    If you just want the highlighting effect and no tooltip, set showTooltip to false. Then remove the line of code where you bind to the jqplotDataHighlight event. This should ensure that the highlight effect will show up.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use pygments with jekyll I have the following code: {% highlight
I want use this 1 for using Bar code or QR code scanner. I
I want use javascript setInterval function to achieve a box rotate animate effect, I
I don't want use old Visual Basic methods in my code, and I'm confused
I want to use full screen function in IE for a single <div> tag
I want to use Gallery as a horizontal menu so I've taken the code
I want use BYTE_ORDER macro in my Xcode project but i can't because i
I want use a single php file to handle all of my voting requests.
I want use groovy findAll with my param to filtering closure filterClosure = {
i want use some data from a website with web service. i have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.