This is a migrated thread and some comments may be shown as answers.

Changing tooltip format of ohlc

1 Answer 84 Views
Charts
This is a migrated thread and some comments may be shown as answers.
UT
Top achievements
Rank 1
UT asked on 08 Nov 2013, 04:19 PM
Hi, 

On the demo page for stock chart, I see the values of ohlc values with .2 digit precision. eg: 73.84, 74.56... How can I change that sample to show values in 4 digit precision. eg: 73.8400, 74.5697...

Thanks in advance,

1 Answer, 1 is accepted

Sort by
0
Accepted
Iliana Dyankova
Telerik team
answered on 11 Nov 2013, 10:17 AM
Hello Bsm,

I already answered to the same question in the support ticket you opened, however I am pasting my reply here too:

In order to achieve this you could use a tooltip.template. For example:

Copy Code
$("#stock-chart").kendoStockChart({
  //....
  tooltip: {
    template: "#= category # <br/>Open: #= kendo.format('{0:n4}', dataItem.Open) #<br/> Close:  #= kendo.format('{0:n4}', dataItem.Close) #"
  }
});

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Charts
Asked by
UT
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or