Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 图表Js-条形图-如何使标签的第一行加粗?_Javascript_Jquery_Chart.js_Bar Chart_Chartjs 2.6.0 - Fatal编程技术网

Javascript 图表Js-条形图-如何使标签的第一行加粗?

Javascript 图表Js-条形图-如何使标签的第一行加粗?,javascript,jquery,chart.js,bar-chart,chartjs-2.6.0,Javascript,Jquery,Chart.js,Bar Chart,Chartjs 2.6.0,我正在使用chart.js,无法将标签的第一行加粗 有人能建议怎么做吗 请查看我的代码和附件 附后的photoshop中第一行粗体显示 我已经试过了,但是下面的代码不起作用 你能把你尝试过的东西整理一下吗?那会很有帮助。代码在项目中,不能整理!没有你的功能性样品,你很难复制吗@RobMoll您建议的问题/答案似乎是重复的,但两个代码都不同。我们已经尝试了你的参考链接,但它不起作用。请建议! var horizontalBarChart = new Chart(horizontalBarChart

我正在使用chart.js,无法将标签的第一行加粗

有人能建议怎么做吗

请查看我的代码和附件

附后的photoshop中第一行粗体显示

我已经试过了,但是下面的代码不起作用


你能把你尝试过的东西整理一下吗?那会很有帮助。代码在项目中,不能整理!没有你的功能性样品,你很难复制吗@RobMoll您建议的问题/答案似乎是重复的,但两个代码都不同。我们已经尝试了你的参考链接,但它不起作用。请建议!
var horizontalBarChart = new Chart(horizontalBarChartCanvas, {
            type: 'horizontalBar',
            data: {
                labels: [["Company Brand A", "Brand A"], "Company Brand B", "Company Brand C", "Company Brand D", "Company Brand E", "Company Brand F", "Company Brand G"],
                datasets: [{
                    data: [5000, 12000, 3000, 8000, 10000, 4000, 14000],
                    backgroundColor: ["#01d283", "#01d283", "#01d283", "#01d283", "#01d283", "#01d283", "#01d283"],
                }]
            },
            options: {
                tooltips: {
                    enabled: true
                },
                responsive: true,
                legend: {
                    display: false,
                    position: 'bottom',
                    fullWidth: true,
                },
                scales: {
                    pointLabels: {
                        fontStyle: "bold",
                    },
                    yAxes: [{
                        barPercentage: 0.50,
                        gridLines: {
                            display: false,
                        },
                        ticks: {
                            fontColor: '#004c7f',
                            fontFamily: 'Open Sans',
                        }
                    }],
                    xAxes: [{
                        gridLines: {
                            display: false,
                            tickMarkLength: 5,
                        },
                        ticks: {
                            fontColor: '#004c7f',
                            fontFamily: 'Open Sans',
                            weight: "bold"
                        },
                        scaleLabel: {
                            display: false,
                            fontFamily: 'Open Sans',
                            fontColor: '#004c7f',
                            labelString: 'Scale Label'
                        },
                    }],
                },
            }
        });
scales: {
     pointLabels: {
          fontStyle: "bold",
     },
}