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

Tooltips on a RadChart

7 Answers 115 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Maxime
Top achievements
Rank 1
Maxime asked on 23 Jul 2012, 09:54 AM
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 ? :)

7 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 26 Jul 2012, 10:29 AM
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.
0
Evgenia
Telerik team
answered on 26 Jul 2012, 10:38 AM
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.
0
Maxime
Top achievements
Rank 1
answered on 26 Jul 2012, 12:05 PM
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>

0
Evgenia
Telerik team
answered on 27 Jul 2012, 11:00 AM
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.
0
Maxime
Top achievements
Rank 1
answered on 01 Aug 2012, 02:21 PM
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.
0
Accepted
Petar Marchev
Telerik team
answered on 06 Aug 2012, 06:52 AM
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.
0
Maxime
Top achievements
Rank 1
answered on 06 Aug 2012, 07:08 AM
Hello !

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

Greetings,
Maxime
Tags
Chart (Obsolete)
Asked by
Maxime
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Evgenia
Telerik team
Maxime
Top achievements
Rank 1
Petar Marchev
Telerik team
Share this question
or