Page 1 of 1

Series Marks are shown partially if they contain two lines

Posted: Tue Jun 04, 2013 10:36 am
by 15664347
Dear,

I have an issue when I add more than one line of text to the series marks.
As you can see in the screenshot, part of the series mark is cut off.

The code I wrote to get this chart is the following:

Code: Select all

        void barSeries1_GetSeriesMark(Steema.TeeChart.Styles.Series series, Steema.TeeChart.Styles.GetSeriesMarkEventArgs e) 
        { 
            e.MarkText = "SERIES MARK";
            e.MarkText = "SERIES MARK\n Second line: " + e.ValueIndex;
        }

        public Form1()
        {
            InitializeComponent();

            tChart1.Axes.Left.Automatic = true;
            tChart1.Aspect.View3D = false;
            tChart1.Legend.Visible = false;

            Steema.TeeChart.Styles.Line line = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            line.FillSampleValues(10);

            line.GetSeriesMark += new Steema.TeeChart.Styles.Series.GetSeriesMarkEventHandler(barSeries1_GetSeriesMark);

            line.Marks.Visible = true;

        }

Re: Series Marks are shown partially if they contain two lines

Posted: Tue Jun 04, 2013 3:29 pm
by 10050769
Hello OMP,

I recommend you set Clip of Marks to false as do in next line of code:

Code: Select all

 Series1.Marks.Clip = true; 
Could you tell us if my suggestion help you to achieve as you want?

Thanks,

Re: Series Marks are shown partially if they contain two lines

Posted: Fri Jun 07, 2013 8:56 am
by 15664347
If I set the Clip property to false, I don't see a label at all for my highest point, as you can see in the screenshot at point number 6.
I want to make sure that my labels are visible all the time.
If you change the chart to 3D, the label is visible. It is shown a little bit 'above' the chart, but if you switch to 2D, the label is not shown.

What can I do to have the label shown in all cases.

Thanks in advance,
Marijke

Re: Series Marks are shown partially if they contain two lines

Posted: Fri Jun 07, 2013 11:20 am
by 10050769
Hello OMP,

In your case, my recommendation is that uses Clip Marks property as false and increase the TopMargin, using next lines of code:

Code: Select all

Series1.Marks.Clip = false;
            tChart1.Panel.MarginTop = 7; 
Could you tell us if previous code help you to solve your problem?

Thanks,

Re: Series Marks are shown partially if they contain two lines

Posted: Mon Jun 10, 2013 6:42 am
by 15664347
This has solved our problem.

Thank you very much,
Marijke

Re: Series Marks are shown partially if they contain two lines

Posted: Mon Jun 10, 2013 10:56 am
by 10050769
Hello Marijke,

I am glad that you can solve the problem :)

Thanks,