Page 1 of 1

Marks on bar series

Posted: Fri Jul 31, 2020 8:47 am
by 15688831
Hi All,

Recently we upgraded TeeChart from 2015 to 2020 version. We noticed following difference when showing marks on bar:
Before:
[img]https://ibb.co/9w83z8Z[/img]
After:
[img]https://ibb.co/tCJSbbM[/img]

New 'Tails' feature is configurable and can be switched-off. One more difference is lowered marks inside the bar.
Is it possible to get them to original position?

We use 'end' location of marks.

The workaround I found is:
- switch-off 'Marks on bar' property;
- set Marks->Arrow->Distance property to '-28'.
Doing so I got marks on similar position, but I wonder whether there is a 'legal' way to achieve it.

Thank you,
Taras

Re: Marks on bar series

Posted: Mon Aug 03, 2020 10:37 am
by Christopher
Hello!

How about:

Code: Select all

        Bar _bar = new Bar();
        
        private void InitializeChart()
        {
            _tChart.Series.Add(_bar);
            _bar.FillSampleValues();

            _bar.Marks.TailStyle = MarksTail.None;
            _bar.MarksOnBar = true;
        }
which gives me:
TeeChartPro_2020-08-03_12-36-23.png
TeeChartPro_2020-08-03_12-36-23.png (11.84 KiB) Viewed 13448 times

Re: Marks on bar series

Posted: Wed Aug 05, 2020 7:05 am
by 15688831
Hi Christopher,

Thanks for your reply.

Indeed, found that property to remove tails. Screenshots were made earlier.

Is it possible to also place marks a bit higher within the bar?

At this sample it's not a big deal, but in our case marks have multiple lines and get cut when bar is almost 0 height.

Regards,
Taras

Re: Marks on bar series

Posted: Wed Aug 05, 2020 8:13 am
by Christopher
Hello,

if you're not entirely happy with the position at which 'MarksOnBar' leaves the SeriesMarks, you can turn it off and modify their position using ArrowLength, e.g.

Code: Select all

        Bar _bar = new Bar();
        
        private void InitializeChart()
        {
            _tChart.Series.Add(_bar);

            _bar.FillSampleValues();

            _bar.Marks.ArrowLength = -10;

            _bar.Marks.TailStyle = MarksTail.None;
            //_bar.MarksOnBar = true;
        }
TeeChartPro_2020-08-05_10-11-02.png
TeeChartPro_2020-08-05_10-11-02.png (10.94 KiB) Viewed 13406 times

Re: Marks on bar series

Posted: Wed Aug 05, 2020 1:36 pm
by 15688831
I see.
That was the workaround i found.

Thanks

Re: Marks on bar series

Posted: Wed Aug 05, 2020 1:47 pm
by Christopher
15688831 wrote:
Wed Aug 05, 2020 1:36 pm
I see.
That was the workaround i found.
Ah, sorry, I must have misread your first message and missed your reference to Marks.ArrowLength! Either way, although the negative numbers may look a little strange, this is the most 'legal' way I can find to modify the position of SeriesMarks when Marks.AutoPosition is true.