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.
Can Anyone take me out of this problem?
Have you tried:
UltraChart1.Axis.X.Labels.ItemFormat = AxisItemLabelFormat.Custom
?
-Graham