![]() | 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: | The title is affected on chart size | ||
|---|---|---|---|
| Product: | Java TeeChart | Reporter: | alex |
| Component: | Chart | Assignee: | 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 | ||
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");
...
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);
};
});
|
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?