Search code examples
angularkendo-uiteleriktooltip

Kendo UI Chart Format Date in Shared Tooltip


I'm using Telerik Kendo UI Chart for Angular to create a StockChart.I'm using a shared tooltip with the default template. But, the date inside this default tooltip is shown as mm/dd/yyyy and I want to change this format to something like MM/dd/yyyy hh:mm:ss.

So, How I change the date format inside a Shared Tooltip ?

My code with the tooltip :

<kendo-stockchart>
      <kendo-chart-tooltip [shared]="true" format="{0:N1}">
      </kendo-chart-tooltip>
....
</kendo-stockchart>

Solution

  • You can use the ToolTip template where both the category and series are available for each point and customize the displayed values accordingly, e.g.:

    DOCS

    EXAMPLE

    Use the Intl service or other means to format all values as desired:

    DOCS

    API

    EXAMPLE