Jump to content

#XVAL shows data index (integer) instead of string of an array

so yeah, i have attached the full code.

I just want to know why #XVAL shows the index (from 0 to 3 since there is 4 items in there) instead of ex:"< .50%" and so on.

 

ive tried #axislabel and it doesnt work

 

Thanks in advance

 

C1Chart2.txt

C1Chart2.png

Link to comment
Share on other sites

Link to post
Share on other sites

So, I have no idea how this code works - but #YVAL has a ":0.00%" next to it and XVAL doesn't. Could that be the issue?

Web Developer and Java contractor

Link to comment
Share on other sites

Link to post
Share on other sites

On 14/4/2018 at 7:10 AM, programmer said:

So, I have no idea how this code works - but #YVAL has a ":0.00%" next to it and XVAL doesn't. Could that be the issue?

nope the ":0.00%" is a formatting keyword that reserved in visual studio. That means im changing Y VAL from double to 0.00 percent and add "%" as a string.

Link to comment
Share on other sites

Link to post
Share on other sites

#XVAL (I assume) is a number, and your x-axis labels are strings. If you want the tooltip to display the string label, you need to use the #XVAL to pull the right x-axis label, something like this:

ds.TooltipText = "Series = {#TEXT}" + ControlChars.Cr + ControlChars.Lf + "X = {items(#XVAL).ToString()}" + ControlChars.Cr + ControlChars.Lf + "Y = {#YVAL:0.00%}"

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×