Jump to content
Software FX Community

Splitting point labels


DannE
 Share

Recommended Posts

It is possible to split a string and show it as a point label. Below is a code snippet showing this:

string myLabel = "Intra\nSector";

 Chart1.Point[0, 0].Tag = myLabel;

 Chart1.PointLabelMask = "%L";

 Chart1.PointLabels = true;

You can search the ChartFX Samples and Resource Center (Documentation installed with the product) for more information on the PointLabelMask property. Basically, you will need to retrieve the label from your dataset, to split it you can use the newline character (\n), and then assign it to the tag property. The %L is used to show the value of the tag property, respectively.

Link to comment
Share on other sites

That line should work as expected. I just tried it myself and it changed the legend for that series. Are you displaying the DataEditor or the SerLegBox? If not, please do so and you will see the changed text displayed. This is what I did:

Chart1.Series[0].Legend = "Series 1";

Chart1.SerLegBox = true;

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.

Guest
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.

 Share

×
×
  • Create New...