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 - The title is affected on chart size
Summary: The title is affected on chart size
Status: CONFIRMED
Alias: None
Product: Java TeeChart
Classification: Unclassified
Component: Chart (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-22 11:43 EDT by alex
Modified: 2014-10-30 08:09 EDT (History)
2 users (show)

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


Attachments
screenshot (186.80 KB, image/jpeg)
2014-10-22 11:43 EDT, alex
Details

Note You need to log in before you can comment on or make changes to this bug.
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);                
    };
});