Tooltips on a RadChart

Thread is closed for posting
8 posts, 1 answers
  1. Maxime
    Maxime avatar
    37 posts
    Member since:
    May 2012

    Posted 23 Jul 2012 Link to this post

    Hi everyone,

    I followed Telerik examples in order to add tooltips on my chart. I have just copied and paste the example and this is working.
    I tried to do the same on one of my chart. I add every items on the serie with a "for" loop"

    o_gaussianItem.YValue = f_resultFormula;
    o_gaussianCurve.Items.Add(o_gaussianItem);

    So, in order to have my tooltips, i made the following modification :

    o_gaussianItem.YValue = f_resultFormula;
    o_gaussianItem.ActiveRegion.Tooltip = "x :" + Math.Round(o_gaussianItem.YValue,3);
    o_gaussianCurve.Items.Add(o_gaussianItem);

    I have also added a RadTooltipManager on my aspx page :

    <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server"
     width="200px" Animation="None" Position="TopCenter" EnableShadow="true"
        ToolTipZoneID="CHT_AvgHistogramme" AutoTooltipify="true">
    </telerik:RadToolTipManager>

    But this is not working. :/
    I have 200 points on my spline.
    Any help ? :)
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 26 Jul 2012 Link to this post

    Hi,

    Unfortunately I couldn't replicate the issue. Here is the sample code I tried based on your scenario which works as expected.

    C#:
    protected void Page_Load(object sender, EventArgs e)
    {
     if (!Page.IsPostBack)
     {
      Telerik.Charting.ChartSeries Series1 = new Telerik.Charting.ChartSeries();
      for (int i = 1; i < 5; i++)
      {
       Telerik.Charting.ChartSeriesItem item = new Telerik.Charting.ChartSeriesItem();
       item.YValue = i;
       item.XValue = i + 1;
       item.ActiveRegion.Tooltip = "x :" + Math.Round(item.YValue, 3);
       Series1.Items.Add(item);
      }
     }
    }

    Please provide your code if this doesn't helps.

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Evgenia
    Admin
    Evgenia avatar
    1407 posts

    Posted 26 Jul 2012 Link to this post

    Hi Maxime,

    The tooltip functionality is not supported when zooming and scrolling is enabled for the chart control and it would not be possible to apply both of them simultaneously. If this is the case, please remove the zoomscroll functionality. Otherwise could you please send us a sample runnable project where this reproduces so that we will be able to inspect locally what is the cause for the problem?

    Greetings,
    Evgenia
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Maxime
    Maxime avatar
    37 posts
    Member since:
    May 2012

    Posted 26 Jul 2012 Link to this post

    Hello,

    Thanks for your answers !
    Here are the properties i have modified to achieve what I wan :

    - Auto layout = true
    - Default type = spline
    - Height = 400 px
    - Width = 600 px

    When i enter in debug mode, i see that tooltips value content the appropriate value but nothing is displayed. I'll try to investigate if i made something wrong. Here is my tooltip manager :

    <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server"  Width="200px"
    Animation
    ="None" Position="TopCenter" EnableShadow="true"
    ToolTipZoneID
    ="CHT_AvgHistogramme" AutoTooltipify="true">
    </telerik:RadToolTipManager>

    Here is my chart :

    <telerik:RadChart ID="CHT_AvgHistogramme" runat="server" Width="600px" Height="400px"
    AutoLayout="true" DefaultType="Spline" meta:resourcekey="CHT_AvgHistogrammeResource1"
    ClientSettings-EnableZoom="False">
    <Appearance>
    <FillStyle MainColor="">
    </FillStyle>
    <Border Visible="False" />
    </Appearance>
    <Legend Visible="False">
    <Appearance Visible="False">
    </Appearance>
    </Legend>
    <PlotArea>
    <XAxis AutoScale="False" LayoutMode="Normal">
    <Appearance>
    <MajorGridLines Color="Gray" />
    <MinorGridLines Color="LightGray" />
    </Appearance>
    </XAxis>
    <YAxis>
    <Appearance>
    <MajorGridLines Color="Gray" />
    </Appearance>
    </YAxis>
    <Appearance Dimensions-Margins="15%, 4%, 12%, 8%">
    <FillStyle FillType="Solid" MainColor="White" SecondColor="">
    </FillStyle>
    </Appearance>
    </PlotArea>
    <ChartTitle>
    <Appearance Dimensions-Margins="4%, 50%, 50%, 33%">
    <FillStyle MainColor="">
    </FillStyle>
    <Border Visible="False" />
    </Appearance>
    </ChartTitle>
    </telerik:RadChart>

  6. Evgenia
    Admin
    Evgenia avatar
    1407 posts

    Posted 27 Jul 2012 Link to this post

    Hello Maxime,

     If this will make it easier for you to investigate what might be wrong in your scenario - you may compare it with our online demo (with provided source code) where we use RadTooltip with Line series.

    Let us know if there is something else we can assist you with.

    Kind regards,
    Evgenia
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  7. Maxime
    Maxime avatar
    37 posts
    Member since:
    May 2012

    Posted 01 Aug 2012 Link to this post

    Hello,

    I have tested if it is possible to show tooltips with 200 dots and it seems to be impossible. Can you try to replicate this issue ?

    The following code is working:
    if (!Page.IsPostBack)
                {
                    Telerik.Charting.ChartSeries Series1 = new Telerik.Charting.ChartSeries();
                    for (int i = 1; i < 200; i++)
                    {
                        Telerik.Charting.ChartSeriesItem item = new Telerik.Charting.ChartSeriesItem();
                        item.YValue = i;
                        item.XValue = i + 1;
                        item.ActiveRegion.Tooltip = "x :" + Math.Round(item.YValue, 3);
                        Series1.Items.Add(item);
                    }
                    Series1.Type = Telerik.Charting.ChartSeriesType.Bar;
                    RadChart1.Series.Add(Series1);
                }

    But if we change "Bar" to "Spline, this is not.
  8. Answer
    Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 06 Aug 2012 Link to this post

    Hi Maxime,

    I think that the only thing you are missing is to set the visibility of the PointMark to true, because by default is false. I have attached a simple project to this response. When I run this project and place the mouse cursor over the red-ish circle, a tool tip shows as expected. Give it a try and see if you get the same results.

    Greetings,
    Petar Marchev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  9. Maxime
    Maxime avatar
    37 posts
    Member since:
    May 2012

    Posted 06 Aug 2012 Link to this post

    Hello !

    Many thanks for the sample, it helps me to resolve the issue.
    Indeed, setting the PointMark visibility to True did it !

    Greetings,
    Maxime
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017