Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Origen Enlace

Como dicen en esta respuestaesta respuesta tienes que sobreescribir scales:

Añadiendo:

scaleOverride : true,
scaleStartValue : 0,

<script type="text/javascript">
var ctx = document.getElementById("reporte_tecnicos").getContext('2d');
var myChart = new Chart(ctx, {
type: 'bar',
scaleOverride : true,
scaleStartValue : 0,
data: {
labels: [<?php while($count<$i){echo $data_n[$count]; $count++;} ?>],
datasets: [{
    label: '',
    backgroundColor: [
        "rgba(0, 150, 254, 0.5)",
        "rgba(150, 100, 50, 0.5)",
        "rgba(50, 50, 50, 0.5)",
        "rgba(255, 100, 0, 0.5)",
        "rgba(150, 100, 50, 0.5)",
        "rgba(100, 254, 0.5)",
        "rgba(25, 100, 200, 0.5)",
        "rgba(75, 75, 75, 0.5)",
        "rgba(80, 20, 0, 0.5)",
        "rgba(255, 50, 254, 0.5)"
    ],
    data: [<?php while($count2<$i){echo $data_r[$count2]; $count2++;} ?>],
    options: {
    scales: {
        yAxes: [{
            beginAtZero: true
        }]
        }
    }
    }],
}
});
</script>

Como dicen en esta respuesta tienes que sobreescribir scales:

Añadiendo:

scaleOverride : true,
scaleStartValue : 0,

<script type="text/javascript">
var ctx = document.getElementById("reporte_tecnicos").getContext('2d');
var myChart = new Chart(ctx, {
type: 'bar',
scaleOverride : true,
scaleStartValue : 0,
data: {
labels: [<?php while($count<$i){echo $data_n[$count]; $count++;} ?>],
datasets: [{
    label: '',
    backgroundColor: [
        "rgba(0, 150, 254, 0.5)",
        "rgba(150, 100, 50, 0.5)",
        "rgba(50, 50, 50, 0.5)",
        "rgba(255, 100, 0, 0.5)",
        "rgba(150, 100, 50, 0.5)",
        "rgba(100, 254, 0.5)",
        "rgba(25, 100, 200, 0.5)",
        "rgba(75, 75, 75, 0.5)",
        "rgba(80, 20, 0, 0.5)",
        "rgba(255, 50, 254, 0.5)"
    ],
    data: [<?php while($count2<$i){echo $data_r[$count2]; $count2++;} ?>],
    options: {
    scales: {
        yAxes: [{
            beginAtZero: true
        }]
        }
    }
    }],
}
});
</script>

Como dicen en esta respuesta tienes que sobreescribir scales:

Añadiendo:

scaleOverride : true,
scaleStartValue : 0,

<script type="text/javascript">
var ctx = document.getElementById("reporte_tecnicos").getContext('2d');
var myChart = new Chart(ctx, {
type: 'bar',
scaleOverride : true,
scaleStartValue : 0,
data: {
labels: [<?php while($count<$i){echo $data_n[$count]; $count++;} ?>],
datasets: [{
    label: '',
    backgroundColor: [
        "rgba(0, 150, 254, 0.5)",
        "rgba(150, 100, 50, 0.5)",
        "rgba(50, 50, 50, 0.5)",
        "rgba(255, 100, 0, 0.5)",
        "rgba(150, 100, 50, 0.5)",
        "rgba(100, 254, 0.5)",
        "rgba(25, 100, 200, 0.5)",
        "rgba(75, 75, 75, 0.5)",
        "rgba(80, 20, 0, 0.5)",
        "rgba(255, 50, 254, 0.5)"
    ],
    data: [<?php while($count2<$i){echo $data_r[$count2]; $count2++;} ?>],
    options: {
    scales: {
        yAxes: [{
            beginAtZero: true
        }]
        }
    }
    }],
}
});
</script>
se añadieron 4 caracteres en el cuerpo
Origen Enlace
lois6b
  • 7.6k
  • 5
  • 33
  • 54

Como dicen en esta respuesta tienes que sobreescribir scales:

Añadiendo:

scaleOverride : true,
scaleStartValue : 0,

<script type="text/javascript">
var ctx = document.getElementById("reporte_tecnicos").getContext('2d');
var myChart = new Chart(ctx, {
type: 'bar',
scaleOverride : true,
scaleStartValue : 0,
data: {
labels: [<?php while($count<$i){echo $data_n[$count]; $count++;} ?>],
datasets: [{
    label: '',
    backgroundColor: [
        "rgba(0, 150, 254, 0.5)",
        "rgba(150, 100, 50, 0.5)",
        "rgba(50, 50, 50, 0.5)",
        "rgba(255, 100, 0, 0.5)",
        "rgba(150, 100, 50, 0.5)",
        "rgba(100, 254, 0.5)",
        "rgba(25, 100, 200, 0.5)",
        "rgba(75, 75, 75, 0.5)",
        "rgba(80, 20, 0, 0.5)",
        "rgba(255, 50, 254, 0.5)"
    ],
    data: [<?php while($count2<$i){echo $data_r[$count2]; $count2++;} ?>],
    options: {
    scales: {
        yAxes: [{
            beginAtZero: true
        }]
        }
    }
    }],
}
});
</script>
  

Como dicen en esta respuesta tienes que sobreescribir scales:

Añadiendo:

scaleOverride : true,
scaleStartValue : 0,

