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
1004
IRenderLabel didnt work (asp.net mvc)
posted

I try to implement IRenderLabel Interface for Column Chart but it didnt work (LabelRenderer ist not call):

    public class LabelRenderer : IRenderLabel
    {
        /// <summary>
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public string ToString(Hashtable context)
        {
            string resultString = string.Empty;
            double dataValue = (double)context["DATA_VALUE"];
            int dataValueModulo = 0;

            if(dataValue >= 1000000000 )
            {
                dataValueModulo =(int)dataValue % 1000000000;
                resultString = dataValueModulo.ToString() + "Mrd.";
            }

            return resultString;
        }
    }

---------------------

            ToRenderColumnChart.Axis.Y.Labels.ItemFormatString = "<DATA_VALUE:n0>";
            Hashtable LabelHashTable = new Hashtable();
            LabelHashTable.Add("DATA_VALUE", new LabelRenderer());
            ToRenderColumnChart.LabelHash = LabelHashTable;

Please Help me, asp.

Thank you very much