3

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.

user2439903
  • 1,277
  • 2
  • 34
  • 68

1 Answers1

4

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

ezanker
  • 24,628
  • 1
  • 20
  • 35
  • Thanks for the answer, Can the cross hair line made invisible? I just want the crosshair tooltip to be visible at the top? – user2439903 Jun 16 '15 at 04:49
  • @user2439903, yes either set the crosshair width to 0 or the opacity to 0. http://dojo.telerik.com/@ezanker/oqUHe – ezanker Jun 16 '15 at 13:01