1

enter image description hereBy using ColorBand tool I am scoping the axis to chart, so separate chart area is assigned to that axis and signal, but when cursor is enabled then cursor is not visible for whole chart(refer attached image) and axis titles are overlapped with each other(refer attached image).

Dictionary<int, AxisScope> list = new Dictionary<int, AxisScope>();
                    foreach (AxisScope axis in this.Chart.Axes.Custom)
                    {
                        axis.Visible = axis.Scope;
                        totalWeight += axis.Weight;
                        while (list.Keys.Contains(axis.Ordinal))
                            axis.ordinal++;
                        list.Add(axis.Ordinal, axis);
                    }
                    int ord = 0;
                    double start = 0;
                    int pos = 0;
                    int[] array = list.Keys.ToArray();
                    Array.Sort(array);
                    foreach (int i in array)
                    {
                        AxisScope scope = list[i];
                        scope.Ordinal = ord++;
                        if (scope.Scope && scope.Weight > 0)
                        {
                            if (scope.AxisColorBackground == null)
                                scope.AxisColorBackground = new ColorBand(this.Chart);

                            this.Chart.Tools.Add(scope.AxisColorBackground);
                            scope.AxisColorBackground.Axis = scope;

                            Color pen = Color.DarkRed;
                            Color back = Color.FromArgb(253, 253, 233);
                            if ((pos++ % 2) == 0)
                            {
                                pen = Color.DarkBlue;
                                back = Color.FromArgb(233, 253, 253);
                            }
                            scope.StartPosition = start;
                            start += (scope.Weight / totalWeight) * 100;
                            scope.EndPosition = start;
                            scope.AxisPen.Color = pen;
                            scope.AxisColorBackground.Pen.Color = back;
                            scope.AxisColorBackground.Brush.Color = back;
                            scope.AxisColorBackground.Brush.Transparency = 33;
                            scope.AxisColorBackground.Transparency = 33;
                            scope.AxisColorBackground.Start = double.MinValue;// scope.Minimum;
                            scope.AxisColorBackground.End = double.MaxValue;// scope.Maximum;
                            scope.AxisColorBackground.ResizeEnd = false;
                            scope.AxisColorBackground.ResizeStart = false;
                            scope.AxisColorBackground.Tag = "Axis -" + scope.Title.ToString();
                            scope.AxisColorBackground.Active = true;
                        }
                        else if (scope.Scope && scope.Weight == 0)
                        {
                            scope.Visible = false;
                        }    
                    }

enter image description here

1 Answers1

0

Could you please produce a Minimal, Reproducible Example I could run here to immediately reproduce your problem? If you feel your code is too long to post here, maybe you could consider zipping up your Visual Studio project and posting it to Steema's upload page.