davidib Posted May 9, 2008 Report Share Posted May 9, 2008 Hi, I must be doing something stupid but I've spent the last 2-3 hours trying to get this to work to no avail and now I'm desperate All I want to do is add a custom text label to a certain point in my chart that has a single series. Per the code and comment below, some of the point specific methods/properties seem to to work, others do not. Is there any reason for this? Why would the Marker shape/size work so obviously/easily, but the color of the Marker not work at all? Thanks for any help you can provide David //my code snippet, try to label a point!!chart1.Points[0, 100].Color = System.Drawing.Color.Blue; //DOES NOT WORK no matter what color I choose chart1.Points[0, 1000].PointLabels.TextColor = System.Drawing. Color.Blue; //DOES WORK chart1.Points[0, 1000].PointLabels.Font = new Font("Arial", 10); //DOES WORK chart1.Points[0, 1000].PointLabels.Visible = true; //DOES WORK, shows the value of the data at that pointchart1.Points[0, 1000].MarkerShape = ChartFX.WinForms.MarkerShape.InvertedTriangle; //DOES WORK chart1.Points[0, 1000].MarkerSize = 10; //DOES WORKchart1.Points[0, 1000].Text = "XXX"; //DOES NOT WORK, (no matter where I place this stmt in the code) argh!!!!! > chart1.Refresh(); Quote Link to comment Share on other sites More sharing options...
JuanC Posted May 9, 2008 Report Share Posted May 9, 2008 >> About the Point Label You have to change what we display in the point label by using the chart.PointLabelMask property. You will probably be using %v to show the value and %L to show the text associated with the point. If I remember correctly you will want to use the Tag property, e.. chart1.Points[0,1000].Tag = "XYZ" >> About the Point Color not working What gallery type are you using? I noticed the index used for all other Point attributes was 1000 but the one used for the Color was 100, was this on purpose? Regards, JuanC Quote Link to comment Share on other sites More sharing options...
davidib Posted May 9, 2008 Author Report Share Posted May 9, 2008 Hi Juan, thanks for the reply. I'll try it. Also I did incorrectly code '100' vs '1000'. After fixing the code, the market color worked properly. BTW I can't find any reference to the PointLabelMask property. I have the printed manual, the online help and a local help file. If I do a search for PointLabelMask in the online help, I don't get any hits. Reason I mention this is that while I think ChartFX is a great product, I get the sense that the only way to figure out how use ChartFX is to continually graze for a solution by trial and error, not a very efficient way to develop. Do you have any suggestions regarding the best way to get familiar with ChartFX? Thanks again for your reply. David Quote Link to comment Share on other sites More sharing options...
Frank Posted May 10, 2008 Report Share Posted May 10, 2008 About PointLabelMask: You are posting in the Chart FX for .NET 6.2 Forum, however, looking carefully at your code I noticed you are using Chart FX 7. The property you are looking for (in Chart FX 7) is: chart.AllSeries.PointLabels.Format This property is documented (http://support.softwarefx.com/OnlineDoc/CfxNet70//WinAPI/PointLabelAttributes_Format.htm). It is not that hard to find.. The PointLabelAttributes class only has about a dozen properties. Like with any complex product, finding exactly what you are looking for takes a little reading. 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.