Custom tooltips

3 posts, 0 answers
  1. Pierre
    Pierre avatar
    2 posts
    Member since:
    Oct 2015

    Posted 26 Oct 2015 Link to this post

    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. Pierre
    Pierre avatar
    2 posts
    Member since:
    Oct 2015

    Posted 26 Oct 2015 in reply to Pierre Link to this post

    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>

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 28 Oct 2015 Link to this post

    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
Back to Top