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 1145 - Long strings in the legend
Summary: Long strings in the legend
Status: RESOLVED FIXED
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Legend (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-18 05:51 EST by yeray alonso
Modified: 2015-02-27 06:28 EST (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2015-02-18 05:51:52 EST
Same as Java B1143:
http://bugs.teechart.net/show_bug.cgi?id=1143
Same as VCL:
http://bugs.teechart.net/show_bug.cgi?id=1144

When we have a very string in a series point/title to be shown in the legend, the legend isn't shown:

            Bar bar1 = new Bar(tChart1.Chart);
            bar1.FillSampleValues();
            for (int i = 0; i < bar1.Count; i++)
            {
                if (i == 2)
                    bar1.Labels[i] = "This is a really really looooooooong string for the point index " + i + ". This is so long because we want to test how the chart looks when there are long strings in the legend";
                else
                    bar1.Labels[i] = "Point Index " + i;
            }

            tChart1.Legend.Alignment = LegendAlignments.Bottom;

Adding a LegendScrollBar doesn't fix it.

We could add a MaxWidth property. If the legend can't be drawn within this MaxWidth, the strings could be cut (with "..." at the end), we could automatically add a LegendScrollBar, or we could multiline the legend.