dolgorae Posted July 14, 2010 Report Share Posted July 14, 2010 Hello. My chart shows double data type values, but the tooltips show integer type value. How can I show the orignal double type values to each tooltips? Thanks. Alex. Quote Link to comment Share on other sites More sharing options...
RandyJ Posted July 30, 2010 Report Share Posted July 30, 2010 Hi, If you want to show the original double type value (without specifying a fixed number of decimals), you can use the GetTip Event to create a custom tooltip. Take a look at the following sample:private void chart1_GetTip(object sender, GetTipEventArgs e){ if (e.HitType == HitType.Point) { e.Text = chart1.Data[0, e.Point].ToString(); }} Alternatively, you can use the DataFormat property to specify the number of decimals: chart1.AxisY.DataFormat.Decimals = 2; Note: Using the DataFormat property will also specify the number of decimals for the pointlabels. Hope this helps, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.