I'm building a Kendo Chart in a razor view and have
.Tooltip(tooltip => tooltip.Visible(true))
Is there any other function on the configuration action that I can use to include the series category title on the tooltip?
The documentation for Template()
and Format()
appear to be for JS implementations rather than razor implementations.
Templates
Tooltip content can be defined with a Kendo Template when more flexibility is desired. The template provides access to all information associated with the point:
You can add in a specific template and format like so:
.Tooltip(tooltip => tooltip
.Template("#=category# - #=value #")
.Format("{0}%")
.Visible(true)
)
This would give you a tooltip that looks like:
Hydro - 22%
I believe that using the Template and Format helpers together may cause some conflict, but you can add a format into the template like this:
.Template("#=category# - #=kendo.format('{0}', value)#")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With