Jump to content
Software FX Community

Facing problem while showing tooltip for ChartFx bar chart, Value concatenating along with the legends


Recommended Posts


We are using the Chat Fx control in our dot net windows application. We are showing tooltip for the bar chart by using Chart Series, LabelString and GraphValue. Tooltip is showing like this

Question no # 5A1But now as the scope of project increases we need to add another value (Exp:- Need to show percentage[100%] value along with all above value) into tooltip, So when we concatenating the percentage value along with the LabelString property value. Percentages are visible properly in tooltip that is

Question no # 5A100%1But the problem is percentages are concatenating along with the legends also. How to avoid this problem?Please let me know.



Link to comment
Share on other sites

Hi, ChartFX has the ToolTipFormat property, that allows you to control the information to be displayed in the tooltip.

Variables can be accessed using the % following the variable you want to include:

l Shows X-Axis Legend.

k Shows X-Axis Key Legend.

s Shows Series Legend.

S Shows the Series Index.

x Shows XValue (XY charts, when they were set with X values).

i Shows IniValues (Gantt).

v Shows Data Value.

v <n> For types that require more than one series, these are replaced by the value of each one. (n represents an index).

t Series Total (Sum of all points in this series).

p Percentage of total this point represents (Pie).

T Point Total (Sum of all series for this point).

P Percentage of total this series represents (Used in stacked charts).

X displays the marker X value for any chart type including those that do not support X values such as bar.

N Shows the index for the point.

L Shows the Text property of the Point object.


Please try the following sample code:

string maskString = "My percentage is: "+"%P " + "and my value is: " + "%v";

chart1.ToolTipFormat = maskString;

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