Further problems with Teechart for PHP source code
Posted: Fri Mar 06, 2009 5:13 am
Unfortunately the Steems supplied source code still has bugs. In this case I have created a small test harness which is operative here
http://www.softwaremage.co.nz/charttest/charttest.php
and the source code is downloadable here so that you can use it to test your fixes.
http://www.softwaremage.co.nz/files/ste ... t_test.zip
It took a long time to understand why adding a second bar to a series collection failed becuase it does not, at least in Delphi for PHP, generate an exception. But the bug seems to be buried in a low level graphic routine:
Chartbrush::setColor and also Chartbrush::setForegroundColor
public function setColor($value) {
$this->color = $this->setColorProperty($this->color, $value);
}
setColorProperty is a method of the ancestor class and presumably that is what you want to call.
If you take a look at the demonstration URL I have been able to implement the multibar chart as in the Teechart demo using fillSampleValues which is all well and good.
However, assuming my code is correct it does not seem possible to programmatically add series when other methods are used to populate the chart.
The second chart involves the rendering of a single series barchart. In this case the chart renders the Series Labels even if we call the clear() method to get rid of them. Your suggestion of a couple of days ago of using setVisible(False) does not work either because that method is not implemented on Series Labels. Note too that the series label text is in fact appearing on the Axis labels. Somewhere in the many wrappers for inserting chart values these values must be getting reversed somewhere.
Also the left axis is defective in that the numbering sequence doesnt relate to any other chart artifact.
Because we want to review this product over the weekend and post it for the benefit of the Delphi for PHP community we will be relying upon the version that you supply after fixing this further bug.
But I would appreciate it if you could also use the test harness to test the chart making functionality is working or provide a revised test harness which works with your code to deliver what we want.
Cheers,
Steve Cooney.
http://www.softwaremage.co.nz/charttest/charttest.php
and the source code is downloadable here so that you can use it to test your fixes.
http://www.softwaremage.co.nz/files/ste ... t_test.zip
It took a long time to understand why adding a second bar to a series collection failed becuase it does not, at least in Delphi for PHP, generate an exception. But the bug seems to be buried in a low level graphic routine:
Chartbrush::setColor and also Chartbrush::setForegroundColor
public function setColor($value) {
$this->color = $this->setColorProperty($this->color, $value);
}
setColorProperty is a method of the ancestor class and presumably that is what you want to call.
If you take a look at the demonstration URL I have been able to implement the multibar chart as in the Teechart demo using fillSampleValues which is all well and good.
However, assuming my code is correct it does not seem possible to programmatically add series when other methods are used to populate the chart.
The second chart involves the rendering of a single series barchart. In this case the chart renders the Series Labels even if we call the clear() method to get rid of them. Your suggestion of a couple of days ago of using setVisible(False) does not work either because that method is not implemented on Series Labels. Note too that the series label text is in fact appearing on the Axis labels. Somewhere in the many wrappers for inserting chart values these values must be getting reversed somewhere.
Also the left axis is defective in that the numbering sequence doesnt relate to any other chart artifact.
Because we want to review this product over the weekend and post it for the benefit of the Delphi for PHP community we will be relying upon the version that you supply after fixing this further bug.
But I would appreciate it if you could also use the test harness to test the chart making functionality is working or provide a revised test harness which works with your code to deliver what we want.
Cheers,
Steve Cooney.