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
375
Item Label Not Visible in Composite Chart's Tooltip
posted

I am using Infragistics4.WebUI.UltraWebChart.v11.2

I am using a composite chart

I want both the x and y values to be displayed in the tooltip.
Y Axis is of type Numeric
X Axis is of type Time

Following is the code that I am using.

ultraChart.Tooltips.Format = Infragistics.UltraChart.Shared.Styles.TooltipStyle.Custom;
ultraChart.Tooltips.FormatString = "<DATA_VALUE:0.##> @ <ITEM_LABEL>";

Ideally following is the output that I want to see
1093.22 @ 04/08
i.e. (y axis value @ x axis value).


But the above code gives only the y axis value i.e. (1093.22 @)

Please Help ASAP.


Thanks,
Utkarsh Bandekar




Parents
No Data
Reply
  • 375
    posted

    Problem Solved..


    I used the following


    class CustomToolTips : IRenderLabel
    {
        public string ToString(System.Collections.Hashtable context)
        {
            return context["DATA_VALUE"].ToString() + "@" + ((System.DateTime)context["TIME_VALUE"]).ToString("MM/dd/yyyy HH:mm:ss");
        }
    }

    Hashtable myHashTable = new Hashtable();
    myHashTable.Add("MyLabel", new CustomToolTips());
    ultraChart.LabelHash = myHashTable;

    ultraChart.Tooltips.Format = Infragistics.UltraChart.Shared.Styles.TooltipStyle.Custom;
    ultraChart.Tooltips.FormatString = "<MyLabel>";

Children
No Data