Inventor quantification The strategy The column diagram The drawing pattern

Author: The Little Dream, Created: 2017-07-21 18:12:00, Updated: 2019-07-31 18:29:03

Column diagrams Example diagrams

For those who do not know how to draw, here is an example.

  • This is a video of the incident.

var cfg = {
    __isStock: false,
    title : { text : 'diff'},
    chart : { type : 'column' },
    xAxis: { categories : []},           // cfg.xAxis.categories
    yAxis : {
        title : { text : "counts"}
    },
    series : [{
        type : "column",
        name : "a" + "&" + "b",
        data : [],                       // cfg.series.data
    }],
};

function changeNum(Num){
    if(Num > 100){
        return 0
    }
    Num += 5
    return Num
}

function main(){
    var chartObj = Chart(cfg)
    chartObj.reset()
    var a = 5
    var b = 15
    var c = 25
    
    chartObj.add(["a", 10])
    chartObj.add(["b", 20])
    chartObj.add(["c", 70])
    
    chartObj.add(["c", 55, -1])
    
    chartObj.update(cfg)
    
    while(true){
        a = changeNum(a)
        b = changeNum(b)
        c = changeNum(c)
        
        chartObj.add(["a", a, -3])
        chartObj.add(["b", b, -2])
        chartObj.add(["c", c, -1])
        chartObj.update(cfg)
        LogStatus(_D())
        Sleep(500)
    }
}
  • The real disk is running:

    img


More

The bride too.I'm going to edit /cfg.xAxis.categories, thank you.

The bride too.Can you change the underscore of each column diagram to a, b, c?

The Little DreamI'm not being polite.

The Little DreamYou can see the documentation of Highcharts.