User Defined Legend Name

2 posts, 0 answers
  1. Amitkumar
    Amitkumar avatar
    66 posts
    Member since:
    Aug 2009

    Posted 20 Apr 2012 Link to this post

    HI
    I want to Change Legend in my graph.
    Currenty legend comming is Item0, I want to dispaly some differant name like(Amit-Prajapati-Immidate) But Not  Yaxis,Or X Asix.

    here I attached my Screen.
  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 25 Apr 2012 Link to this post

    Hi Amit,

    I guess that you have set the LegendDisplayMode of the series definition to DataPointLabel. You need to also add a new ItemMapping that maps a property of the underlying object to the label of the legend:
    <telerik:SeriesMapping>
     <telerik:SeriesMapping.SeriesDefinition>
      <telerik:BarSeriesDefinition LegendDisplayMode="DataPointLabel"  />                              
     </telerik:SeriesMapping.SeriesDefinition>
     <telerik:ItemMapping DataPointMember="LegendLabel" FieldName="Name" />
     

    Regards,
    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
Back to Top