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

Message ListMessage List     Post MessagePost Message

  multiple graph in same page
Posted by Mirko on Dec-30-2010 01:31

Hi guys,
how is possible create multiple graph on the same page


thanks
mirko

  Re: multiple graph in same page
Posted by Peter Kwan on Dec-30-2010 03:03
Hi Mirko,

Yes. Many ChartDirector examples put multiple charts on the same page.

The exact details depend on your programming language. For certain programming language, you just need to put multiple <IMG> tags on the same web page (this is exactly the same as putting mulitple images on the same web page). For example:

<IMG SRC="simplebar.asp">
<IMG SRC="simplepie.asp">

The above puts two charts on the same web page.

In some programming frameworks that use "WebChartViewer controls", you may need to put multiple WebChartViewer controls on the same web page.

Hope this can help.

Regards
Peter Kwan

  Re: multiple graph in same page
Posted by Mirko on Dec-30-2010 19:46
Hi Peter,

below an example , but I not undestand how print 2 or more graphic
I use php.

thanks

Mirko


# Create an XYChart object of size 600 x 300 pixels, with a light blue (EEEEFF)
# background, black border, 1 pxiel 3D border effect and rounded corners
$c = new XYChart(825, 250, 0xeeeeff, 0x000000, 1);
$c->setRoundedFrame();

# Set the plotarea at (55, 58) and of size 520 x 195 pixels, with white background.
# Turn on both horizontal and vertical grid lines with light grey color (0xcccccc)
$c->setPlotArea(55, 58, 720, 150, 0xffffff, -1, -1, 0xcccccc, 0xcccccc);

# Add a legend box at (50, 30) (top of the chart) with horizontal layout. Use 9 pts
# Arial Bold font. Set the background and border color to Transparent.
$legendObj = $c->addLegend(50, 30, false, "arialbd.ttf", 9);
$legendObj->setBackground(Transparent);

# Add a title box to the chart using 15 pts Times Bold Italic font, on a light blue
# (CCCCFF) background with glass effect. white (0xffffff) on a dark red (0x800000)
# background, with a 1 pixel 3D border.
$textBoxObj = $c->addTitle( $_SESSION['nnodo'], "timesbi.ttf", 15);
$textBoxObj->setBackground(0xccccff, 0x000000, glassEffect());

# Add a title to the y axis
$c->yAxis->setTitle("Rate");

# Set the labels on the x axis.
$c->xAxis->setLabels($labels=$orar);

# Display 1 out of 3 labels on the x-axis.
$c->xAxis->setLabelStep(1);

# Add a title to the x axis
$c->xAxis->setTitle("");

# Add a line layer to the chart
$layer = $c->addLineLayer2($value);

# Set the default line width to 2 pixels
$layer->setLineWidth(2);

# Add the three data sets to the line layer. For demo purpose, we use a dash line
# color for the last line
//$layer->addDataSet($termreq,0x008800,$mt[0]);
$layer->addDataSet($risr,0x3333ff,$value); //**************************************
//$layer->addDataSet($chiamateReq,0x3333ff,"pmNrOfTdmTermsReq");
#$layer->addDataSet($data2, 0x008800, 4);
//$layer->addDataSet($data2, $c->dashLineColor(0x3333ff, DashLine), "Server #3"); //per linea tratteggiata

# Output the chart
header("Content-type: image/png");
print($c->makeChart2(PNG));