

// サイトごとの比較
var ctx = document.getElementById('myChart2').getContext('2d');
var chart = new Chart(ctx, {
    type: "bar",
    data: {
        labels:  ["新人期間","1か月", "2か月", "3か月", "4か月", "5か月"],  // Ｘ軸のラベル
        datasets: [
          
            {   // 女性                                           
                label: "月収",                             
                data: [30, 30,60 , 90, 120,  150],                 
                backgroundColor: "#ff1493"                     
            }                                               
        ]
    },
    options: {
        responsive: true, 
        maintainAspectRatio: false,
        title: { 
            display: true,
            fontSize: 20,
            text: "お気に入り月100名獲得した場合の月収入目安"
        },
        legend: { 
            position: 'bottom'
        },                
        scales: {
            yAxes: [{
                ticks: {
                    callback: function(value, index, values) {
                        return value + '万円';
                    } 
                }
                    
            }]
        },
        plugins: {
        datalabels: {
            font: {
                size: 14 
            },
            color: '#484848',
            align: 'end',
            anchor: 'end',
            formatter: function (value, context) {
                return value + '万円';   // 単位
            }
        }
        }
    }
});
