Legend item visibility

Thread is closed for posting
3 posts, 1 answers
  1. Saran kumar
    Saran kumar avatar
    58 posts
    Member since:
    Sep 2009

    Posted 24 Sep 2009 Link to this post

    hi mi having three tables with data sets binding for a three y axis bar chart in radchart. user has the control to select these three databind using check box i.e if the user checks two check boxes out of three one series should be made invisible from other two series. this works fine with the following code. but the issue is if i make series[0] visible false, the legend associated with that is still displaying. i want that also to be suppressed with the above scenario. please help...

    Chart display in asp.net with three series


    <div style="margin:10px 10px 10px 10px;">

         <telerik:RadChart ID="RadChart1" runat="server" Height="333px" Skin="Hay" UseSession="true"  Legend-Visible="true"

                Width="700px"  AutoLayout="True"

                    AutoTextWrap="True" SeriesOrientation="Vertical">


                      <telerik:ChartSeries Name="QUALIFIED_COUNT" Type="Bar"  DataYColumn="QUALIFIED_COUNT" Appearance-BarWidthPercent="30">


                      <telerik:ChartSeries Name="NONQUALIFIED_COUNT" Type="Bar" DataYColumn="NONQUALIFIED_COUNT" Appearance-BarWidthPercent="30" >


                      <telerik:ChartSeries Name="ABANDONED_COUNT" Type="Bar" DataYColumn="ABANDON_COUNT" Appearance-BarWidthPercent="30" >




                    <XAxis DataLabelsColumn="creation_month">


                    <YAxis Appearance-ValueFormat="General"  LabelStep="10"></YAxis>




    C# code to make its visibility false:

    if (IncludeQualified == "N")  //when the check box is unchecked


                        RadChart1.Series[0].Visible = false; --the bar suppresses  but the legend still there

                        divQualifiedReport.Visible = false;                   




                        gvQualifiedReport.DataSource = dsReport.Tables[1];  --data binding in else



                    if (IncludeNonQualified == "N")

    this IncludeQualified will set as ‘N’ if I uncheck the relevant check box.



  2. Answer
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 24 Sep 2009 Link to this post

    Try this:
    RadChart1.Series[0].Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.Nothing; 
    Worked for my RadChart implementation :)
  3. Saran kumar
    Saran kumar avatar
    58 posts
    Member since:
    Sep 2009

    Posted 25 Sep 2009 Link to this post

    hi thanks a lot Schlurk, it works fine.... thanks again for your quick reaponce.....
Back to Top