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 =
That did the trick! Thank you very much.
Now if I can just figure out how to change the color ... I can do this for 2D but can't get it to work with 3D.
I'm using:
e.Primitive.PE.Fill and e.Primitive.PE.FillStopColor
Any ideas?