2017-04-20 47 views
0

我使用Kendo UI Chart與Angular 2,圖表類型設置爲「Line」。 這是一個帶有telerik文檔示例的plunker。 現在的問題是:如何在沒有數據點「點」的情況下做出流暢的線條?kendo ui angular2圖表爲數據點隱藏點(在線模式下)

<kendo-chart [categoryAxis]="{ categories: categories }"> <kendo-chart-title text="Gross domestic product growth /GDP annual %/"></kendo-chart-title> <kendo-chart-legend position="bottom" 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="line" style="smooth" [data]="item.data" [name]="item.name"> </kendo-chart-series-item> </kendo-chart-series> </kendo-chart>

回答

1

您需要添加markers="visible: false"到板系列的配置,這樣的:

<kendo-chart [categoryAxis]="{ categories: categories }"> 
    <kendo-chart-title text="Gross domestic product growth /GDP annual %/"></kendo-chart-title> 
    <kendo-chart-legend position="bottom" 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" markers="visible: false" 
        type="line" style="smooth" [data]="item.data" [name]="item.name"> 
     </kendo-chart-series-item> 
    </kendo-chart-series> 
</kendo-chart> 
+0

謝謝@Orilux,它的作品! – kirhhof