samiam1029 Posted August 26, 2009 Report Share Posted August 26, 2009 I formatted Y axis labels (they are numbers) with no decimals at all as follows. lChart.AxisY.LabelsFormat.Format = AxisFormat.Number;lChart.AxisY.LabelsFormat.Decimals = 0;However, I need to show point labels on the graph and I do that by this line of code. lChart.Series[0].PointLabels.Visible = true;The problem is that the point lables INHERIT the format from y axis format I set above. I want the point labels to show 1 decimal. How to do that? Thanks much. Quote Link to comment Share on other sites More sharing options...
juanZ Posted September 21, 2009 Report Share Posted September 21, 2009 Hi, please note the use of LabelsFormat and DataFormat in the Axis Y. chart1.Data.Series = 1; chart1.Data.Points = 3; chart1.Gallery = ChartFX.WinForms.Gallery.Bar; chart1.AxisY.LabelsFormat.Format = AxisFormat.Number; chart1.AxisY.LabelsFormat.Decimals = 0; chart1.AxisY.DataFormat.Decimals = 1; chart1.AxisY.Min = 0; chart1.AxisY.Max = 4; chart1.Data[0, 0] = 1.5; chart1.Data[0, 1] = 2.5; chart1.Data[0, 2] = 3.5; chart1.Series[0].PointLabels.Visible = true; chart1.Series[0].PointLabels.Format = "%v"; Copy paste this into your load method. 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.