wwj1992
$(target).highcharts({
                    chart: {
                        type: \'bar\'
                    },
                    colors: [
                        "#1ab394"
                    ],
                    title: {
                        text: title
                    },
                    legend: {
                        enabled: false
                    },
                    exporting: {
                        enabled: false
                    },
                    credits: {
                        enabled: false
                    },
                    xAxis: {
                        categories: categories
                    },
                    yAxis: {
                        min: 0,
                        title: {
                            text: label + "(" + unit + ")"
                        }
                    },
                    tooltip: {
                        shared: true,
                    },
                    plotOptions: {
                        series: {
                            dataLabels: {
                                enabled: true,      //设置柱状图显示数值

                                formatter: function () {
                                    return this.point.y + \'%\';  // 设置柱状图显示数值并且带单位
                                },
                            },
                        }
                    },
                    series: [{
                        name: label,
                        tooltip: {
                            valueSuffix: unit
                        },
                        data: data
                    }]
                });
            }
        }

  

分类:

技术点:

相关文章:

  • 2022-02-22
  • 2022-02-10
  • 2021-12-12
  • 2021-04-27
  • 2021-12-13
  • 2022-12-23
  • 2022-01-22
  • 2022-02-27
猜你喜欢
  • 2022-02-02
  • 2021-10-24
  • 2021-12-21
  • 2022-01-04
  • 2022-01-31
相关资源
相似解决方案