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
245
Add line to chart at a specific value on X-axis
posted

I would like to add a line on the X-axis of a 3D chart.

I currently have it placing the line in the middle of the chart.

How do I place the line where the value of X-axis is equal to "04/20/2009" (today's date).

The values in the X-axis are strings and not dates.

 

private void DeptChart_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e)

        {

 

            ILayer chartLayer = e.ChartCore.GetChartLayer();

            if (chartLayer != null)

            {

                Rectangle bounds = chartLayer.OuterBound;

                Line line = new Line(new Point(bounds.Width / 2, bounds.Bottom), new Point(bounds.Width / 2, bounds.Top));

                line.PE.Stroke = Color.Red;

                e.SceneGraph.Add(line);

            }

 

        }

 

Parents Reply Children
No Data