ChartJs, Draw straight lines in bar chart [closed]

1

THE EXPECTED

  • Be able to draw horizontal lines with labels and colors as seen in the photo.
  • Set static scale from 0 to 300.
  • My current code:

    JS

    var data = {
                labels: ["UNO"],
                datasets: [
                    {
                        label: "Semestre 2017-I",
                        borderWidth: 1,
                        data: [10]
                    }
                ]
            };            
    
    var ctx = document.getElementById("ctx");
    
    var myBarChart = new Chart(ctx, {
      type: 'bar',
      data: data
    });
    

    HTML

    <div>
    <canvas id="ctx" width="600" height="400"></canvas>
    

    link

        
    asked by nawelittle 05.05.2017 в 14:56
    source

    0 answers