Angular 4 Kendo 柱形图默认显示值并在底部显示 Y 轴名称
Angular 4 Kendo Column Graph show value by default and show Y axis name at bottom
这里有 2 个问题。
1)我想默认在列栏顶部显示值。
2)数据具有负值和正值。我需要在图表底部显示名称。但如果值为负数,名称将显示在列中。
<kendo-chart>
<kendo-chart-title text="% Top 10"></kendo-chart-title>
<kendo-chart-series>
<kendo-chart-series-item type="column" [data]="UI.series" field="data"
categoryField="name"
[color]="UI.handlers.pointColor"
>
<kendo-chart-series-item-tooltip background="skyblue" visible="true">
<ng-template let-dataItem="dataItem">
{{dataItem.data}}%
</ng-template>
</kendo-chart-series-item-tooltip>
</kendo-chart-series-item>
</kendo-chart-series>
</kendo-chart>
<kendo-chart [categoryAxis]="{labels: { rotation: 'auto'} }">
<kendo-chart-title text="% Share Chg Top 10"></kendo-chart-title>
<kendo-chart-legend position="bottom" orientation="horizontal"></kendo-chart-legend>
<kendo-chart-series>
<kendo-chart-series-item type="column" [data]="UI.gridData" field="dath" categoryField="name" [color]="UI.handlers.pointColor" visible="true">
<kendo-chart-series-item-labels [format]="'p2'">
</kendo-chart-series-item-labels>
<!--<kendo-chart-series-item-tooltip background="skyblue" visible="true">
<ng-template let-dataItem="dataItem">
{{dataItem.data| number : '1.2-2'}}%
</ng-template>
</kendo-chart-series-item-tooltip>-->
</kendo-chart-series-item>
</kendo-chart-series>
</kendo-chart>
这里有 2 个问题。
<kendo-chart>
<kendo-chart-title text="% Top 10"></kendo-chart-title>
<kendo-chart-series>
<kendo-chart-series-item type="column" [data]="UI.series" field="data"
categoryField="name"
[color]="UI.handlers.pointColor"
>
<kendo-chart-series-item-tooltip background="skyblue" visible="true">
<ng-template let-dataItem="dataItem">
{{dataItem.data}}%
</ng-template>
</kendo-chart-series-item-tooltip>
</kendo-chart-series-item>
</kendo-chart-series>
</kendo-chart>
<kendo-chart [categoryAxis]="{labels: { rotation: 'auto'} }">
<kendo-chart-title text="% Share Chg Top 10"></kendo-chart-title>
<kendo-chart-legend position="bottom" orientation="horizontal"></kendo-chart-legend>
<kendo-chart-series>
<kendo-chart-series-item type="column" [data]="UI.gridData" field="dath" categoryField="name" [color]="UI.handlers.pointColor" visible="true">
<kendo-chart-series-item-labels [format]="'p2'">
</kendo-chart-series-item-labels>
<!--<kendo-chart-series-item-tooltip background="skyblue" visible="true">
<ng-template let-dataItem="dataItem">
{{dataItem.data| number : '1.2-2'}}%
</ng-template>
</kendo-chart-series-item-tooltip>-->
</kendo-chart-series-item>
</kendo-chart-series>
</kendo-chart>