在饼图(饼图)上方显示百分比值

时间:2019-08-29 15:15:42

标签: charts chart.js

我需要执行两个查询的联合

我需要在其上方显示饼图的结果,这些是我发送到图表的选项。

  self.options = {
         title: {
            position : 'top',
            display: true,
            text: 'PERSONAL POR CIUDAD'
        },
           maintainAspectRatio: false,
           responsive: true,
        }
        self.chartDataCity = {
          labels : self.chartLabelCity,
          datasets : [
            {
               backgroundColor: [
                'rgb(69,166,90)',
                'rgb(242,156,17)',
                'rgb(86,193,239)',
                'rgb(221,75,57)',
            ],
              label : "Personal por ciudad",
              data : self.chartDataCity,
            }
          ]
        }
      })
    },

这是图形的结果 This is the result of the graph

第二张图片是我希望图形看起来如何的示例,图形上方的百分比

example image

0 个答案:

没有答案