in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Multiline Tooltip with Multiple Data

Last post 03-28-2008 6:12 AM by pragati_sd. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 02-15-2008 4:13 AM

    Multiline Tooltip with Multiple Data

    Hello!! 

    Can anyone help to get tooltip with the values other that XVAL & YVAL, from the datasource chart is refering??Alongwith the co-ordinates of the point, I want to show some more info regarding it.

    Can I have multiline tooltip??

    Thanks in advance.

    Pragati

    Filed under:
  • 03-25-2008 3:05 PM In reply to

    Re: Multiline Tooltip with Multiple Data

    I cannot help answer your question; but I would like to reinforce your question since I am looking for the same thing.  I would like to know how to implement multi-line tooltips as well; but more importantly, I would like to know how to programmatically assign the tooltip text for each piece of chart data independantly.

     Anyone have any tips on this?

    --
    tomS.
  • 03-26-2008 8:22 PM In reply to

    Re: Multiline Tooltip with Multiple Data

    I haven't tried this using the properties dialog; but you can have a multi-line tooltip by using the \n character sequence to signify a newline.  I've done this programmatically and it works great (at least it does within IE6).

    --
    tomS.
  • 03-27-2008 12:57 AM In reply to

    Re: Multiline Tooltip with Multiple Data

    Hello tomshelley!!

    Can you please post those lines of code using the \n character sequence?

    Thanks in advance.

    Pragati 

     

     

     

  • 03-27-2008 12:56 PM In reply to

    Re: Multiline Tooltip with Multiple Data

    Sure thing.  I'm using C# and this example shows how to create a multiline tooltip when the user hovers over the chart area.

    // Get a reference to the map area you want the tooltip to be associated with
    MapArea _chartMap = webchart.ImageAreas.GetByName("ChartData");

    // set the tooltip message to whatever makes sense for your implementation
    // I've highlighted the newline characters in orange for clarity 

    _chartMap.Tooltip =
    string.Format("YTD Excellence {0}\nYTD Overall {1}\nFeb Excellence {2}\nFeb Overall {3}",
                                                       ytdExcellence.ToString("P"),
                                                       ytdOverall.ToString("P"),
                                                       monthlyExcellence.ToString("P"),
                                                       (monthlyOverall.ToString("P")
                                                      );

     

    Please note that the newline escape character in VB.Net is quite probably different than in C#.  Unfortunately, I don't know what the character is; but I would try what I've outlined first.  Also, this example uses the string.format function to make a string containing variable information; but this could have been done just as easily without it.

    --
    tomS.
    Filed under: ,
  • 03-28-2008 6:12 AM In reply to

    Re: Multiline Tooltip with Multiple Data

    Hello tomshelley!!

    Thanks for ur quick reply.

    As u said the newline escape character in VB.Net is quite probably different than in C#. That's why it is getting the '\n' as string itself. Still, I too hv not got that character. When get, will definitelly post it again, if u come across any solution plz do reply.

    Pragati 

     

     

Page 1 of 1 (6 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.