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
865
Last column label missing from WinChart
posted

I've recently upgraded from 7.1 to 9.1 and for some reason I have to create a dummy column in order to display the label for the last x-axis column.

I also find my old code for displaying those labels at an angle and below the x-axis line no longer works and I can't display the labels in a slanted orientation on that axis without them riding above the x-axis line.

The custom orientation for the y-axis seems to continue working as desired without modification.

Any ideas?

This is the code I expect is responsible for any customization to the default behavior...note that I've commented out the custom orientation and orientationangle lines and replaced that with an orientation of VerticalLeftFacing which is less than optimal but which is nevertheless the only way I've found yet to keep those labels from riding into the graph area:

                //ultraChart1.Axis.X.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Custom;
                ultraChart1.Axis.X.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.VerticalLeftFacing;
                //flip the labels (the names for each colum of data that appear along the bottom) so the text is upside down
                //ultraChart1.Axis.X.Labels.Flip = true;
                        //ultraChart1.Axis.X.Labels.OrientationAngle = -135;
                ultraChart1.Axis.Y.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Custom;
                ultraChart1.Axis.Y.Labels.OrientationAngle = -45;
                Hashtable labelRenderers = new Hashtable();
                labelRenderers.Add("CUSTOM", new LabelRenderer());
                ultraChart1.LabelHash = labelRenderers;
                ultraChart1.Legend.FormatString = "<CUSTOM>";
                //increase distance between left side of chart and first column
                this.ultraChart1.Axis.X.Margin.Near.Value = System.Convert.ToDouble(3);
                //increase the distance between outside right edge of chart and last column of data
                this.ultraChart1.Axis.X.Margin.Far.Value = System.Convert.ToDouble(3);
                //bottom edge of chart separated from bottom row
                this.ultraChart1.Axis.Y.Margin.Near.Value = System.Convert.ToDouble(3);
                //distance between top edge of chart and top row of data increased
                this.ultraChart1.Axis.Y.Margin.Far.Value = System.Convert.ToDouble(3);

 

Thanks.

Allen