Hello,
I have a Pyramid Chart and a Funnel Chart that both have the same problem. When I assign the FormatString for the Label to be a custom IRenderLabel format, the "Percent_Value" is not available in the Context HashTable. However, if I put in the standard "<PERCENT_VALUE>" instead of using my custom IRenderLabel code a Percent value is available. How can I get access to the Percent_Value while using a custom IRenderLabel?
Best Regards,
Kevin
Thanks David,
I retested with a simplier setup for my IRenderLabel and you are right, it does work. I just got confused with some other IRenderLabel calls and the fact that my labels were being covered up by my legend. Thank you very much for helping me resolve this issue.
this worked okay for me... does it work for you?
public partial class _Default : System.Web.UI.Page, IRenderLabel{ protected void Page_Load(object sender, EventArgs e) { this.UltraChart1.ChartType = ChartType.FunnelChart; this.UltraChart1.Data.DataSource = Infragistics.UltraChart.Data.DemoTable.AllPositive(); this.UltraChart1.Data.DataBind(); Hashtable labelHash = new Hashtable(); labelHash.Add("MY_LABEL", this); this.UltraChart1.LabelHash = labelHash; this.UltraChart1.FunnelChart.Labels.FormatString = "<MY_LABEL>"; } string IRenderLabel.ToString(Hashtable context) { object o = context["PERCENT_VALUE"]; if (o == null) { return "nothing"; } return o.ToString(); }}