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

Not getting tooltip on line chart series

1 Answer 134 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Rahul Khinvasara
Top achievements
Rank 1
Rahul Khinvasara asked on 19 Mar 2008, 05:30 AM
When I create a rad line chart series programatically and add items to the series programatically I am unable to see the active region tooltip when I run the radchart. The code I am using is as follows:
foreach (ChartSeries series in RadChart1.Series)
            {
                foreach (ChartSeriesItem item in series.Items)
                {

                    if (item.YValue < chartwarning)
                    {
                        item.Appearance.FillStyle.MainColor = Color.Red;
                        item.Appearance.FillStyle.SecondColor = Color.Red;
                        item.Appearance.Border.Color = Color.Red;
                        item.ActiveRegion.Tooltip = "warning below 0.8500";
                    }
                    else if (item.YValue >= chartwarning && item.YValue < chartcaution)
                    {
                        item.Appearance.FillStyle.MainColor = Color.Yellow;
                        item.Appearance.FillStyle.SecondColor = Color.Yellow;
                        item.Appearance.Border.Color = Color.Yellow;
                        item.ActiveRegion.Tooltip = "between caution and warning";
                    }
                    else if (item.YValue >= chartcaution && item.YValue < chartgoal)
                    {
                        item.Appearance.FillStyle.MainColor = (System.Drawing.Color)colConvert.ConvertFromString("#1010A6");
                        item.Appearance.FillStyle.SecondColor = (System.Drawing.Color)colConvert.ConvertFromString("#1010A6");
                        item.Appearance.Border.Color = (System.Drawing.Color)colConvert.ConvertFromString("#1010A6");
                        item.ActiveRegion.Tooltip = "above caution";
                    }
                    else if (item.YValue >= chartgoal)
                    {
                        item.Appearance.FillStyle.MainColor = Color.Green;
                        item.Appearance.FillStyle.SecondColor = Color.Green;
                        item.Appearance.Border.Color = Color.Green;
                        item.ActiveRegion.Tooltip = "Goal";
                    }
                    item.Label.TextBlock.Appearance.Dimensions.Margins.Top = 5;
                    item.Label.Appearance.RotationAngle = -90;
                    item.Label.TextBlock.Appearance.TextProperties.Color = Color.Black;
                }
            }
        }

What shall I do so that I can obtain tooltip for the entire line series as well as for individual chart series items i.e individual points on the line series?

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 20 Mar 2008, 05:18 PM
Hi Rahul,

To achieve this you should set Visible = true for the PointMark. Here is an example:

series.Appearance.PointMark.Visible = True
series.Appearance.PointMark.FillStyle.MainColor=Red
series.ActiveRegionToolTip = "MySeriesToolTip"

after this you can set tooltip for the entire item:

item.ActiveRegion.ToolTip = "MyItemToolTip"

Regards,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Chart (Obsolete)
Asked by
Rahul Khinvasara
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or