ASE Home Page Products Download Purchase Support About ASE
ChartDirector General
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Draw inquiry
Posted by AT on Jan-13-2015 17:43
Attachments:
Hi Peter, what is the best way to draw a diamond like shape as shown in the attached image? I already added the
boxwhisker but currently have no idea how to draw the diamond shape with a line inside it.
chart.png
chart.png

22.53 Kb

  Re: Draw inquiry
Posted by Peter Kwan on Jan-13-2015 23:01
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

  Re: Draw inquiry
Posted by AT on Jan-14-2015 12:51
Thanks Peter. I'll try this later.

  Re: Draw inquiry
Posted by AT on Jan-14-2015 12:54
Thanks Peter. I'll try this later.