Home Forums Report Bugs Y axis value 0

Y axis value 0

Viewing 5 posts - 1 through 5 (of 5 total)
  • #32457

    Hi there,

    as said in the title I encountered a problem when the value of the Y axis is 0, my graph “bursts through the ceiling”

    on January 1st
    [url=https://zupimages.net/viewer.php?id=21/01/nw4h.png][img]https://zupimages.net/up/21/01/nw4h.png[/img][/url]

    if I put in column format I have the same problem
    I also tried adding includeZero : true,

    the code :

    var chart7days = {
    animationEnabled: true,
    zoomEnabled: true,
    theme: “dark2”,
    title:{
    text: “traitement des tickets sur 1 semaine”
    },
    axisX:{
    //title: “Dates”,
    labelFormatter: function (e) {
    return CanvasJS.formatDate( e.value, “DD MMM”);
    },
    labelAngle: -20
    },
    axisY:{
    logarithmic: true,
    title: “Nombre de tickets”,
    maximum : 200,
    titleFontColor: “#6D78AD”,
    lineColor: “#6D78AD”,
    gridThickness: 0,
    lineThickness: 1,
    },
    axisY2:{
    titleFontColor: “#51CDA0”,
    logarithmic: false,
    lineColor: “#51CDA0”,
    gridThickness: 0,
    lineThickness: 1,
    },
    axisY3:{
    titleFontColor: “#DC143C”,
    logarithmic: false,
    lineColor: “#DC143C”,
    gridThickness: 0,
    lineThickness: 1,
    },
    axisY4:{
    titleFontColor: “#FFF168”,
    logarithmic: false,
    lineColor: “#FFF168”,
    gridThickness: 0,
    lineThickness: 1,
    },
    legend:{
    verticalAlign: “top”,
    fontSize: 16,
    dockInsidePlotArea: true
    },
    data: [{
    showInLegend: true,
    name: “Backlog”,
    type: “spline”,
    dataPoints: dataPoints7backlog
    },
    {
    showInLegend: true,
    name: “Nouveaux tickets”,
    type: “spline”,
    dataPoints: dataPoints7new
    },
    {
    showInLegend: true,
    name: “Tickets traités”,
    type: “spline”,
    dataPoints: dataPoints7processed
    },
    {
    showInLegend: true,
    name: “ESDI”,
    type: “spline”,
    dataPoints: dataPoints7esdi
    }]
    };

    if anyone has an idea that interests me
    thx
    Chris

    • This topic was modified 3 years, 11 months ago by chris74.
    #32459

    [url=https://zupimages.net/viewer.php?id=21/01/nw4h.png][img]https://zupimages.net/up/21/01/nw4h.png[/img][/url]

    #32469

    @chris74,

    A logarithmic axis can only plot positive values. There simply is no way to put negative values or zero on a logarithmic axis.

    Fundamental: If 10L = Z, then L is the logarithm (base 10) of Z. If L is a negative value, then Z is a positive fraction of less than 1.0. If L is zero, then Z equals 1.0. If L is greater than 0, then Z is greater than 1.0. Note that there no value of L will result in a value of Z that is zero or negative. Logarithms are simply not defined for zero or negative numbers.


    Shashi Ranjan
    Team CanvasJS

    #32470

    hi Shashi,

    Thanks for your feedback

    #32471

    indeed, if I set the logarithmic to false it works fine
    thank you

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.