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
1825
Format Tooltip
posted

Hi Guys!

Follwoing problem:

I habe a series with datetime and I want to format the tooltip to show the date (without time) and the data.

So I use

   .Tooltips.FormatString ="<SERIES_LABEL:dd.MM.yyyy> - <DATA_VALUE:#,000> TEU"

but this has no effect. For the SEIRES_LABEL the same code is working

 

 

 

Parents
  • 53790
    Verified Answer
    posted

    Hello polfi,

    There are different approaches to solve this task, but the solution depend of your concrete scenario, chart type, series type, datasource. I made small sample  for you where I`m using the settings below together with

    ultraChart1.Tooltips.Format =TooltipStyle.Custom;

    void ultraChart1_DataItemOver(object sender, Infragistics.UltraChart.Shared.Events.ChartDataEventArgs e)

    {

      object[] item = e.Primitive.Value as object[];

      if(item != null)

     {

       ultraChart1.Tooltips.FormatString = "My Series <SERIES_LABEL>" + Environment.NewLine + "Axis Y = <ITEM_LABEL> : Axis X = " + String.Format("{0:dd/MM/yyyy}", Convert.ToDateTime(item[0]).Date);

     }

    }

    Please take a look at the attached sample and video file for more details and let me know if you have any questions.

    Regards

Reply Children