jqplot tooltip on bar chart

后端 未结 3 1031
感情败类
感情败类 2020-12-08 16:03

I\'m using the jquery plugin jqplot for plotting some bar charts. on hover, I\'d like to display the tick for the bar and its value on a tooltip. I\'ve tried



        
3条回答
  •  甜味超标
    2020-12-08 16:45

    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.

提交回复
热议问题