How to provide X axis and Y Axis value in kendo chart crosshair tooltip?

2.7k views Asked by At

I am trying to get the X axis and Y axis value in crosshair tooltip of kendo chart. Please see: http://dojo.telerik.com/iDanE

How can this be done? How to specify the template for tooltip to contain both X axis and Y axis value? Want to have both category and value axis value in the same crosshair tooltip. Can this be done?

I just found a question with same requirement: http://www.telerik.com/forums/show-multiple-series-value-in-a-categoryaxis-crosshair-tooltip-

But how can use this in my example : http://dojo.telerik.com/iDanE ?

Thanks in advance.

1

There are 1 answers

2
ezanker On

According to their documentation, the crosshair tooltip template only has access to the axis value: http://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart#configuration-categoryAxis.crosshair.tooltip.template

So you could either add the second crosshair on the valueAxis:

DEMO

or just show a regular tooltip with both category and value:

  tooltip: {
    visible: true,
    template: "#: category  # - #: value #"
  },

DEMO