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

Message ListMessage List     Post MessagePost Message

  Symbol Line Chart Steps
Posted by MuchJokes on Oct-12-2011 21:12
Hi,

I was wondering if there was any way to chose which datapoints have the symbol and label in the symbol line chart. Some of the graphs tend to be a little crowded and I don't think there will be enough room for all of them to have symbols.

Thank you

  Re: Symbol Line Chart Steps
Posted by Peter Kwan on Oct-13-2011 01:00
Hi,

Yes. You can use two layers, one of the line, and one for the symbols and labels.

For example, suppose you want to show only one symbol and label for every 4 points, the code in PHP is like:

$scatterData = array_pad(array(), count($myData), NoValue);
for ($i = 0; $i < count($scatterData); $i += 4)
    $scatterData[$i] = $myData[$i];

$scatterLayer = $c->addScatterLayer(null, $scatterData, "". DiamondSymbol, 9, 0xff0000);
$scatterLayer->setDataLabelFormat("{value}");

$lineLayer = $c->addLineLayer($myData, "My Line", 0x8888ff);
$lineLayer->setLineWidth(2);

Hope this can help.

Regards
Peter Kwan