如何使用角度为2的kendo图表类别轴添加单击处理程序

时间:2017-01-24 10:02:11

标签: angular event-handling kendo-chart

我在 angular 2 项目中使用剑道图,并尝试添加kendo-chart-category-axis-item文字的链接但不起作用。是否可以添加链接或至少添加单击事件处理程序?

<kendo-chart-category-axis>
   <kendo-chart-category-axis-item [categories]="Date">
   </kendo-chart-category-axis-item>
</kendo-chart-category-axis>

1 个答案:

答案 0 :(得分:0)

我发现现在可以在kendo图表标签中使用“ axisLabelClick ”,您可以将标签添加到轴中,如下所示:

<kendo-chart (axisLabelClick)="axisLabelClickHandler($event)">
   <kendo-chart-category-axis>
      <kendo-chart-category-axis-item>
         <kendo-chart-category-axis-item-labels [content]="Date"> </kendo-chart-category-axis-item-labels>
      </kendo-chart-category-axis-item>
   </kendo-chart-category-axis>
</kendo-chart>