Skip to content

custom tooltip callback does not provide label or text #3882

@byggwir

Description

@byggwir

If I define a custom callback like:

            tooltips: {
                enabled: false,
                mode: 'label',
                position: 'average',
                custom: function (tooltip) {

                    console.log(this.text);
                    if (!tooltip.text){
                        return;
                    }
             }

and I analyze the output of the log (or in debugging). Then the object tooltip does not have a text property or label or anything alike. see http://www.chartjs.org/docs/#advanced-usage-external-tooltips where it says it would have the text. (neither a title or label property).

How can I get the text of the tooltip and create my own tooltip output? I want to place it into a div and show the tooltips permanently (which I haven't managed with version 2 of chartjs either) there.

best regards

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions