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
45
Problem in creating custom Labels using IRenderLabel
posted

Hey Guys,

i am trying to create custom labels using IRenderLabel. i have created a class that implements IRenderLabel but my code doesn't call the ToString(Hashtable context) method. Here is my code.

 

public class PerformanceLabels:IRenderLabel
{
    public PerformanceLabels()
    {
        //
        // TODO: Add constructor logic here
        //
    }

    public string ToString(Hashtable context)
    {
        string label = "";
        double dataValue = (double)context["DATA_VALUE"];

        //DateTime datetime = DateTime.FromOADate(dataValue);
        label = dataValue.ToString();
        return label;

    }

}

 

and in Graph i am doing this work.

UltraChart1.Axis.X.Labels.ItemFormatString = "<MY_VALUE>";
        Hashtable MyLabelHashTable = new Hashtable();
        MyLabelHashTable.Add("MY_VALUE", new PerformanceLabels());
        UltraChart1.LabelHash = MyLabelHashTable;

 

Urgent Help needed.

Parents Reply Children
No Data