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

Custom tooltips

2 Answers 55 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Pierre
Top achievements
Rank 1
Pierre asked on 26 Oct 2015, 09:54 AM

Hi,

 I have a SplineChart displaying a monthly number of customers. Now I'd like to have a tool-tip showing for each month the increase or decrease of customers since previous month. 

I've seen this page : http://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/clienttemplates/defaultcs.aspx, but since my telerik version is outdated (2012.3.1016.35)  I can't use <ClientTemplate> token inside of  <TooltipsAppearance>  </TooltipsAppearance>.

 

Instead I used :
 <TooltipsAppearance  ClientTemplate = "#=dataItem.MonthlyIncrease#"    BackgroundColor="Red"> </TooltipsAppearance>

Where MonthlyIncrease is a column of the dataTable binded to my chart. However this isn't working, the tooltip only show the monthly number of customers, not the increase (and the background is still white). 

Thank you very much for your help,
Pierre. 

Bellow more of my code:

 <telerik:RadHtmlChart runat="server" ID ="SplineChartVehiculesSixMois" Skin="Simple" Transistions = "true" ToolTip = "true">

    <PlotArea>

        <Series>                                     

            <telerik:BarSeries>                                         

                <TooltipsAppearance  ClientTemplate = "#=dataItem.NombreVehi#" BackgroundColor="Red">  

                </TooltipsAppearance>

            </telerik:BarSeries>

         </Series>

     </PlotArea> 

</telerik:RadHtmlChart>



 

2 Answers, 1 is accepted

Sort by
0
Pierre
Top achievements
Rank 1
answered on 26 Oct 2015, 09:56 AM

Sorry I didn't see the formatting options. Here is my formated code: 

01.<telerik:RadHtmlChart runat="server" ID ="SplineChartVehiculesSixMois" Skin="Simple" Transistions = "true" ToolTip = "true"
02.    <PlotArea>
03.        <Series>
04.        <telerik:BarSeries>
05.            <TooltipsAppearance  ClientTemplate = "#=dataItem.NombreVehi#" BackgroundColor="Red">     
06.            </TooltipsAppearance>
07.        </telerik:BarSeries>
08. 
09. 
10.        </Series>
11.    </PlotArea>                                         
12.</telerik:RadHtmlChart>

0
Danail Vasilev
Telerik team
answered on 28 Oct 2015, 09:12 AM
Hi Pierre,

If the chart is data bound and the "MonthlyIncrease" field presents in the data source, it is supposed to be displayed inside the chart. A fully runnable sample on this regards is available here - http://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/clienttemplates/defaultcs.aspx

If the above step do not help I would suggest the following:
   - Examine the browser console for the existence of any JavaScript errors and if so try to fix them.
   - Try to upgrade to latest Telerik UI version - 2015.3.930.

Regards,
Danail Vasilev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart (HTML5)
Asked by
Pierre
Top achievements
Rank 1
Answers by
Pierre
Top achievements
Rank 1
Danail Vasilev
Telerik team
Share this question
or