How to display tooltips on jqplot pie chart

前端 未结 5 1623
暗喜
暗喜 2020-12-06 16:54

I have a jqplot pie chart with a legend and I would like to get the legend text to appear as a tooltip when the mouse hovers on the pies. I\'m not sure how to do that. Doe

5条回答
  •  隐瞒了意图╮
    2020-12-06 17:36

    I am using the version of the highlighter plugin on the following link:

    https://github.com/tryolabs/jqplot-highlighter

    The parameters I am using:

    highlighter: {
        show:true,
        tooltipLocation: 'n',
        tooltipAxes: 'pieref', // exclusive to this version
        tooltipAxisX: 20, // exclusive to this version
        tooltipAxisY: 20, // exclusive to this version
        useAxesFormatters: false,
        formatString:'%s, %P',
    }
    

    The new parameters ensure a fixed location where the tooltip will appear. I prefer to place it on the upper left corner to avoid problems with resizing the container div.

提交回复
热议问题