Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
280
2D Stacked columns + ThreeDEffect error plotting "0" values
posted

Hi, I'm using a 2DStackedColumn chart with the ThreeDEffect. All is ok except when a value is equal to "0", the corresponding stacked zone drawed over the "0" line (just over X axis).

See in the sample, on second day, blue zone. If ThreeDEffect not applied the blue zone isn't drawed.

I try modify this zone with FillSceneGraph event (is a box with Path="Border.Title.Grid.Chart"), but the ThreeDEffect is always visible.

Is there any solution for this issue?

Thanks in advanded

Parents
  • 26458
    Verified Answer
    Offline posted

    This does appear to be a bug. Here's how you can work around it:

    private void ultraChart1_FillSceneGraph(object sender, FillSceneGraphEventArgs e)
    {
        for (int i = 0; i < e.SceneGraph.Count; i++)
        {
            Box box = e.SceneGraph[i] as Box;
            if (box != null && box.Path == "Border.Title.Grid.Chart" && Convert.ToDouble(box.Value) == 0.0)
            {
                Polygon effect = e.SceneGraph[i - 1] as Polygon;
                if (effect != null) effect.Visible = false;
            }
        }
    }

    Basically, you want to find the box that has a zero value and make its 3d effect, which is a polygon that renders just before the box, invisible.

Reply Children
No Data