Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# VS2010
Hi All,
 
How do you display values(plotted and corresponding values in the databasetable) of the point in a graph using Tooltip.
 
I have this so far:
chart1.DataSource = chartdata;
                      chart1.Series[0].YValueMembers = "LFDepartTemp";
                      chart1.Series[0].ToolTip = "Temp: #VALY{} C" ;
 
But that just shows the y-value. i want it to show addition information from my dataset. As an example look at this:
 

http://documentation.devexpress.com/#XtraCharts/CustomDocument3440[^]
 
but of course without using their product.
 
Thanks,
Nicole
Posted 28-Jun-12 22:09pm
nikki88752
Edited 1-Jul-12 23:58pm
v4
Comments
digimanus at 29-Jun-12 5:36am
   
does the tooltip not only work when moving the mouse over?
nikki88 at 29-Jun-12 5:42am
   
yes it shows when mouse cursor moves over a datapoint.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Try #VALX for getting x value & if it is not working try for #AXISLABEL.
  Permalink  
Comments
nikki88 at 29-Jun-12 7:49am
   
Thank you it works, but i also want to add another columns data to the tooltip, not JUST x values and y values.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi,
Try the below expression
Quote:
string toolTip = "title='{dataSetName}' dvalue='{value|0}'";

where dataSetname indicates the 3rd value and Value|0 indicated the y-Value
 
Thanks
Wall Stickers
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 304
1 Sergey Alexandrovich Kryukov 295
2 Shweta N Mishra 216
3 Maciej Los 210
4 PIEBALDconsult 184
0 OriginalGriff 7,630
1 Sergey Alexandrovich Kryukov 7,022
2 DamithSL 5,586
3 Manas Bhardwaj 4,946
4 Maciej Los 4,525


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 5 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100