0

Using UI for ASP.NET AJAX RadHtmlChart feature, In a Column Chart, I am trying to format a date in a Tooltip's ClientTemplate and I can't seem to figure it out.

On the Y-Axis I have dollar amounts, on the X-Axis I have the 24 hours of the day (12am, 1am, 2am, ... 11pm). The X-Axis labels work fine using the following:

<LabelsAppearance DataFormatString="htt" RotationAngle="0" />

Unfortunately, when I use the following ToolTips template the X-Axis value renders as a long format date like Tue Nov 11 2014 03:00:00 GMT-0600 (Central Standard Time) rather than 3AM:

<TooltipsAppearance BackgroundColor="#ffffff" Color="#5ab7de">
  <ClientTemplate>
    <div><b>#=category#</b></div>
    <div>$#=value#</div>
  </ClientTemplate>
</TooltipsAppearance>

How do I get #=category= to format my date like this: 4PM?

Tantalus
  • 397
  • 1
  • 3
  • 11

1 Answers1

1

Well, the answer was buried in a demo on the Telerik site but here's the code I needed:

#= kendo.format(\'{0:htt}\', category) #
Tantalus
  • 397
  • 1
  • 3
  • 11