Jump to content
Software FX Community

When Value is Zero or NULL


User (Legacy)

Recommended Posts

Posted

Hi Francisco,

I just want to check regarding the status of this concern

http://mysupport.softwarefx.com/help/supporttool/History.aspx?IID=49715a6d-7339-4ef4-95ec-11436360e678

Incident ID: 29751

Here is my concern:

I have this table:

Label Value

Completed 0

In Progress 0

Not Started 0

I use databinding to fill my chart with data from this table. Now if all of

the values in the Value Column are zeroes or null, the chart will show a

chart similar to the attached file. It is a bar chart. I really don't have

problem with this one. However if I change it to a pie chart, the chart will

not be drawn (obviously) but the legend is still drawn because there are

values in the Label Column. My question is how will you know through code

that the chart has no data (meaning in this kind of situation) so I just

have to hide the chart??? Chart.Data.X.HasData is always set to False with

or without values. Chart.Poinst.Count or Chart.Series.Count is not

applicable.

I already thought of checking it before databinding, well it would be very

convenient if you have a property for this kind of situation. The

Chart.Data.X.Hasdata could do the trick(but it's always set to false, may I

know why?). Or you could have the Chart.Series(0).HasData would be better

since it could check if there are values for each series. Would you?

Mr. Manuel Milan replied:

The HasData property is set to false because you are binding the data rather

than using the Chart FX API to pass the data. When you use the API to set

the points this is automaticaly set to true. I will submit this as a feature

request.

Regards,

Raymond Dazo

Interprise Solutions Team

Posted

This chart has data, what it doesn't have is a scale and that's why it is 

not showing.

Your Y-Axis Min and Y-Axis Max are both zero (0), so to check for this

condition check:

if (chart.axisY.Min == chart.AxisY.Max)

// Chart has no scale and is not being drawn.

--

Francisco Padron

www.chartfx.com

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...