Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
314
Wrap the text in the legend
posted

 Hi,

Is there a way to wrap the text in the legend? 

Parents
No Data
Reply
  • 26458
    Verified Answer
    Offline posted

    Nothing out of the box, but you can implement IRenderLabel to modify the legend items' text.

    Hashtable
    labels = new Hashtable();
    labels.Add(
    "LABELS", new Labels());
    this.ultraChart1.LabelHash = labels;
    this.ultraChart1.Legend.FormatString = "<LABELS>";

    public class Labels : IRenderLabel
    {
       public string ToString(Hashtable context)
       {
          string text = (string)context["ITEM_LABEL"];
          if (text.Length > 10)
          {
             text=text.Insert(10,
    "\n");
          }
          return text;
       }
    }

Children