Hi
$this->c->makeChart2
Where do I insert this line?
It would great if you could add this as a standard chart.
I was hoping to pass the addText, $this->x, $this->y
as well as the pointer value via the data query. The below seems to work.
This is where I'm at:
class Ext_LinearMeter extends Ext_EChartC
{
protected function create()
{
$this->x = $this->dataIn[0][1]; // meter size
$this->y = $this->dataIn[0][2];
$this->c = new LinearMeter($this->x, $this->y, silverColor(), 0, -2);
$this->c->setMeter(15, 25, 220, 20, Top);
$this->c->setScale(0, 100, 10);
// Set 0 - 50 as green (99ff99) zone, 50 - 80 as yellow (ffff66) zone, and 80 - 100 as
// red (ffcccc) zone
$this->c->addZone(0, 50, 0x99ff99);
$this->c->addZone(50, 80, 0xffff66);
$this->c->addZone(80, 100, 0xffcccc);
$this->c->addText(10, 68, $this->dataIn[0][0], "arialbd.ttf", 8, 0xc00000, BottomLeft);
$this->c->addTitle($this->options['dbr.echart']['name'], $this->title_font, $this->title_font_size, 0x000000);
// Add a blue (0000cc) pointer at the specified value
$this->c->addPointer($this->dataIn[0][3], 0x0000cc);
$textBoxObj = $this->c->addText(238, 70, $this->c->formatValue($this->dataIn[0][3], "2"), "arial.ttf", 8, 0xffffff, BottomRight);
$textBoxObj->setBackground(0, 0, -1);
}
}
I then use the following lines in the report:
select 'dbr.echart', 'linearmeter', 'Unit Sales Performance';
select "% to Target",250,75,75;
I appreciate that I would still have to do a bit of work on the setMeter, setScale and $textBoxObj.
Thanks for your help with this.
Jake