<script type="text/javascript">
var ctx = document.getElementById("reporte_tecnicos").getContext('2d');
var myChart = new Chart(ctx, {
type: 'bar',
scaleOverride : true,
scaleStartValue : 0,
data: {
labels: [<?php while($count<$i){echo $data_n[$count]; $count++;} ?>],
datasets: [{
    label: '',
    backgroundColor: [
        "rgba(0, 150, 254, 0.5)",
        "rgba(150, 100, 50, 0.5)",
        "rgba(50, 50, 50, 0.5)",
        "rgba(255, 100, 0, 0.5)",
        "rgba(150, 100, 50, 0.5)",
        "rgba(100, 254, 0.5)",
        "rgba(25, 100, 200, 0.5)",
        "rgba(75, 75, 75, 0.5)",
        "rgba(80, 20, 0, 0.5)",
        "rgba(255, 50, 254, 0.5)"
    ],
    data: [<?php while($count2<$i){echo $data_r[$count2]; $count2++;} ?>],
    options: {
    scales: {
        yAxes: [{
            beginAtZero: true
        }]
        }
    }
    }],
}
});
 

Como dicen en esta respuesta tienes que sobreescribir scales:

Añadiendo:

scaleOverride : true,
scaleStartValue : 0,

<script type="text/javascript">
var ctx = document.getElementById("reporte_tecnicos").getContext('2d');
var myChart = new Chart(ctx, {
type: 'bar',
scaleOverride : true,
scaleStartValue : 0,
data: {
labels: [<?php while($count<$i){echo $data_n[$count]; $count++;} ?>],
datasets: [{
    label: '',
    backgroundColor: [
        "rgba(0, 150, 254, 0.5)",
        "rgba(150, 100, 50, 0.5)",
        "rgba(50, 50, 50, 0.5)",
        "rgba(255, 100, 0, 0.5)",
        "rgba(150, 100, 50, 0.5)",
        "rgba(100, 254, 0.5)",
        "rgba(25, 100, 200, 0.5)",
        "rgba(75, 75, 75, 0.5)",
        "rgba(80, 20, 0, 0.5)",
        "rgba(255, 50, 254, 0.5)"
    ],
    data: [<?php while($count2<$i){echo $data_r[$count2]; $count2++;} ?>],
    options: {
    scales: {
        yAxes: [{
            beginAtZero: true
        }]
        }
    }
    }],
}
});
</script>
 
se añadieron 852 caracteres en el cuerpo
Origen Enlace
lois6b
  • 7.6k
  • 5
  • 33
  • 54

Como dicen en esta respuesta tienes que sobreescribir scales:

Añadiendo:

window.onloadscaleOverride =: function(){true,
 scaleStartValue : 0,

<script type="text/javascript">
var ctx = document.getElementById("reporte_tecnicos").getContext("2d"'2d');
   var window.myLinemyChart = new Chart(ctx, {
type: 'bar',
scaleOverride : true,
scaleStartValue : 0,
data: {
labels: [<?php while($count<$i){echo $data_n[$count]; $count++;} ?>],
datasets: [{
    label: '',
    backgroundColor: [
        "rgba(0, 150, 254, 0.Line5)",
        "rgba(lineChartData150, {100, 50, 0.5)",
        scaleOverride"rgba(50, 50, 50, 0.5)",
        "rgba(255, 100, 0, 0.5)",
        "rgba(150, 100, 50, 0.5)",
        "rgba(100, 254, 0.5)",
        "rgba(25, 100, 200, 0.5)",
        "rgba(75, 75, 75, 0.5)",
        "rgba(80, 20, 0, 0.5)",
        "rgba(255, 50, 254, 0.5)"
    ],
    data: true[<?php while($count2<$i){echo $data_r[$count2]; $count2++;} ?>],
    options: {
   scaleStartValue scales: 0{
        yAxes: [{
            beginAtZero: true
        });]
        }
    }
    }],
}
});
  

Como dicen en esta respuesta tienes que sobreescribir scales:

window.onload = function(){
    var ctx = document.getElementById("reporte_tecnicos").getContext("2d");
    window.myLine = new Chart(ctx).Line(lineChartData, {
        scaleOverride : true,
        scaleStartValue : 0 
    });
}
 

Como dicen en esta respuesta tienes que sobreescribir scales:

Añadiendo:

scaleOverride : true,
scaleStartValue : 0,

<script type="text/javascript">
var ctx = document.getElementById("reporte_tecnicos").getContext('2d');
var myChart = new Chart(ctx, {
type: 'bar',
scaleOverride : true,
scaleStartValue : 0,
data: {
labels: [<?php while($count<$i){echo $data_n[$count]; $count++;} ?>],
datasets: [{
    label: '',
    backgroundColor: [
        "rgba(0, 150, 254, 0.5)",
        "rgba(150, 100, 50, 0.5)",
        "rgba(50, 50, 50, 0.5)",
        "rgba(255, 100, 0, 0.5)",
        "rgba(150, 100, 50, 0.5)",
        "rgba(100, 254, 0.5)",
        "rgba(25, 100, 200, 0.5)",
        "rgba(75, 75, 75, 0.5)",
        "rgba(80, 20, 0, 0.5)",
        "rgba(255, 50, 254, 0.5)"
    ],
    data: [<?php while($count2<$i){echo $data_r[$count2]; $count2++;} ?>],
    options: {
    scales: {
        yAxes: [{
            beginAtZero: true
        }]
        }
    }
    }],
}
});
 
Origen Enlace
lois6b
  • 7.6k
  • 5
  • 33
  • 54
Loading