Page 1 of 1

Histogram drawing bug

Posted: Tue May 23, 2017 10:28 am
by 15680746
Hello!

Sometimes right border in histogram series are not drawing correctly. Please try attached sample: left and top borders of the bars are Ok, but right borders are absent. If you comment line "series.UseYOrigin = true" right border will appear. Or you can move histogram up via right mouse button - right border will also appear.

I am using TChart version 4.1.2017.03140.

Re: Histogram drawing bug

Posted: Tue May 23, 2017 5:20 pm
by Christopher
Hello,

Thank you for reporting this one, I have added it to our issue tracker with id=1872 and a fix to it will be considered for inclusion into the next maintenance release. In the meantime the workaround is to ensure that the value for YOrigin (in the case that UseYOrigin = true) is greater than the Y/left axis, e.g.

Code: Select all

        public MainWindow()
        {
            InitializeComponent();

            MyTChart.Width = 400;
            MyTChart.Height = 300;
            MyTChart.Aspect.UseGuidelines = true;
            MyTChart.Axes.Left.AutomaticMinimum = false;
            int min = 1;

            MyTChart.Axes.Left.Minimum = min;

            series = new Histogram();
            series.UseYOrigin = false;
            series.YOrigin = min;
            series.Add(0);
            series.Add(10);
            series.Add(0);
            series.Add(10);
            series.Add(0);

            MyTChart.Series.Add(series);
        }

        public Histogram series;