Skip to content
Discussion options

You must be logged in to vote

@Udemology what do you think the following examples (are going to what you want?), because having a look to your code, you can do in different ways:

The tooltip is fixed in the position of X element

    Chart.Tooltip.positioners.bottom = function(elements, eventPosition) {
      const {chartArea: {bottom}, scales: {x, y} } = this.chart;
      return {
        x: x.getPixelForValue(x.getValueForPixel(eventPosition.x)),  
        y: bottom,
        xAlign: 'center',
        yAlign: 'bottom'
      };
    };

or (on a bar chart, the tooltip scrolls on the element width)

    Chart.Tooltip.positioners.bottom = function(elements, eventPosition) {
      const {chartArea: {bottom}, scales: {x, y} } = 

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Udemology
Comment options

Answer selected by Udemology
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants