Skip to content

Cannot read property 'transition' of null #8011

@leilaalizadeh

Description

@leilaalizadeh

I downloaded the last version.
When I hover the chart it hides and I get this error "Cannot read property 'transition' of null".
I add first chart dataset to second to compare.
This error become after adding second dataset.
for first dataset all the things is ok.


2020-11-05_20-26-44


2020-11-05_20-15-04

   `var secondChartt = {
        labels: labels,
        datasets: [],
    };
    var secondChart =""
    function compare() {
        var ctx1 = document.getElementById('secondChart').getContext('2d');
        secondChart = new Chart(ctx1, {
            type: 'bar',
            data: secondChartt,
            options: {
                responsive: true,
                maintainAspectRatio: false,
                animation: false,
                hover: false,
                responsiveAnimationDuration: 0,
                scales: {
                    yAxes: [{
                        ticks: {
                            beginAtZero: true
                        }
                    }]
                }
            },
        });
        compareThird();
    }
    function add() {
        var newDataset = {
            label: Math.random(),
            backgroundColor: random_rgba(),
            borderColor: random_rgba(),
            borderWidth: 1,
            data: firstChartD.datasets[0].data
        };
        secondChart.data.labels = labels;
        secondChartt.datasets.push(newDataset);
        secondChart.update();
    }`

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions