Marks on bar series

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
15688831
Newbie
Newbie
Posts: 4
Joined: Wed Jun 03, 2020 12:00 am

Marks on bar series

Post by 15688831 » Fri Jul 31, 2020 8:47 am

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

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Marks on bar series

Post by Christopher » Mon Aug 03, 2020 10:37 am

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 13529 times
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

15688831
Newbie
Newbie
Posts: 4
Joined: Wed Jun 03, 2020 12:00 am

Re: Marks on bar series

Post by 15688831 » Wed Aug 05, 2020 7:05 am

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

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Marks on bar series

Post by Christopher » Wed Aug 05, 2020 8:13 am

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 13487 times
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

15688831
Newbie
Newbie
Posts: 4
Joined: Wed Jun 03, 2020 12:00 am

Re: Marks on bar series

Post by 15688831 » Wed Aug 05, 2020 1:36 pm

I see.
That was the workaround i found.

Thanks

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Marks on bar series

Post by Christopher » Wed Aug 05, 2020 1:47 pm

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.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply