我正在尝试在较小的屏幕中旋转x轴的标签,以确保标签不会相互重叠。
代码
gca
aac
当我通过API Documentation时,在<kendo-chart *ngIf="!yearLoader" (seriesClick)="barClick($event)">
<kendo-chart-tooltip format="{0} events"></kendo-chart-tooltip>
<kendo-chart-category-axis>
<kendo-chart-category-axis-item [categories]="yearChartData.months">
</kendo-chart-category-axis-item>
</kendo-chart-category-axis>
<kendo-chart-series>
<kendo-chart-series-item [spacing]="1" [data]="yearChartData.count" type="column"></kendo-chart-series-item>
</kendo-chart-series>
</kendo-chart>
中发现了rotation
属性。我认为这可以解决我的问题。但是,我不知道如何在我的代码中使用它。有人可以帮我吗?
谢谢!
答案 0 :(得分:2)
您可以通过在async getData(id) {
await this.$store.dispatch('getData', {
employeeId: id,
});
if(this.employeeDate) //do something
},
async selectEmployee(d) {
await this.getData(d.employeeId);
// I need to execute this only after getData has been processed...
this.$store.dispatch('fetchHistory');
},
组件内嵌套kendo-chart-category-axis-item-labels
组件来旋转 x 轴或(类别轴)的标签。
(Example)
kendo-chart-category-axis-item
如果要旋转所有标签( x 和 y 轴),请使用<kendo-chart *ngIf="!yearLoader" (seriesClick)="barClick($event)">
...
<kendo-chart-category-axis>
<kendo-chart-category-axis-item [categories]="yearChartData.months">
<kendo-chart-category-axis-item-labels [rotation]="45">
</kendo-chart-category-axis-item-labels>
</kendo-chart-category-axis-item>
</kendo-chart-category-axis>
...
</kendo-chart>
组件并将其嵌套在kendo-chart-axis-defaults-labels
组件内。
kendo-grid