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 976

Summary: The title is affected on chart size
Product: Java TeeChart Reporter: alex
Component: ChartAssignee: Steema Issue Manager <issuemanager>
Status: CONFIRMED ---    
Severity: enhancement CC: marc, sandra
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: screenshot

Description alex 2014-10-22 11:43:43 EDT
Created attachment 313 [details]
screenshot

If you add title with many rows then chart will be reduced (see the attached screenchot). Maybe we should add option that allows to paint title over the chart without reducing its size?
Comment 1 sandra pazos 2014-10-24 11:00:26 EDT
The code lines below reproduce the problem:

...

Points  line1 = new Points(tChart1.getChart()); 
line1.fillSampleValues(4);
line1.getLabels().setString(0, "ELAN Ejan SBi Capital Partners Fund Mangement Pte Ltd");
line1.getLabels().setString(1, "Cash");
line1.getLabels().setString(2, "(ZHAOXININV) SBI Zhaoxin Investment Management Limited");
line1.getLabels().setString(3,  "(SBIVC) SBIVen Capital Pte Ltd ");
tChart1.getAxes().getBottom().getLabels().setAngle(45);
tChart1.getHeader().setText("Chart Name"+"\n"+"Second row"+"\n"+"third row"+"\n"+"etc");

...
Comment 2 marc meumann 2014-10-30 08:09:50 EDT
Feature request noted.

Functionality currently provided via Custom Position feature:

eg.
chart1.getHeader().getFont().setSize(18);
chart1.getHeader().setCustomPosition(true);

//dyno font/positioning information after canvas is sized
chart1.addChartPaintListener( new ChartPaintAdapter() {
  public void axesPainting(ChartDrawEvent e) {
      int XCenter = chart1.getChart().getChartRect().width/2;
      int titleWidth =       
            chart1.getGraphics3D().textWidth(chart1.getHeader().getText());
      chart1.getHeader().setLeft(XCenter - (titleWidth/2));
      chart1.getHeader().setTop(100);                
    };
});