Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2086 - Custom legend text disappears when the Chart Margins are changed
Summary: Custom legend text disappears when the Chart Margins are changed
Status: RESOLVED NOTABUG
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Legend (show other bugs)
Version: unspecified
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://teechart.net/directline/viewto...
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-14 11:56 EDT by sandra pazos
Modified: 2018-09-24 03:49 EDT (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments
Show Legend problem (525.66 KB, image/gif)
2018-09-14 11:56 EDT, sandra pazos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sandra pazos 2018-09-14 11:56:55 EDT
Created attachment 855 [details]
Show Legend problem

Custom legend text disappears when the Chart Margins are changed. The code below reproduce the problem:
public Form1()
	{
		InitializeComponent();

		//Add a fast line series
		FastLine fastline1 = new FastLine(tChart1.Chart);
			//Set some random values

			fastline1.FillSampleValues(10);
			tChart1.Legend.Transparent = false;
			tChart1.Legend.Pen.Visible = true;
			tChart1.DoubleClick += TChart1_DoubleClick;
	}

	private void TChart1_DoubleClick(object sender, EventArgs e)
	{
			tChart1.ShowEditor();
	}

	private void button1_Click(object sender, EventArgs e)
	{
			tChart1.Panel.MarginRight = 6;
			tChart1.Legend.CustomPosition = true;
			tChart1.Legend.Left = tChart1.Legend.Left;
		  tChart1.Legend.Top = tChart1.Legend.Top;
		}

Also, I have done a video to show exactly the problem.
Comment 1 christopher ireland 2018-09-24 03:49:33 EDT
This is by design and so not a bug. To change the behaviour of the chart please set the ClipText property to false, e.g.

		private void button1_Click(object sender, EventArgs e)
		{
			tChart1.Panel.MarginRight = 20;

			tChart1.Legend.ClipText = false;
			tChart1.Legend.CustomPosition = true;
			tChart1.Legend.Left = tChart1.Legend.Left;
			tChart1.Legend.Top = tChart1.Legend.Top;
		}