Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi.

 

I have a little problem here, and I don't know how to resolve it.

 

I have a chart for display some data, and a label for displaying the average values for that chart.

 

My chart has �let�s say 3 columns.

 

value 1 (10) value 2 (15) value 3 (6)

 

the label average for this chart is : (10+15+6) / 3 = 10.3

 

But, my chart is dynamically created, and don�t know if I will receive the all values for the chart and in some cases I will receive just 1 value in my chart, like this:

 

Value 1 (10) nothing nothing

 

Of course my average value will be 10 / 3 and this is not good J

 

My question is how is possible to know in a chart which columns has values for calculate the average by this.

 

Thanks a lot

Posted

done.... and yes ..It was easy.

 

I made a function for monitoring the values, which are making the chart. In that function I put a counter who decrease for each "0" values in my values, and I made the average values by that counter.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

×
×
  • Create New...