![]() | Steema Issues DatabaseNote: 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. |
| Summary: | Legends with many items not behaving correctly when being resized or when horizontally aligned | ||
|---|---|---|---|
| Product: | .NET TeeChart | Reporter: | Shantanu <behera.shantanu6> |
| Component: | Legend | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED NOTABUG | ||
| Severity: | critical | CC: | chris |
| Priority: | --- | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
| Attachments: | Sample example for Legend invisible Items | ||
This is an issue with the changing of the Legend text by the cursor tool. The correct way of doing this is as follows:
tChart1.Resize += tChart1_Resize;
private double xval;
private void ChangeLegendText(double xValue)
{
if (!_isLoaded)
return;
xval = xValue;
for (int i = 0; i < tChart1.Series.Count; i++)
{
if (tChart1.Series[i].Active)
{
if (tChart1.Series[i] is Steema.TeeChart.Styles.Custom)
{
string legendText = tChart1.Series[i].Title + ": " + InterpolateLineSeries(tChart1.Series[i] as Steema.TeeChart.Styles.Custom, xval).ToString("0.00");
tChart1.Legend.Items[i].Text = legendText;
}
}
}
}
void tChart1_Resize(object sender, EventArgs e)
{
ChangeLegendText(xval);
}
private void cursorTool1_Change(object sender, Steema.TeeChart.Tools.CursorChangeEventArgs e)
{
ChangeLegendText(e.XValue);
}
|
Created attachment 390 [details] Sample example for Legend invisible Items Hi, If legend has many items, then the invisible items are not updating text when window resized or Legend aligned horizontally (top/bottom). Can you look into this? More Info: What TeeChart version are you using? -- TeeChart for .NET 2012 (4.1.2012.09280) What IDE are you using? -- Visual Studio 2013 What language are you programming with? -- C# What exact OS are you running? -- Windows 7 (32 bit) Thanks Shantanu