Jump to content
Software FX Community

Point Labels in Scatter


Recommended Posts


I have an XY Plot chart.  My data looks like this:

X Y Label
.5 .7 MARKET 1
.9 .2 MARKET 2
.1 .3 MARKET 3


What I am attempting to create is a scatter plot where the point labels are equal to the Label column.  I don't want to manually set each point's label by intercepting GetPointLabel or something - I bind to a DataSource.  I have tried setting the Label column's DataType to DataType.Label or DataType.KeyLegend and using the PointLabelMask property, like so:

ChartControl.DataType[1] = DataType.Label;
ChartControl.DataType[4] = DataType.Value;
ChartControl.DataType[7] = DataType.XValue;

However, that changes the X-Axis to show labels:

 Posted Image















What I want is for it to show X-Values.  Is it possible to automatically set the Tag of each point to be a column in the DataSource?  Is there something I am missing?  It seems like I am making this way too hard.

Link to comment
Share on other sites

If you don't want to affect the X-Axis labels then you should NOT use DataType.Label.

You are in the right path with the Tag property. This is what you need to use. The Tag property can not be bound to a column. You will have to write a little bit of code that goes through the Dataset and assigns the Tag property.

Link to comment
Share on other sites


Thanks for the quick response.  I ended up having to use the GetPointLabel event after all - I just set the e.Label to the appropriate value.  I have a question about that, however:

In the PointAttributesCollection ChartCore.Point, is the order of these points the same as the order of the rows in the bound DataSource?

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...