Emre Oztoprak free asked 3 years ago


Hello, I want use "Line Chart" from here https://mdbootstrap.com/docs/jquery/javascript/charts/ .

I want show data when mouse hover of data. here is my code. where is the mistake? Can you help me?

var ctxL = document.getElementById("lineChart").getContext('2d'); var myLineChart = new Chart(ctxL, { type: 'line', data: { labels: ld, datasets: [{ label: "Diger", data: pointd, borderColor: [ 'rgba(0, 137, 132, .2)', ], borderWidth: 2 }, { label: "Ast", data: pointa,

                    borderColor: [
                        'rgba(0, 10, 130, .7)',
                    ],
                    borderWidth: 2
                },
                {
                    label: "Ust",
                    data: pointu,

                    borderColor: [
                        'rgba(0, 137, 132, .2)',
                    ],
                    borderWidth: 2
                },
                {
                    label: "Kendi",
                    data: pointa,

                    borderColor: [
                        'rgba(0, 137, 132, .2)',
                    ],
                    borderWidth: 2
                },
                {
                    label: "EsDeger",
                    data: pointe,

                    borderColor: [
                        'rgba(0, 137, 132, .2)',
                    ],
                    borderWidth: 2
                }
            ]
        },
        options: {
            scales: {
                yAxes: [{
                    ticks: {
                        beginAtZero: true


                    }
                }],
                xAxes: [{
                    ticks: {
                        autoSkip: false
                    }
                }],
                responsive: true
            }
        }

    });

Marcin Luczak staff commented 3 years ago

Hi,

I can't reproduce your original code as you haven't passed the variables you are using (ld, pointa, pointd, pointu...) so I can't check if your data is corrupted. Your code with any other data used looks fine, so please create a snippet showing your whole code.

Keep coding, Marcin



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: Windows
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes