DustinW Posted September 2, 2009 Report Share Posted September 2, 2009 I need to place a link on each xaxis label that redirects to another page and to do that I put this code in: protected void Chart1_DataBound(object sender, EventArgs e) { Chart1.AxisX.Sections.Clear(); for (int i = 1; i < 14; i++) { AxisSection asec = new AxisSection(i, i, Color.Transparent); asec.Text = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(Chart1.AxisX.Labels); asec.Link.Url = "charttraffic.aspx?lbl=" + Chart1.AxisX.Labels + "&type=" + ddl_renttype.SelectedValue; Chart1.AxisX.Sections.Add(asec); } } but when I set the text for the AxisSection it appears on the LegendBox and I have not found any way to remove it, other than remove the asec.Text section but in doing that the tooltip just says "From 1 to 1". Is there anyway to remove the sections from the LegendBox or another way of changing the Tooltip Text? Quote Link to comment Share on other sites More sharing options...
CarlosAC Posted October 22, 2009 Report Share Posted October 22, 2009 Hi DustinW Chart FX will add the Axis Sections text automatically to the legend box. I have found a way to remove them, please check following code. LegendItemAttributes lia = new LegendItemAttributes(); <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> chart1.LegendBox.ItemAttributes[chart1.AxisX.Sections] = lia; lia.Visible = false; -- Pipon Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.