How do I provide X-axis and Y-axis value in the crosshair tooltip of a kendo chart?
I am trying to get the X axis and Y axis value in the crosshair tooltip of a kendo chart. See: http://dojo.telerik.com/iDanE
How can I do that? How do I specify the template for the tooltip to contain both the X axis and the Y axis value? Want to have both category and value axis value in the same crosshair tooltip. It can be done?
I just found a question with the same requirement: http://www.telerik.com/forums/show-multiple-series-value-in-a-categoryaxis-crosshair-tooltip-
But how can this be used in my example: http://dojo.telerik.com/iDanE ?
Thanks in advance.
source to share
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 can either add a second crosshair on valueAxis:
or just show a regular tooltip with category and value:
tooltip: {
visible: true,
template: "#: category # - #: value #"
},
source to share