Hi AT,
You can achieve this using a bubble layer. The exact code depends on the exact
requirement. For example:
(a) Is the diamond shape always cover the whole plot area from left to right?
(b) Is the diamond always symmetrical (that is, the center of the diamond is always the
horizontal mid-point of the plot area)?
(c) Is the height of the diamond always specify in pixel units (eg. 15 pixels in height), or it
is specify in data units (eg. 0.17 y-axis units)?
The following is an example in PHP:
#center of symbol
$layer = $c->addScatterLayer(array($centerX), array($centerY));
#custom shape of symbol => diamond shape with a horizontal line
$layer->getDataSet(0)->setDataSymbol4(array(0, 0, 500, 500, 0, 1000, -500, 500, 500,
500, -500, 500), 15 , Transparent, 0x000000);
#symbol width is the same width as the plot area, and the symbol height is 15 pixels
$layer->setSymbolScale($c->getPlotArea()->getWidth(), PixelScale, 15, PixelScale);
Hope this can help.
Regards
Peter Kwan |