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_negative1.example.phpNext: bar_example3.example.php

Example Chart: bar_series_spacing3.example.php

<?php
  include( 'chartlogix.inc.php' );
  $chart = new BarChart();
  $chart->setLegendWidth( 0 );
  $chart->setColumnSpacing( 50 );
  $chart->setStackedBarOverlap( 50 );
  $chart->doBarSeries( 'MP3 Player Sales', 'FFCC00' );
  $chart->addData( 'Jan', 191 );
  $chart->addData( 'Feb', 217 );
  $chart->addData( 'Mar', 178 );
  $chart->addData( 'Apr', 263 );
  $chart->addData( 'May', 321 );
 
  $chart->doBarSeries( 'Computer Sales', '00CCFF' );
  $chart->addData( 'Jan', 201 );
  $chart->addData( 'Feb', 292 );
  $chart->addData( 'Mar', 249 );
  $chart->addData( 'Apr', 320 );
  $chart->addData( 'May', 416 );
 
  $chart->doBarSeries( 'Accessory Sales', 'CC00FF' );
  $chart->addData( 'Jan', 113 );
  $chart->addData( 'Feb', 105 );
  $chart->addData( 'Mar', 96 );
  $chart->addData( 'Apr', 101 );
  $chart->addData( 'May', 94 );
  $chart->drawPNG( 500, 400 );
Home  |  Online Store  |  Documentation  |  ChartLogix Features  |  Terms & Conditions Copyright © 2024 CubeLogix Ltd