Documentation Home
Examples
Pie Charts
Overview
Customizing the chart
Function Reference
Examples
Line & Bar Graphs
Overview
Adding data
Customizing the bars
Customizing the axes
Function Reference
Support
Installation
Version History
Technical Support
Previous: bar_column_spacing2.example.phpNext: pie_example1.example.php

Example Chart: bar_axis_negative4.example.php

<?php
  include( 'chartlogix.inc.php' );
 
  $chart = new BarChart();
  $chart->setLegendWidth( 0 );
  $chart->setBackground( 'FFFFFF', 'DDEEFF' );
 
  $chart->setXAxisTextStyle( 'arial.ttf', 8, '000000', 90 );
  $chart->setYAxisTextStyle( 'arial.ttf', 8, '000000' );
 
  $chart->setStackedBarOverlap( 66 );
 
  $chart->doBarSeries( 'Wave 1', 'FFCC00', 'EEBB00' );
  for( $i = 1; $i < 16; $i++ ) $chart->addData( $i, sin($i*6.2/16.77+0.218) );
 
  $chart->doBarSeries( 'Wave 2', 'CCDDFF', 'AABBEE' );
  for( $i = 1; $i < 16; $i++ ) $chart->addData( $i, sin($i*6.2/20.97+0.626) );
 
  $chart->doBarSeries( 'Wave 3', 'CC99FF', 'AA77EE' );
  for( $i = 1; $i < 16; $i++ ) $chart->addData( $i, sin($i*6.2/16.51+1.231) );
 
  $chart->drawPNG( 500, 400 );
Home  |  Online Store  |  Documentation  |  ChartLogix Features  |  Terms & Conditions Copyright © 2024 CubeLogix Ltd