未显示Kendo-ui-angular2饼图标签

时间:2017-02-17 18:01:20

标签: kendo-ui-angular2

我正在尝试在Kendo-ui-angular2中构建一个饼图。显示饼图,但不显示标签。任何现场直播者或例子都非常受欢迎。

<kendo-chart>
            <kendo-chart-title text="Gross domestic product growth /GDP annual %/"></kendo-chart-title>
            <kendo-chart-legend position="top" orientation="horizontal"></kendo-chart-legend>
            <kendo-chart-tooltip format="{0}%"></kendo-chart-tooltip>
            <kendo-chart-series>
                <kendo-chart-series-item *ngFor="let item of series"
                    type="donut" [data]="item.data" [name]="item.name">
                </kendo-chart-series-item>
            </kendo-chart-series>
        </kendo-chart>


  private series: any[] = [{
    name: ["India","Aus", "Fin"],
    data: [3.907, 7.943, 7.848]
  }];

1 个答案:

答案 0 :(得分:1)

你必须添加:

<kendo-chart-series-defaults>
   <kendo-chart-series-defaults-labels [visible]="true" </kendo-chart-series-defaults-labels>
</kendo-chart-series-defaults>