I’m using a 3D Cylinder Column Chart. These charts are then used in creating a PDF by way of the Infragistics.Documents.Report object. Is it possible to display data values that are zero (0) as nothing, or as a different color? i.e. I don’t want a flat, round, red disk displayed when the value is zero (0).
You should handle the ChartDrawItem event and remove the drawing of anything that has to do with the 0 valued data points. Here's some sample code:
protected void UltraChart1_ChartDrawItem(object sender, Infragistics.UltraChart.Shared.Events.ChartDrawItemEventArgs e) { if (e.Primitive.Value != null) { Double val = (Double)e.Primitive.Value; if (val == 0) { e.Primitive.Visible = false; } } }
WARNING: This is very hacked together code, you'd probably want to handle exceptions and do a better check to make sure what you're dealing with is actually going to give you a Primitive.Value that is a double, but this should set you on the right track.
Good luck, and let me know how it goes.
Does not work for me.
I event tried the following.
protected
e)
{
)
//Double val = (Double)e.Primitive.Value;
// if (val == 0)
e.Primitive.Visible =
;
e.Primitive.Layer.Visible =
I'm not quite sure what you're trying to do with your code.
e.Primitive is probably already visible and e.Primitive.Layer is a reference to the container that holds the primitive and should be visible as well.
Can you describe what you want to do and what chart type you're using?
Columns that have 0 values are not showing on the piechart 3d.
i need them visible.
Unfortunately, there is no way to do that. Short of replacing zeroes with small fractions, I cannot think of any workaround.