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_axis_titles1.example.phpNext: bar_database1.example.php

Example Chart: bar_axis_negative3.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( 0 );
  $chart->setStackedBarSpacing( 0 );
 
  $chart->doBarSeries( 'Wave 1', 'FFCC00', 'EEBB00' );
  for( $i = 1; $i < 30; $i++ ) $chart->addData( $i, sin($i*6.2/16.77+0.218) );
 
  $chart->doStackedBarSeries( 'Wave 2', 'CCDDFF', 'AABBEE' );
  for( $i = 1; $i < 30; $i++ ) $chart->addData( $i, sin($i*6.2/20.97+0.626) );
 
  $chart->doStackedBarSeries( 'Wave 3', 'CC99FF', 'AA77EE' );
  for( $i = 1; $i < 30; $i++ ) $chart->addData( $i, sin($i*6.2/16.51+1.231) );
 
  $chart->doStackedBarSeries( 'Wave 4', 'CCCCCC', 'AAAAAA' );
  for( $i = 1; $i < 30; $i++ ) $chart->addData( $i, sin($i*6.2/37.34+2.238) );
 
  $chart->drawPNG( 500, 400 );
Home  |  Online Store  |  Documentation  |  ChartLogix Features  |  Terms & Conditions Copyright © 2024 CubeLogix Ltd