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 1143 - Long strings in the legend
Summary: Long strings in the legend
Status: CONFIRMED
Alias: None
Product: Java TeeChart
Classification: Unclassified
Component: Legend (show other bugs)
Version: 3.2015.0108
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-18 05:29 EST by yeray alonso
Modified: 2015-02-18 05:53 EST (History)
0 users

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:29:45 EST
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.getChart());
        bar1.fillSampleValues();
        for (int i=0; i<bar1.getCount(); i++) {
            if (i==2)
                //bar1.getLabels().setString(i, "This is a really really looooooooong string for the point index " + i);
                //bar1.getLabels().setString(i, "This is a really really looooooooong string for the point index " + i + ". This is so long because we want to test long strings in the legend");
                bar1.getLabels().setString(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.getLabels().setString(i, "Point Index " + i);
        }
        
        tChart1.getLegend().setAlignment(LegendAlignment.BOTTOM);

The LegendScrollBar isn't yet in Java:
http://bugs.teechart.net/show_bug.cgi?id=1142
However, this tool doesn't fix it for VCL.

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 (when implemented), or we could multiline the legend.
Comment 1 yeray alonso 2015-02-18 05:53:28 EST
Also added for VCL:
http://bugs.teechart.net/show_bug.cgi?id=1144

And for .NET:
http://bugs.teechart.net/show_bug.cgi?id=1145