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

Message ListMessage List     Post MessagePost Message

  Is there a way to generate step line area charts?
Posted by AlanWhooley on Jun-13-2013 16:27
Attachments:
Hi,
   I am trying to generate an area chart that has most of the characteristics of the stacked area chart, but I would like the different data point to be joined in a stepped manner. In essence I am looking for a "step line stacked area chart". Is such a chart available or is there a way to create one through the use of the stacked bar chart and having settings to reduce the spacing between the bars to zero? I have attached a .png of the type of chart I am trying to generate.

I am using ChartDirector for Perl.

Regards
Alan
Regression_History.png

  Re: Is there a way to generate step line area charts?
Posted by Peter Kwan on Jun-14-2013 00:56
Hi AlanWhooley,

For your case, I think a stacked bar chart is the easier option. The code is like:

my $layer = $c->addBarLayer2($perlchartdir::Stack);
$layer->setBarGap($perlchartdir::TouchBar);    // no gap between bars
$layer->setBorderColor($perlchartdir::SameAsMainColor);   // no bar border

$layer->addDataSet($myData0, $myColor0, $name0);
$layer->addDataSet($myData1, $myColor1, $name1);
$layer->addDataSet($myData2, $myColor2, $name2);

Hope this can help.

Regards
Peter Kwan

  Re: Is there a way to generate step line area charts?
Posted by AlanWhooley on Jun-14-2013 23:15
Spot on. This is perfect. Thanks.