質問

I got the chart working with 4 stacked serieses but the last one i need to draw outside the stack as a bar for the rest but i cant get it out of the stack.

i used "paint" to draw the desired location of the "Burnup Line" in red and thats how it should look like:

p.s. why my graph starts from -100 ? image

[ Image link here ]

$(document).ready(function(){

    var l1 = [3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 10, 10, 12, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 21, 30, 31, 31, 31, 31, 32, 32, 33, 36, 42, 42, 42, 44, 45, 51, 53, 60, 60, 60, 62, 63, 63, 65, 65, 65, 65, 65, 66, 73, 82, 88, 88, 88, 89, 89, 89, 89, 91, 91, 91, 104, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
    var l2 = [0, 0, 2, 2, 2, 10, 10, 10, 10, 10, 7, 7, 7, 5, 5, 5, 6, 3, 5, 11, 11, 11, 11, 16, 10, 9, 8, 8, 8, 8, 8, 11, 13, 14, 8, 8, 8, 7, 8, 6, 11, 9, 9, 9, 7, 7, 8, 7, 7, 7, 7, 13, 15, 10, 4, 0, 0, 0, 2, 2, 2, 5, 7, 7, 7, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
    var l3 = [14, 14, 14, 14, 14, 8, 15, 15, 15, 15, 13, 14, 16, 19, 19, 19, 22, 27, 27, 23, 23, 24, 24, 19, 18, 9, 11, 16, 16, 16, 14, 17, 14, 15, 15, 15, 15, 14, 22, 18, 12, 10, 10, 10, 18, 19, 22, 22, 22, 22, 22, 19, 22, 21, 21, 24, 24, 24, 31, 33, 38, 36, 34, 34, 34, 21, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];    
    var l4 = [27, 27, 24, 24, 24, 84, 92, 92, 92, 94, 86, 85, 88, 92, 92, 92, 88, 81, 78, 76, 76, 75, 75, 91, 91, 89, 94, 89, 94, 94, 92, 91, 91, 86, 99, 99, 99, 99, 83, 83, 80, 76, 76, 76, 70, 63, 55, 51, 51, 51, 51, 51, 45, 44, 40, 32, 32, 32, 31, 29, 28, 27, 32, 32, 32, 31, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];

    var l5 = [0, 2, 4, 6, 8, 9, 11, 13, 15, 17, 18, 20, 22, 24, 26, 27, 29, 31, 33, 35, 36, 38, 40, 42, 44, 45, 47, 49, 51, 53, 54, 56, 58, 60, 61, 63, 65, 67, 69, 70, 72, 74, 76, 78, 79, 81, 83, 85, 87, 88, 90, 92, 94, 96, 97, 99, 101, 103, 105, 106, 108, 110, 112, 113, 115, 117, 119, 121, 122, 124, 126, 128, 130, 131, 133, 135, 137, 139, 140, 142, 144, 146, 148, 149, 151, 153, 155, 157, 158, 160, 162, 164, 165];

    var ticks = ["15/11/2013", "16/11/2013", "17/11/2013", "18/11/2013", "19/11/2013", "20/11/2013", "21/11/2013", "22/11/2013", "23/11/2013", "24/11/2013", "25/11/2013", "26/11/2013", "27/11/2013", "28/11/2013", "29/11/2013", "30/11/2013", "01/12/2013", "02/12/2013", "03/12/2013", "04/12/2013", "05/12/2013", "06/12/2013", "07/12/2013", "08/12/2013", "09/12/2013", "10/12/2013", "11/12/2013", "12/12/2013", "13/12/2013", "14/12/2013", "15/12/2013", "16/12/2013", "17/12/2013", "18/12/2013", "19/12/2013", "20/12/2013", "21/12/2013", "22/12/2013", "23/12/2013", "24/12/2013", "25/12/2013", "26/12/2013", "27/12/2013", "28/12/2013", "29/12/2013", "30/12/2013", "31/12/2013", "01/01/2014", "02/01/2014", "03/01/2014", "04/01/2014", "05/01/2014", "06/01/2014", "07/01/2014", "08/01/2014", "09/01/2014", "10/01/2014", "11/01/2014", "12/01/2014", "13/01/2014", "14/01/2014", "15/01/2014", "16/01/2014", "17/01/2014", "18/01/2014", "19/01/2014", "20/01/2014", "21/01/2014", "22/01/2014", "23/01/2014", "24/01/2014", "25/01/2014", "26/01/2014", "27/01/2014", "28/01/2014", "29/01/2014", "30/01/2014", "31/01/2014", "01/02/2014", "02/02/2014", "03/02/2014", "04/02/2014", "05/02/2014", "06/02/2014", "07/02/2014", "08/02/2014", "09/02/2014", "10/02/2014", "11/02/2014", "12/02/2014", "13/02/2014", "14/02/2014", "15/02/2014"];

    var plot1b = $.jqplot('chart1b',[l1, l2, l3, l4, l5],{
       stackSeries: true,
       showMarker: true,
       seriesDefaults: {
           fill: true,
       },
       highlighter: {
        show: true,
        showTooltip: true
       },
       series: [
            {label: 'Sum of Done'},
            {label: 'Sum of System Testing'},
            {label: 'Sum of Develop'},
            {label: 'Sum of Open'},
            {label: 'Burnup Line'}
       ],
       legend: {
        show: true,
        placement: 'outsideGrid'
       },
       axes: {
           xaxis: {
               renderer: $.jqplot.CategoryAxisRenderer,
               tickRenderer: $.jqplot.CanvasAxisTickRenderer,
                tickOptions: {
                    angle: 65,
                    fontSize: '7pt',
                    markSize: 4
                },
               ticks: ticks,
           },
       }
    });
});
役に立ちましたか?

解決

Got it.

{label: 'Burnup Line', disableStack:true, fill:false}

Thanks anyway :)

*keeping this if anyone need it (i couldent find it online as a question, had to dig deep in the documentation)

to fix the graph from starting from -100 i added:

yaxis:{
    min:0
},
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top